Show TOC

Enhancing the BAPIs Based on Existing SAP Database TablesLocate this document in the navigation structure

Use

Customers can be allowed to modify BAPIs:

  • They can take fields into account which have been subsequently added to the underlying SAP tables

  • They can include fields that belong to the supplied SAP table, but are not yet taken into account in the BAPI interface.

Implementation Considerations

In this case, the following precautions must be applied to the BAPI in question:

  1. Creating the extension parameter in the BAPI interface

    Depending on the requirements made of the BAPI in question, the BAPI developer creates one extension parameter for the data import ( ExtensionIn ) and/or one extension parameter for the data export ( ExtensionOut ) in the interface of the BAPI function module.

  2. Creating BAPI table extensions

    A BAPI Table Extension must exist for each underlying table for a BAPI that contains at least one field that is to be taken into account in that BAPI. These BAPI table extensions are help structures that are used during the data import to copy the customer enhancements from the container ( ExtensionIn ), and to fill the additional fields of the database table. During data export, the BAPI table extensions are used to copy data from a customer table extension and to place it in the ExtensionOut parameter. The BAPI developer creates the corresponding BAPI table extensions for those tables for which enhancement is considered a useful option. If customers want to use other BAPI tables for extensions, they must create the BAPI table extensions.

  3. Business Add-Ins (BadIs)

    Each BAPI function module must contain a maximum of two extra BAdIs in addition to the exits provided by the application. The customer can perform data verification or other processing in these BAdIs.

    Caution

    Customers can use only fields of data type CHAR and similar data types in BAPI table extensions.

The interaction between the involved components is illustrated in the examples below:

  1. Appending Customer Fields ,

  2. Using Additional Existing Database Fields or

  3. Combination of Appending Customer Fields and Adding Existing Table Fields .