Entering content frame

Background documentation Basics Locate the document in its SAP Library structure

Where is BAPI Documentation Written?

BAPI documentation is, for the most part, maintained in the Function Builder with the function module the BAPI is based on. However, even though BAPI documentation is function module documentation, it must describe the method in the BOR. This is because programmers access BAPI definitions and documentation in the BOR using the BAPI Explorer.

Some parts of BAPI documentation are created in the BOR and the ABAP dictionary.

So, when you are writing BAPI documentation, follow these guidelines closely because most application programmers will be expecting to see the terminology and structures used in the BOR.

What Does BAPI Documentation Comprise?

The BAPI documentation comprises the following parts. You can view them in the BAPI Explorer under the Documentation tab:

·        Documentation on the method itself
This is the documentation of the function module the BAPI is based on. The purpose of this documentation is to enable users to find out exactly what the method can do and how external programs can be integrated.

·        Documentation on the individual parameters of the method
The import, export, and table parameters define the BAPI interface (the data that is exchanged using the BAPI interface). A parameter can refer to a table, a structure, or to an individual field.

·        Data element documentation for every field used in a BAPI parameter
Part of the data element documentation is an English default field name.

The documentation below must also be available to provide the full context of the BAPI (these texts are also displayed in the BAPI Explorer):

·        Documentation on the business object the BAPI is implemented for

·        Documentation on the key fields of this business object
A key field identifies a particular instance (for example, "flight LH 400 on 01.01.2001") of a business object (for example, "flight"). Many BAPIs use the key fields of their business object in their interface.

Only when all these documentation units are complete, can programmers know the full scope of the functionality of the BAPI.

You do not have to write function group documentation for BAPIs. 

Where Can You Display BAPI Documentation?

You can display BAPI documentation in the BAPI Explorer (transaction BAPI) in the Documentation tab, or in the Business Object Builder (transaction SWO1).

Note

Note: Documentation is displayed in the BAPI Explorer in HTML format. Be aware that some formats specified in SAPscript may not be displayed in HTML.

When Do You Write BAPI Documentation?

Apart from the following recommendation, there are no special guidelines as to when to write BAPI documentation:

Caution

If your developer defines a BAPI as a method in the BOR (with the BOR/BAPI Wizard), the short texts describing the method and the parameters are retrieved from the Function Builder/ABAP Dictionary and used in the BOR. This means that when you are writing BAPI documentation before the developer defines the BAPI as a method in the BOR with the BOR/BAPI Wizard, you need only write the short texts for the method and its parameters once, in the Function Builder.

When you are writing or updating documentation after the developer has defined the method in the BOR using the BOR/BAPI Wizard, you have to then manually copy the changes to the short texts made in the Function Builder to the BOR. In the future, it should be possible to align the short text in the BOR with the short text in the Function Builder automatically. 

Before You Start to Write BAPI Documentation

Before you begin to document a BAPI, you should:

1.

Ask your BAPI developer for the following information:

 

·        Name of the function module that the BAPI is based on, BAPI_FLBOOKING_CREATEFROMDATA, for example

·        Both the name and the technical name of the business object related to the BAPI in the BOR (for example, FlightBooking, SBOOK)), and/or the path in the application hierarchy where the business object is located (for example, Basis -> ABAP Workbench -> FlightBooking).

·        The name of the BAPI in the BOR, for example, CreateFromData()

·        Find out if the developer has created a new development class for BAPIs. If so, assign the new development class to the appropriate colleagues so that worklists can be generated. BAPI documentation is translated in the current translation system. New or modified BAPI documentation will appear in the translators’ worklist. The transport routes should be the same as those for the user interface documentation.

2.

Read the guidelines and the example documentation.

 

Documenting in a Language Other than the Development Language

It is possible that your BAPI is developed in a language different from the language you are documenting in. Currently, there is no way of decoupling the development language from the documentation language. This means that you must create the BAPI documentation in the original language in which the BAPI is developed. (Changing the original language of the BAPI would mean changing the original language for the entire function group!) 

In this case, write the BAPI documentation in an editor of your choice. Have it translated into the appropriate development language of the BAPI and enter the translated text as the BAPI documentation.

This is only a workaround, a proper solution is being worked on.

See also:

Writing Function Module Documentation

Writing Parameter Documentation

Checking or Writing Data Element Documentation

Checking or Writing Business Object Documentation

 

 

 

Leaving content frame