Fonction SAP BAPI_ADDRESSORG_SAVEREPLICA - BAPI for Inbound Distribution of Company Addresses

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTEXT BAPI4001_1-CONTEXT N 4 1 X Semantic meaning of the addresses (-> constants)
IV_CHECK_ADDRESS BAPI4001_1-CHECK_ADDR C 1 'X' X Indicator: Check Address?
IV_TIME_DEPENDENT_COMM_DATA BAPI4001_1-TIMEDEPCOM C 1 SPACE X Indicator: Take time validity for communication data into account
OBJ_ID BAPI4001_1-OBJKEY C 70 Address owner BOR object key
OBJ_ID_EXT BAPI4001_1-EXTENSION C 70 SPACE X BOR object key extension (GUID)
OBJ_TYPE BAPI4001_1-OBJTYPE C 10 Address owner BOR object type

Paramètre Reférence Type Long. Description
ADDRESS_NUMBER BAPI4001_1-ADDR_NO C 10 Address number in target system
RETURN BAPIRET2 u 548 Message/error return structure

Paramètre Reférence Long. Facultatif Description
BAPIAD1VL BAPIAD1VL 1126 BAPI-Structure Company Address (w/o. Comm. Data)
BAPIADFAX BAPIADFAX 143 X BAPI structure fax numbers
BAPIADPAG BAPIADPAG 136 X BAPI structure pager numbers
BAPIADPRT BAPIADPRT 40 X BAPI structure printer addresses
BAPIADRFC BAPIADRFC 69 X BAPI structure RFC addresses
BAPIADRML BAPIADRML 63 X BAPI structure R/Mail addresses
BAPIADSMTP BAPIADSMTP 300 X BAPI Structure Internet Addresses
BAPIADSSF BAPIADSSF 2391 X BAPI structure SSF addresses
BAPIADTEL BAPIADTEL 142 X BAPI structure telephone numbers
BAPIADTLX BAPIADTLX 72 X BAPI structure telex numbers
BAPIADTTX BAPIADTTX 72 X BAPI structure teletex numbers
BAPIADURI BAPIADURI 2219 X BAPI structure URI addresses
BAPIADUSE BAPIADUSE 46 X BAPI Structure for Communication Usages (BAS)
BAPIADX400 BAPIADX400 948 X BAPI structure X400 addresses
BAPIAD_REM BAPIAD_REM 55 X BAPI structure address comments
BAPICOMREM BAPICOMREM 60 X BAPI Structure Communication Comments

Functionality
The organization address is determined from the specified object typeand key, and overwritten by the specified current address andcommunication data. This module is usually called by the ALE functionmodule IDOC_INPUT_ADRMAS.

Example
* Replicate an organization address: copy the current status in the
* AB1 system to AB2
An ALE IDOC is created and distributed in AB1 by the moduleALE_ADDRESSORG_SAVEREPLICA after the function moduleMASTERIDOC_CREATE_REQ_ADRMAS has been called.
When the IDOC arrives in AB2, it is read by the moduleIDOC_INPUT_ADRMAS, and its data are passed to the moduleBAPI_ADDRESSORG_SAVEREPLICA. The object type OBJ_TYPE, the object keyOBJ_ID, the object key extension OBJ_ID_EXT, and the context CONTEXTare the same as in the source system.
For example, values are assigned as follows in the (main) customeraddress:
Object type: 'KNA1'
Object key:
(extension empty): ' '
context: '0001'
The module call is as follows:
DATA: bapiad1vl like bapiad1vl occurs 0,
bapiadtel like bapiadtel occurs0,
...
bapicomrem like bapicomrem occurs 0,
return like bapiret2,
addrnumber like adrc-addrnumber.
CALL FUNCTION 'BAPI_ADDRESSORG_SAVEREPLICA'
EXPORTING
OBJ_TYPE_C = 'KNA1'
OBJ_ID = '4712'
OBJ_ID_EXT = ' '
CONTEXT = '0001'
IMPORTING
RETURN = return
ADDRESS_NUMBER = addrnumber
tables
bapiad1vl = bapiad1vl
BAPIADTEL = bapiadtel
BAPIADFAX = bapiadfax
BAPIADTTX = bapiadttx
BAPIADTLX = bapiadtlx
BAPIADSMTP = bapiadsmtp
BAPIADRML = bapiadrml
BAPIADX400 = bapiadx400
BAPIADRFC = bapiadrfc
BAPIADPRT = bapiadprt
BAPIADSSF = bapiadssf
BAPIADURI = bapiaduri
BAPIADPAG = bapiadpag
BAPICOMREM = bapicomrem.
IF NOT RETURN IS INITIAL.
...
ENDIF.
The data for address number ADDRNUMBER has now been updated in AB2.

Note
Error messages are in the return structure RETURN.
The valid organization address number for the target system is returnedin the ADDRESS_NUMBER parameter.
INCLUDE ADDRESS_TSADOBJ_AND_BAPIS OBJECT DOKU ID TX
INCLUDE ADDR_RETURN_CONSNUMBERS OBJECT DOKU ID TX

203952Distribution of addresses with several versions
306275Transferring address data