Writing Function Module Documentation 

Procedure

To document a BAPI, follow the steps below:

  1. Logon to the appropriate development system, and create two sessions.

In one session, enter transaction SE37 to display the Function Builder. This is where you write the documentation.

In the second session, enter the transaction BAPI to invoke the BAPI Explorer, and to display the BAPI in the BOR for reference. In the tree view, open the relevant business object to display its BAPIs. In the Detail tab, you can view detailed information about each BAPI.

If you cannot find your BAPI in this view, display all BAPIs using the filter "Filter BAPIs according to release status", or start transaction SWO1 and enter the technical name of the business object.

The next steps are carried out in the Function Builder.

  1. In the Function Builder, enter the name of the function module the BAPI is based on. The names of function modules for BAPIs always begin with BAPI_ .
  1. Choose Change.

A table containing the interface parameters of the BAPI function module is displayed.

  1. Select the Documentation tab.
  1. In the first field Short text, enter a description of the BAPI, or, if the description already exists, check it is correct.

The short text should be an abbreviated description of the method in the form of <function/verb><object>. For example, "Create purchase requisition". This text is automatically used as the title of the function module documentation.

You must then copy this text in the BOR (transaction SWO1) using the appropriate function Goto -> Documentation. It is then displayed in the BAPI Explorer (Detail tab) and the BOR as the short description of the BAPI.

  1. Choose Function module documentation to create the BAPI documentation. Follow the guidelines in Structure of Function Module Documentation.
  1. To save the document, in the editor choose Document -> Save. Depending on whether the document is the final version, you can save it as a draft version or an active version. For the document to be translated, you must save the final document as an active version.
  1. After you have saved the document as an active version, display it in the BAPI Explorer to check the formatting of the HTML display. Change the formatting if required, and when you are happy with the changes, again save the document as an active version.

For an example, see BAPI Function Module Documentation.