Creating Development Objects and Documentation

Purpose

After you have defined your BAPI, identified the relevant programming objects and given them names, you can create the programming objects in the SAP System.

Process Flow

Task

Tools / Further Information

...

       1.      If necessary, create the required SAP business object type in the Business Object Repository

For SAP internal development, you have to complete a business object request form in the BAPI Explorer.

For general information about creating business object types refer to the documentation on SAP Business Workflow.

       2.      The data objects, for example, structures, fields and domains are stored in the ABAP Dictionary.

For further information see the ABAP Dictionary.

       3.      Create the function module in the Function Builder and the function group, if required.

For further information see the BC - ABAP Workbench: Tools

       4.      Create the documentation for the BAPI and for each interface parameter and for each parameter field.

Documentation on the BAPI and its parameters is essential because it is very difficult to use a BAPI that has not been well documented.

For internal BAPI documentation you must follow the current BAPI documentation guidelines which you can get from your contact person in the BAPI Development group.

See the general Documentation Guidelines.

       5.      If required, generating the function modules that can convert between the internal and external data formats.

For details on how to do this see Converting Between Internal and External Data Formats.

       6.      Writing the program for the function module that the BAPI is based on.

Note that the COMMIT WORK command must not be used in the function module.

For further information see General Programming Guidelines for BAPIs
and
Programming Standardized BAPIs

For an example of a function module that implements a BAPI see BAPI Interface and Function Module.

       7.      Using the BOR/BAPI Wizard, define the function module as a method of the associated SAP business object type in the BOR.

Finally, make sure that the parameters and parameter types of the method in the BOR match the parameters of the underlying function module in the Function Builder.

For more information see Defining Methods in the BOR Using the BOR/BAPI Wizard.

For an example of a function module that implements a BAPI see BAPI Interface and Function Module.