Functionality The person address is determined from the specified object type andkey, and overwritten by the specified current address and communicationdata. This module is usually called by the ALE function moduleIDOC_INPUT_ADR2MAS. Example * Replicate a person address: copy the current status in the * AB1 system to AB2 An ALE IDOC is created and distributed in AB1 by the moduleALE_ADDRESSPERS_SAVEREPLICA after the function moduleMASTERIDOC_CREATE_REQ_ADR2MAS has been called. When the IDOC arrives in AB2, it is read by the moduleIDOC_INPUT_ADR2MAS, and its data are passed to the moduleBAPI_ADDRESSPERS_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 private customercontact person address: Object type: 'BUS1006001' Object key: (extension empty): ' ' context: '0004' The module call is as follows: DATA: bapiad2vl like bapiad2vl 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_ADDRESSPERS_SAVEREPLICA' EXPORTING obj_type = 'BUS1006001' obj_id = '4712' OBJ_ID_EXT = ' ' CONTEXT = '0004' IMPORTING RETURN = return ADDRESS_NUMBER = addrnumber PERSON_NUMBER = persnumber tables bapiad2vl = bapiad2vl BAPIADTEL = bapiadtel BAPIADFAX = bapiadfax BAPIADTTX = bapiadttx BAPIADTLX = bapiadtlx BAPIADSMTP = bapiadsmtp BAPIADRML = bapiadrml BAPIADX400 = bapiadx400 BAPIADRFC = bapiadrfc BAPIADPRT = bapiadprt BAPIADSSF = bapiadssf BAPIADURI = bapiaduri BAPIADPAG = bapiadpag BAPIAD_REM = bapiadrem BAPICOMREM = bapicomrem. IF NOT RETURN IS INITIAL. ... ENDIF. The person data for address number ADDRNUMBER and person numberPERSNUMBER has now been updated in AB2.Note Error messages are in the return structure RETURN. The valid address and person number for the target system are returnedin the ADDRESS_NUMBER and PERSON_NUMBER parameters. INCLUDE ADDRESS_TSADOBJ_AND_BAPIS OBJECT DOKU ID TX INCLUDE ADDR_RETURN_CONSNUMBERS OBJECT DOKU ID TX |