Start of Content Area

Process documentation Sending Data Directly  Locate the document in its SAP Library structure

In the source system, a function module of the application creates a master data IDoc during outbound processing (for the message type DEBMAS of the customer master, or for the message type CREMAS of the vendor master, for example) and passes it on to the ALE layer. In this case, the application must additionally initiate the creation of the dependent address IDoc. To do this, the application uses the following modules of Business Address Services, which have to be called as required:

Based on the object type and the object key, these function modules determine the local address number (person number) and fill the BAPI structures of BAS with the data for this number. In order for the address number to be determined, the application has to provide a callback function module with input parameters for the where-used list and with the address/person number as the output parameter, and add the function module to table TSADRV using transaction SM30 .

For address type 1, the name of the callback function module must be entered in field FUNC_AD1 . The template for the interface is function module ADDR_BUS000_GET_ADDR1_KEY .

For address type 2, the name of the callback function module must be entered in field FUNC_AD2 . The template for the interface is function module ADDR_BUS000_GET_ADDR2_KEY .

For address type 3, the name of the callback function module must be entered in field FUNC_AD3 . The template for the interface is function module ADDR_BUS000_GET_ADDR3_KEY .

The callback function modules defined that way are also used to determine the local address and person number for updates (SAVEREPLICA BAPIs) and other BAPIs of BAS (Change, GetDetail).

Once the above BAS function modules have filled the BAPI structures, the receiving systems are determined according to the ALE distribution model, and function modules ALE_ADDRESSORG_SAVEREPLICA , ALE_ADDRESSPERS_SAVEREPLICA and ALE_ADDRCONTPART_SAVEREPLICA are called depending on the address type. These function modules convert the BAPI structures into IDocs.

In order to determine the receiving systems in ALE Customizing, the BAS function module passes not only the object type ( BUS4001 , BUS4002 or BUS4003 ) and the method ( SAVEREPLICA ) to the function module ALE_ASYNC_BAPI_GET_RECEIVER , but also a table with filter object values. Using these filter object values, an adequate link can be defined between the master object and the address IDoc in the distribution model. This is illustrated by the proposed model for customers and vendors (see also: Settings in ALE Customizing).

The filter object values passed include:

Address type 1

AD_OBJTYPE

Object type of the owner

AD_OBJKEY

Object key of the owner

AD_CONTEXT

Semantic meaning of the address

As far as the special case of customer contacts (object type BUS1006001 ) is concerned, the object type ( AD_OBJTYPE2 ) and object key ( AD_OBJKEY2 ) of the object referenced by the contact (= customer) are also passed, since customer contacts do not have a distribution model of their own but are distributed together with the customer master. The values are determined using function module WY_KNVK_REF_OBJTYPE_ID .

Address type 2

The filter object values are determined in the same way as with address type 1.

Address type 3

AD_OBJTYPE

Object type of the owner

AD_OBJKEY

Object key of the owner

AD_CONTEXT

Semantic meaning of the address

AD_OBJTYP1

Object type of the higher-level object

AD_OBJKEY1

Object key of the higher-level object

So that possible message types can be assigned to the application ( DEBMAS or CREMAS , for example) if the "Object key of the owner" filter element is selected during distribution model view definition, application developers must maintain the dependencies between the SAVEREPLICA methods and the message types in transaction BD48 .