Start of Content Area

Procedure documentation Processing BAPIs   Locate the document in its SAP Library structure

Procedure

When the inbound function module is executed on the application side, the BAPI call is generated from the IDoc, the BAPI function module is called, and the IDoc status is determined.
When processing of the BAPI (or the entire package) is complete, the status records of all the IDocs and all application data generated by the successfully completed BAPIs are written together to the database.

Converting the IDoc to a BAPI Call

When the BAPI call is generated, all the data from the IDoc segments is written to the corresponding parameters of the BAPI function module. If interface reduction has been defined for the BAPI, the suppressed fields are not filled with IDoc data.

Calling the BAPI Function Module

The BAPI function module is then executed synchronously with the filled parameters. Because the BAPI does not trigger a COMMIT WORK command, any application data that it creates, modifies, or deletes is not yet updated in the database.

Determining the IDoc Status

Once the execution of the function module is complete, the inbound function module determines the IDoc status, which depends on the result of the call.

If the TYPE field is filled with A (abort) or E (error) in at least one of the entries of the Return parameter, this means:

Posting Application Data and IDoc Status

When every IDoc/BAPI is processed individually, the data is immediately written to the database. If several IDocs are processed within a package, however, then the following situations are feasible:

Note 

Package processing is only possible when no serialization is involved.

Error Handling

If errors occur, the standard ALE error handling can be used. This has the following effects: