Show TOC

Actions in the BORLocate this document in the navigation structure

Use

After the function module has been created, you have to define the BAPI as a method of a business object type. By storing the BAPI in the central Business Object Repository (BOR), you enable object-oriented access to the BAPI and the ALE distribution model may be able to be connected to (with asynchronous communication).

The BOR can be accessed from within the project form in the BAPI Explorer.

Process

To define the BAPI:

  1. Identify the SAP business object type .

  2. Append the BAPI as an API method to the business object type.

    You can use the BAPI Wizard to do this. This generates the method in the BOR based on the BAPI function module you created. You have to perform some additional tasks in this procedure. Keep in mind the following points:

    1. Upper case/lower case (each new word must be in upper case). See also: Example .

    2. The import and export behavior of the table parameters must be correctly defined in the BOR.

      Reason : Unlike the function module, in the BOR you can differentiate between import and export tables. You should therefore only select the standard option Import/Export , if the table is actually going to be imported and exported.

    3. The return parameter is always defined as an Export parameter.

As well as making the task much easier, the Wizard also ensures that the BAPI interface is identical in the BOR and in the function module. In particular this concerns the following points:

  1. For each function module parameter there is one BOR parameter (or one key field) of the same name (or vice versa).

  2. The associated parameters are based on the same ABAP Dictionary structure.

  3. The associated parameters have the same characteristics (mandatory or optional, import, export or table parameters).

    Example

    The following example shows the relationship between the definition of the BAPI method in the BOR and the function module.

    Note

    If you cannot use the BAPI Wizard (e.g. to change the BAPI later or to redefine a method), you can change the method in the BOR itself. Make sure that the above points are complied with.

For developments undertaken by IBUs, customers and partners the additional points below are important:

  • Read the documentation about Customer Enhancements and Modifications to BAPIs .

  • As a customer you can create your own BAPIs for your own business object types or you can define a Subtype of an existing SAP business object type. We strongly advise you NOT to define new BAPIs of SAP business object types because this involves modifications.

  • All development objects (business object types, BAPIs, parameters) have to be created in their own namespace .

    Note

    Make sure that SAP internal namespaces are consistent, too. This means that if a namespace is used for the whole application, the BAPIs must use the same namespace. However, there are constraints when you create a technical name for a business object since it may contain a maximum of 10 characters only.