Show TOC

Maintaining the BAPI-ALE InterfaceLocate this document in the navigation structure


To allow the asynchronous BAPI call in ALE business processes, you have to create a BAPI-ALE interface for the BAPI.

The following objects are generated for a BAPI:

  • A message type

  • An IDoc type, including its segments

  • A function module that is called on the outbound side (it uses the BAPI data to generate the IDoc and dispatches it)

  • Function module that calls the BAPI with the IDoc data on the inbound processing side

The difference to manually maintained message types is that the function module that processes the change pointers does not create an IDoc. Instead it fills the corresponding BAPI structures, determines the receivers and calls the generated ALE function module.

The message types, IDoc types and function modules that have been generated can also be used to distribute master data using the SMD tool.


The following two prerequisites must be met:

  1. The BAPI must exist. The following alternatives are possible:

    • A new BAPI has been developed. The appropriate customer namespace has been used for customer developments.

    • A customer wants to generate a BAPI-ALE interface for a BAPI in the standard shipment, or change a BAPI-ALE interface supplied by SAP after modifying the corresponding BAPI. To do this, proceed as follows:

      • Copy and modify the function module for the original BAPI.

      • In the BOR, create a sub-object type in the customer namespace for the business object type that belongs to the BAPI (transaction SWO1 ). When you create the subobject, the subtype inherits the methods of the business object.

      • Set the status of the object type to Start of the navigation path Implemented (Edit Next navigation step Change Release Status Next navigation step Object Type End of the navigation path).

      • All methods of the subtype can then be changed, deleted, or supplemented with your own methods. The BAPI-ALE interface is then created in the customer namespace for the new sub-type and a method assigned to it.

        After an upgrade, the customer-generated interface will continue to work like it did in the old release, even if SAP issues a new version of a BAPI-ALE interface with the new release. If SAP has not issued a new interface in the new release, the customer can re-generate the old interface to adjust for any new parameters.

        If SAP issues a BAPI-ALE interface for a BAPI for which the customer has already generated an interface, then the customer should use the new interface and delete the one he has generated. The old interface can still be used, but only in the old release. If you re-generate the old interface, some of the generated objects - like segments of SAP objects, for example - may be overwritten if the interface in the customer BAPI function module refers to BAPI structures that belong to SAP.

  2. If you need to take hierarchical dependencies between BAPI table parameters into account, you will have to define them before you generate the BAPI-ALE interface for the BAPI (see Defining Hierarchies Between BAPI Parameters ). The specified hierarchy is evaluated when the interface is generated and incorporated in the interface coding. The BAPI-ALE interface must be regenerated following all subsequent changes made to the hierarchy. Once the generated IDoc type has been released, the specified hierarchy of the asynchronous BAPI cannot subsequently be changed for compatibility reasons.

Be sure to read the Notes on related ALE topics. They contain information on data filtering, serializing messages, and other subjects.


Choose path Start of the navigation path BAPI Next navigation step Maintain ALE Interface End of the navigation path under ALE development.

In customer systems all object names must begin with Y or Z or with their own prefix.

Proceed as follows:

  • In the initial screen, enter the basic business object (object type) for your interface and the method.

  • Then select one of the options in the Interface menu to maintain, display, check, or delete an interface:

    • Create Interface

      Prerequisite: An interface has not yet been generated for this BAPI or one already generated has been deleted using the Delete option. Names for the objects to be generated are suggested. You can change them. Creating an interface involves the following process flow:

      1. Enter a name for the message type in the first dialog box. The default names have the following naming convention:

        Message type :

        Business name

        Example: MYTEST

        Confirm your entry.

      2. You can make the following entries in the following dialog box:

        IDoc type


        <Message type>01


        Outbound function module:




        Inbound Function Module


        IDOC_INPUT_< Message Type >


        The system proposes the development class and function group to which the BAPI function module belongs. You should use your own packages and function groups to generate your interfaces. The following options are also available:

        • Data filtering allowed

          If you want to perform data filtering for the BAPI, you will have to choose option Data Filtering Allowed in the dialog box for creating or changing the interface. This option is generally active for BAPI-ALE interfaces generated by SAP. For more information, see the Notes .

        • Call in update task

          If the database changes are carried out by methods using the update task, then this indicator must be selected.

        • Packet processing allowed

          If you want to allow packet processing, you have to select this option. The associated BAPI must be able to process packets. You can set the packet size in ALE Customizing.

          You can generate only the message and IDoc types (required fields), or only one of the function modules (optional fields), by leaving the field for which no object is to be generated, empty.

      3. Confirm your entries.

      4. The dialog box Enter Segment Name appears.

      5. Enter a segment name.

        The suggested segment type is derived from the message type or from the BAPI structure:

        E1<Message type>

        For individual fields as header segment

        Example: E1MYTEST,or


        For parameters of structure BAPI_XX…

        Example: E1BP_HUGO for BAPI_HUGO

        If a segment contains more than 1000 bytes of data, child segments are automatically generated from it. Child segment names are extended with the digits 1, 2,...appended to the original segment provided that the length of the name is less than 27 digits.

        • Change Interface

          Prerequisite: Objects have already been created for this BAPI.

          To regenerate the objects of an existing ALE interface after the BAPI has been changed, choose Change . The IDoc type and the IDoc segments are regenerated if the interface structures of the object method have changed. The function modules can only be regenerated if the IDoc type or one of the segments has changed. As when you create an object, a dialog box is displayed here also. The objects that already exist in the system are displayed in this dialog box. They are not input fields. If a field is empty, you can generate its object.

        • Display Interface

          Prerequisite: Objects already exist for this BAPI. All existing objects for this BAPI are displayed. This gives you an overview of the relationship between the BAPI method and the IDoc message type.

        • Delete Interface

          Prerequisite: Objects have already been created for this BAPI. The function modules can be deleted provided that they exist in the system. The IDoc structure is deleted if it has not yet been released. The IDoc segments are only deleted if they have not been released and are not used in other IDocs. Finally, the message type is deleted, if it is no longer assigned to the IDoc type.

        • Check Interface

          Prerequisite: Objects have already been created for this BAPI. The system checks whether all the objects related to this BAPI are available in the system. It also checks whether objects (IDoc type and segments) have already been released. The release status of objects can be changed (see Set and Cancel Releases in the Notes below).

  1. You can release the interface. Developers can change the release status of IDoc types and segments (by choosing Start of the navigation path Edit Next navigation step Set Release Next navigation step Cancel Release End of the navigation path).

    • The authorizations required are S_IDCDFT_AL+ and S_IDCDFT_ALL of the authorization object S_IDOCDEFT.

      Before an object can be released, the related BAPI must have already been released. If the object is released, the system first verifies that the generated interface in the BAPI method has the current status. If the object is not released, you are asked if you want to regenerate the interface. The segments and IDoc types which are relevant for the release are determined. The new status is assigned to objects which have not yet been released. The release can be reset at any time. This action is connected to the transport system. The generated function modules are not released.


The generated objects and their statuses are displayed on the screen. All changes are put in transport requests.