Entering content frameProcedure documentation Implementing Your Own BAPIs Locate the document in its SAP Library structure

SAP provides a large number of BAPIs. If you want to implement your own BAPIs, you have to use your own namespace.

Procedure

You have the following options:

  1. Copy and modify the function module belonging to the original BAPI.
  2. In the Business Object Repository create a subobject type for your BAPI object type in the customer namespace (Tools ® Business Framework ® BAPI Development ® Business Object Builder).
  3. When you create the subobject type the methods of the business object inherit the subtype.

  4. Set the status of the object type to Implemented (Edit ® Change release status ® Object type).
  5. You can change and delete the methods of the subtype or enhance them with your own methods.

For further information about creating new BAPIs and enhancing existing ones refer to Modifications and Customer Enhancements in the BAPI Programming guide.

Notes about Asynchronous BAPIs

If you want to implement an asynchronous ALE business process, you have to Define a BAPI-ALE Interface from the BAPI.

If you implement a BAPI as an asynchronous interface, in addition to following the standard programming BAPI guidelines, keep in mind the following:

After the function module which converts the IDoc into the corresponding BAPI in the receiving system has been called, status records are written for the IDoc in which messages sent in the return parameter are logged.

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

Status 51 (error, application document not posted) is written for all status records, after a ROLLBACK WORK has been executed.

Status 51 (error, application document not posted) is written for all status records and a ROLLBACK WORK is executed.

Otherwise status 53 (application document posted) is written and a COMMIT WORK executed.

 

 

 

Leaving content frame