Ansicht
Dokumentation

BAPI_ADDRESSPERS_SAVEREPLICA - BAPI for Inbound Distribution of Private Addresses

BAPI_ADDRESSPERS_SAVEREPLICA - BAPI for Inbound Distribution of Private Addresses

Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

The person address is determined from the specified 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_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 module ALE_ADDRESSPERS_SAVEREPLICA after the function module MASTERIDOC_CREATE_REQ_ADR2MAS has been called.
When the IDOC arrives in AB2, it is read by the module IDOC_INPUT_ADR2MAS, and its data are passed to the module BAPI_ADDRESSPERS_SAVEREPLICA. The object type OBJ_TYPE, the 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 private customer contact 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 number PERSNUMBER 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 returned in the ADDRESS_NUMBER and 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_NUMBER
BAPIAD2VL
BAPIADFAX
BAPIADPAG
BAPIADPRT
BAPIADRFC
BAPIADRML
BAPIADSMTP
BAPIADSSF
BAPIADTEL
BAPIADTLX
BAPIADTTX
BAPIADURI
BAPIADUSE
BAPIADX400
BAPIAD_REM
BAPICOMREM
CONTEXT
IV_CHECK_ADDRESS
IV_TIME_DEPENDENT_COMM_DATA
OBJ_ID
OBJ_ID_EXT
OBJ_TYPE
PERSON_NUMBER
RETURN

Exceptions

Function Group

SZAL

RFUMSV00 - Advance Return for Tax on Sales/Purchases   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 7355 Date: 20240523 Time: 104106     sap01-206 ( 80 ms )