Ansicht
Dokumentation
BAPI_ADDRCONTPART_SAVEREPLICA - BAPI for Inbound Distribution of Contact Person Addresses
Fill RESBD Structure from EBP Component Structure SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3upThis documentation is copyright by SAP AG.
Functionality
The contact person data are determined from the specified organization and person object type and key, and overwritten by the specified current address and communication data. This module is usually called by 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 module ALE_ADDRCONTPART_SAVEREPLICA after the function module MASTERIDOC_CREATE_REQ_ADR3MAS has been called.
When the IDOC arrives in AB2, it is read by the module IDOC_INPUT_ADR3MAS, and its data is passed to
the module BAPI_ADDRCONTPART_SAVEREPLICA. The organization object type OBJ_TYPE_C, the person object
type OBJ_TYPE_P, the organization object key OBJ_ID_C, the person object key OBJ_ID, the object key extension OBJ_ID_EXT, and the context CONTEXT are the same as in the source system.
For example, values are assigned as follows in the company address of a customer 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 person number 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 the target system are returned in the ADDRESS_NUMBER und PERSON_NUMBER parameters. target system are returned in the ADDRESS_NUMBER und PERSON_NUMBER parameters.
To be able to use this function module, the System needs to associate the BOR object types to be used to their addresses.
The table TSADOBJ must contain the BOR object type application tables and address reference fields. The address reference read callback function module must be in table TSADRV.
If TSADOBJ and TSADRV do not contain these entries, the function module puts a message in the error table RETURN, and the BOR object address cannot be processed.
The result is returned in the communication data transfer structures BAPIADTEL, BAPIADFAX, ... , BAPIADPAG
and their comment transfer structure BAPICOMREM, if no exception error ('E') occurred in the BAPI processing.
So if a communication address has been processed, BAPIAD* contains the data as they are in the database, or would be after the next COMMIT.
For example the field 'TEL_NO' is filled with a complete telephone number. More importantly, the communication
address serial numbers used are also returned. This is particularly useful for new communication addresses.
If a communication address or comment could not be processed, the error flag 'ERRORFLAG' is set to 'X' and the serial number 'CONSNUMBER' to '000' in its row in the BAPIAD* structure.
Parameters
ADDRESS_NUMBERBAPIAD3VL
BAPIADFAX
BAPIADPAG
BAPIADPRT
BAPIADRFC
BAPIADRML
BAPIADSMTP
BAPIADSSF
BAPIADTEL
BAPIADTLX
BAPIADTTX
BAPIADURI
BAPIADUSE
BAPIADX400
BAPICOMREM
CONTEXT
IV_CHECK_ADDRESS
IV_TIME_DEPENDENT_COMM_DATA
OBJ_ID_C
OBJ_ID_EXT
OBJ_ID_P
OBJ_TYPE_C
OBJ_TYPE_P
PERSON_NUMBER
RETURN
Exceptions
Function Group
SZAMVendor Master (General Section) ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 7860 Date: 20240523 Time: 105214 sap01-206 ( 83 ms )