Fonction SAP BAPI_ADDRESSORG_GETDETAIL - BAPI to Read Organization Addresses

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTEXT BAPI4001_1-CONTEXT N 4 1 X Semantic meaning of the addresses (-> constants)
IV_CURRENT_COMM_DATA BAPI4001_1-CURRENTCOM C 1 'X' X Indicator: Only read current status of communication data
OBJ_ID BAPI4001_1-OBJKEY C 70 Address owner BOR object key
OBJ_ID_EXT BAPI4001_1-EXTENSION C 70 SPACE X BOR object key extension (GUID)
OBJ_TYPE BAPI4001_1-OBJTYPE C 10 Address owner BOR object type

Paramètre Reférence Type Long. Description
ADDRESS_NUMBER BAPI4001_1-ADDR_NO C 10 Address number in target system

Paramètre Reférence Long. Facultatif Description
BAPIAD1VL BAPIAD1VL 1126 X BAPI structure company 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
BAPIAD_REM BAPIAD_REM 55 X BAPI structure address comments
BAPICOMREM BAPICOMREM 60 X BAPI Structure Communication Comments
RETURN BAPIRET2 548 X Message/error return table

Functionality
The address data of the organization address for the specified objecttype and key is returned.
The address number used in the current system is also returned.

Example
* Read an organization address:
DATA: objtype LIKE bapi4001_1-objtype,
obj_id LIKE bapi4001_1-objkey,
obj_id_ext LIKE bapi4001_1-extension,
context LIKE bapi4001_1-context,
address_number LIKE adrc-addrnumber,
bapiad1vl LIKE bapiad1vl 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 main customer address object type and key
objtype = 'KNA1'.
obj_id = .
obj_id_ext = ' '.
context = '0001'.
* call GetDetail module
CALL FUNCTION 'BAPI_ADDRESSORG_GETDETAIL'
EXPORTING
obj_type = objtype
obj_id = obj_id
obj_id_ext = obj_id_ext
context = context
IMPORTING
address_number = address_number
TABLES
bapiad1vl = bapiad1vl
bapiadtel = bapiadtel
...
bapicomrem = bapicomrem
return = return.
* The address data are now in the tables BAPIAD1VL, ..., BAPICOMREM.
* The table RETURN contains all processing errors and warnings. The
* address number is in the field ADDRESS_NUMBER.

Notes
The sequence of the communication data and comments in the tables isthe serial numbers of the data in the specified system.
The organization address number for the object type and key is returnedin the export parameter ADDRESS_NUMBER.
Processing warnings and errors are in the table RETURN.
INCLUDE ADDRESS_TSADOBJ_AND_BAPIS OBJECT DOKU ID TX