Fonction SAP ALE_IDOCS_CREATE - Replacement for MASTER_IDOC_DISTRIBUTE for asynchronous BAPIs

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CHNUM SERIAL-CHNUM N 4 '' X Channel Number for Object Serialization
IDOC_CONTROL BDICONTROL u 118 Transfer Data for the IDoc Control Record
OBJ_TYPE SERIAL-OBJ_TYPE C 10 '' X Object Type for Object Serialization

Paramètre Reférence Long. Facultatif Description
APPLICATION_OBJECTS SWOTOBJID 100 X Linked Objects from the Application
CREATED_IDOCS BDIDOCS 16 X IDoc Numbers of the Generated IDocs
CREATED_IDOCS_ADDITIONAL EDIDC 542 X IDoc Info for the Generated IDocs
IDOC_DATA EDIDD 1062 Data Records, Entries Will be Changed
RECEIVERS BDI_LOGSYS 10 Receiver for this IDoc

Exception Description
IDOC_INPUT_WAS_INCONSISTENT Serious Error in the Transferred Data

Functionality
One or more IDocs are generated, depending on whether you have enteredone or more recipients.
This module is used by all asynchronous BAPIs.
Each of the IDocs runs through the following ALE services:

  • Filtering

  • Conversion of global organizational units

  • Field conversions

  • Version changes.

  • If "Send Immediately" is entered in the partner profile, sending theIDoc is triggered.
    In contrast to the function module MASTER_IDOC_DISTRIBUTE, no recipientis determined. Also, no linked objects are read from theIDoc.

    Import

    • The IDoc: Control record in IDOC_CONTROL, data records in IDOC_DATA

    • The receiving logical systems of the IDoc in RECEIVERS

    • You can also specify Object IDs using the optional table
    • APPLICATION_OBJECTS. A link to the IDoc is written for all entries inthe table.

      Export

      • The table CREATED_IDOCS contains the IDoc numbers.
      • Exceptions

        • The exception IDOC_INPUT_WAS_INCONSISTENT is thrown if a serious
        • inconsistency is found in the input data, so that no IDocs can begenerated.

          Notes

          • The entries in the table IDOC_DATA are changed during execution. For
          • performance reasons, no copy of the table is created.
            • If no recipients are specified, no IDoc is created and no error message
            • appears.
              • After a ALE_IDOCS_CREATE call a COMMIT WORK must be triggered. The
              • database commit at the end of the transaction is not sufficient. TheCOMMIT WORK does not have to occur immediately after the call. It can,for example, be on a higher calling level. If no COMMIT WORK istriggered(and direct sending is set in Customizing), the IDoc is not sent andthe status 3 is set.