Fonction SAP BAPI_ADDRESSCONTPART_GETDETAIL - BAPI to read 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_CURRENT_COMM_DATA BAPI4003_1-CURRENTCOM C 1 'X' X Indicator: Only read current status of communication data
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

Paramètre Reférence Long. Facultatif Description
BAPIAD3VL BAPIAD3VL 603 X 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
RETURN BAPIRET2 548 X Message/error return table

Functionality
The address data of the contact person address is determined from thespecified object type and object key.
The address number and the person number in the current system are alsoreturned.

Example
* Read a contact person address:
DATA: objtype_p LIKE bapi4003_1-objtype,
obj_id_p LIKE bapi4003_1-objkey,
objtype_c LIKE bapi4003_1-objtype,
obj_id_c LIKE bapi4003_1-objkey,
obj_id_ext LIKE bapi4003_1-extension,
context LIKE bapi4003_1-context,
address_number LIKE adrc-addrnumber,
person_number LIKE adrp-persnumber,
bapiad3vl LIKE bapiad3vl OCCURS 0,
bapiadtel LIKE bapiadtel OCCURS 0,
bapiadfax LIKE bapiadfax OCCURS 0,
...
bapicomrem LIKE bapicomrem OCCURS 0,
return LIKE bapiret2 OCCURS 0.
* Assign the following object types and object key to the
* customer contact person address:
objtype_p = 'BUS1006001'
obj_id_p =
objtype_c = 'KNA1'
obj_id_c =
obj_id_ext = ' '
context = '0005'
* Change module call
CALL FUNCTION 'BAPI_ADDRCONTPART_CHANGE'
EXPORTING
obj_type_p = objtype
obj_id_p = obj_id
obj_type_c = objtype
obj_id_c = obj_id
obj_id_ext = obj_id_ext
context = context
IMPORTING
address_number = address_number
person_number = person_number
TABLES
bapiad3vl = bapiad3vl
bapiadtel = bapiadtel
...
bapicomrem = bapicomrem
return = return.
* The address data is now in the BAPIAD3VL, ..., BAPICOMREM tables.
* The RETURN table contains all errors and warnings which occurred.
* The address number and the person number are in the ADDRESS_NUMBER
* and PERSON_NUMBER fields.

Notes
The sequence of the communication data in the tables is the serialnumber of the data in the system involved. The same applies to thecommunication comments.
The address number of the person address for the object type and objectkey is returned in the ADDRESS_NUMBER export parameter, the personnumber in the PERSON_NUMBER field.
Processing warnings and errors are in the RETURN table.
INCLUDE ADDRESS_TSADOBJ_AND_BAPIS OBJECT DOKU ID TX