Fonction SAP BAPI_ADDRCONTPART_SAVEREPLICA - BAPI for Inbound Distribution of Contact Person Addresses

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTEXT BAPI4003_1-CONTEXT N 4 0 X Semantic meaning of the addresses (-> constants)
IV_CHECK_ADDRESS BAPI4003_1-CHECK_ADDR C 1 'X' X Indicator: Check Address?
IV_TIME_DEPENDENT_COMM_DATA BAPI4003_1-TIMEDEPCOM C 1 SPACE X Indicator: Take time validity for communication data into account
OBJ_ID_C BAPI4003_1-OBJKEY_C C 70 BOR company address owner object key
OBJ_ID_EXT BAPI4003_1-EXTENSION C 70 SPACE X BOR object key extension (GUID)
OBJ_ID_P BAPI4003_1-OBJKEY_P C 70 Person object BOR object key
OBJ_TYPE_C BAPI4003_1-OBJTYPE_C C 10 Company address owner BOR object type
OBJ_TYPE_P BAPI4003_1-OBJTYPE_P C 10 Person object BOR object type

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

Paramètre Reférence Long. Facultatif Description
BAPIAD3VL BAPIAD3VL 603 BAPI structure contact person address (w/o. comm.)
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
BAPICOMREM BAPICOMREM 60 X BAPI Structure Communication Comments

Functionality
The contact person data are determined from the specified organizationand person object type and key, and overwritten by the specifiedcurrent address and communication data. This module is usually calledby the ALE function module IDOC_INPUT_ADR3MAS.

Example
* Replicate a contact person address: copy the current status in the
* AB1 system to AB2
An ALE IDOC is created and distributed in AB1 by the moduleALE_ADDRCONTPART_SAVEREPLICA after the function moduleMASTERIDOC_CREATE_REQ_ADR3MAS has been called.
When the IDOC arrives in AB2, it is read by the moduleIDOC_INPUT_ADR3MAS, and its data is passed to the moduleBAPI_ADDRCONTPART_SAVEREPLICA. The organization object type OBJ_TYPE_C,the person object type OBJ_TYPE_P, the organization object keyOBJ_ID_C, the person object key OBJ_ID, the object key extensionOBJ_ID_EXT, and the context CONTEXT are the same as in the sourcesystem.
For example, values are assigned as follows in the company address of acustomer contact person:
Person object type: 'BUS1006001'
Person object key:
Organization object type: 'KNA1'
Organization object key:
(extension empty): ' '
context: '0005'
The module call is as follows:
DATA: bapiad3vl like bapiad3vl occurs 0,
bapiadtel like bapiadtel occurs0,
...
bapicomrem like bapicomrem occurs 0,
return like bapiret2,
addrnumber like adrc-addrnumber,
persnumber like adrp-persnumber.
CALL FUNCTION 'BAPI_ADDRCONTPART_SAVEREPLICA'
EXPORTING
OBJ_TYPE_P = 'BUS1006001'
OBJ_ID_P = '4811'
OBJ_TYPE_C = 'KNA1'
OBJ_ID_C = '4712'
OBJ_ID_EXT = ' '
CONTEXT = '0005'
IMPORTING
RETURN = return
ADDRESS_NUMBER = addrnumber
PERSON_NUMBER = persnumber
tables
bapiad3vl = bapiad3vl
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 contact partner data for address number ADDRNUMBER and personnumber PERSNUMBER has now been updated in AB2.

Note
Error messages are in the return structure RETURN.
The valid contact person address number and person number for thetarget system are returned in the ADDRESS_NUMBER und PERSON_NUMBERparameters.
INCLUDE ADDRESS_TSADOBJ_AND_BAPIS OBJECT DOKU ID TX
INCLUDE ADDR_RETURN_CONSNUMBERS OBJECT DOKU ID TX