Skip to end of metadata
Go to start of metadata

  In scenarios where an idoc needs to be generated in an interface using stand alone programs , the function module 'MASTER_IDOC_DISTRIBUTE' is used.

§ 1. CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
        EXPORTING
          docnum                 = edidc-docnum   "idoc number
        EXCEPTIONS
          idoc_is_not_to_dequeue = 1
          OTHERS                 = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
     2.Commit Work