Start of Content Area

Background documentation Structure of Function Module Documentation  Locate the document in its SAP Library structure

Before you start to document a BAPI, keep in mind that BAPIs are business (not technical) interfaces to an SAP System and that a thorough knowledge of the SAP System and the SAP development environment is not required to use them. Many readers are not SAP experts or business application experts.

Function module documentation for BAPIs is structured as follows:

Keyblock

Contents

Functionality

What does the method do exactly?

Describe the business functionality of the BAPI and how it can be used?

Describe its functions in detail to help the user decide whether this method could be used to perform a specific work task. Use appropriate examples.

Include important limitations, that is, functions that you cannot perform with this BAPI.

This section does not contain information about the technical implementation of the BAPI.

Examples

Do not write any documentation in this keyblock. This keyblock is intended for source code examples. These are, however, platform-specific and soon become obsolete.

Notes

What should users you pay particular attention to when implementing this method?

Here you should describe:

  • Authorizations required for the BAPI.
  • If the BAPI contains the COMMIT WORK command, you need to mention this explicitly, as this is an exception to the rule. Ask your developer about it.
  • If the BAPI is a write BAPI with buffering, add this sentence: "This method works with buffering. This means that other change methods of instances created/changed by this method can be executed in the same LUW, without a prior posting being necessary." (Note to documentation developers: delete as applicable.)
  • If the BAPI is a read BAPI that takes write BAPIs with buffering (see above) into account, add this sentence: "This method includes changes made in the buffer by create/change BAPIs of the same business object type which have not yet been posted."
  • Customizing dependencies

Create links to the IMG (see Hyperlinks to the IMG).

  • Parameter interdependencies, for example, are there either/or relationships between certain parameters.
  • Situations where related methods can be used.
  • Dependencies between this BAPI and other BAPIs.
  • Combinations that affect performance either negatively or positively.

Customer Enhancements:

If you created Extension parameters for customer enhancements at the interface, use an INCLUDE command to insert the following standard sentences:

  • If only one ExtensionIn parameter was created, insert the following standard text:
    "The BAPI customer enhancement concept allows customers to use additional data that was not planned at the interface.
    The ExtensionIn parameter acts as a data container where the additional values are transferred during import.
    In addition to the extension parameters at the interface, there are BAdIs (Business Add-Ins) or customer exits in the BAPI function module. These check the data that is transferred to the method by the customer, and perform additional processing activities."
    To do this, include the standard sentences BAPI_CUST1, BAPI_CUST_IN, and BAPI_CUST2 one after the other. You have to insert the /: character on the left-hand side in the format column and then insert the corresponding command (INCLUDE BAPI_CUST1, and so on) in the relevant line in the SAPscript editor.
  • If ExtensionIn and ExtensionOut parameters were created at the interface, insert the following standard text:
    "The BAPI customer enhancement concept allows customers to use additional data that was not planned at the interface.
    The ExtensionIn and ExtensionOut parameters act as a data container where the additional values are transferred during import or export.
    In addition to the extension parameters at the interface, there are BAdIs (Business Add-Ins) or customer exits in the BAPI function module. These check the data that is transferred to the method by the customer, and perform additional processing activities."
    To do this, you use the BAPI_CUST1, BAPI_CUST_INOUT, and BAPI_CUST2 INCLUDES, which you insert as described above.
  • If you planned BAPI table extensions at the interface, list them here.

Return messages

Using an INCLUDE command, insert a standard sentence in this section as follows: "Insert the character /: on the left side in the format column and the command INCLUDE.BAPI_RET in the relevant lines in the SAPscript editor." This automatically inserts the following sentence:

"Messages are returned in the parameter Return. The parameter documentation shows the return codes and their meanings."

For SAP interface types add the following:

"This BAPI is a method of an interface type and provides the definition of the standardized interface. It is implemented by the system wanting to provide this interface.

The data in the structure predefined by the BAPI is passed to the receiving system. The receiving system must make sure that this data is entered into the correct database tables. This can be done by implementing the interface defined by this BAPI. "

Further information

If possible, refer to documentation in the system for this function. These references are important for people who have little knowledge of the system or of the particular application. If this is the case, include the following standard sentence:

"For more information, see <title> in the SAP Library."

Note

Do not describe any parameters in the function module documentation. You write the documentation on individual parameters separately, as described in Writing Parameter Documentation. Parameter documentation is then automatically linked to the function module documentation.

This graphic is explained in the accompanying text

For an example, see BAPI Function Module Documentation.