SAP BAPI_ADDRESSORG_GETDETAIL Function Module for BAPI to Read Organization Addresses
BAPI_ADDRESSORG_GETDETAIL is a standard bapi addressorg getdetail SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI to Read Organization Addresses processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for bapi addressorg getdetail FM, simply by entering the name BAPI_ADDRESSORG_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: SZAK
Program Name: SAPLSZAK
Main Program: SAPLSZAK
Appliation area: S
Release date: 06-Jan-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_ADDRESSORG_GETDETAIL pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'BAPI_ADDRESSORG_GETDETAIL'"BAPI to Read Organization Addresses.
EXPORTING
OBJ_TYPE = "Address owner BOR object type
OBJ_ID = "Address owner BOR object key
* OBJ_ID_EXT = ' ' "BOR object key extension (GUID)
* CONTEXT = 1 "Semantic meaning of the addresses (-> constants)
* IV_CURRENT_COMM_DATA = 'X' "Indicator: Only read current status of communication data
IMPORTING
ADDRESS_NUMBER = "Address number in target system
TABLES
* BAPIAD1VL = "BAPI structure company address (w/o. comm.)
* BAPIADPRT = "BAPI structure printer addresses
* BAPIADSSF = "BAPI structure SSF addresses
* BAPIADURI = "BAPI structure URI addresses
* BAPIADPAG = "BAPI structure pager numbers
* BAPIAD_REM = "BAPI structure address comments
* BAPICOMREM = "BAPI Structure Communication Comments
* BAPIADUSE = "BAPI Structure for Communication Usages (BAS)
* RETURN = "Message/error return table
* BAPIADTEL = "BAPI structure telephone numbers
* BAPIADFAX = "BAPI structure fax numbers
* BAPIADTTX = "BAPI structure teletex numbers
* BAPIADTLX = "BAPI structure telex numbers
* BAPIADSMTP = "BAPI structure internet addresses
* BAPIADRML = "BAPI structure R/Mail addresses
* BAPIADX400 = "BAPI structure X400 addresses
* BAPIADRFC = "BAPI structure RFC addresses
IMPORTING Parameters details for BAPI_ADDRESSORG_GETDETAIL
OBJ_TYPE - Address owner BOR object type
Data type: BAPI4001_1-OBJTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJ_ID - Address owner BOR object key
Data type: BAPI4001_1-OBJKEYOptional: No
Call by Reference: No ( called with pass by value option)
OBJ_ID_EXT - BOR object key extension (GUID)
Data type: BAPI4001_1-EXTENSIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONTEXT - Semantic meaning of the addresses (-> constants)
Data type: BAPI4001_1-CONTEXTDefault: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_CURRENT_COMM_DATA - Indicator: Only read current status of communication data
Data type: BAPI4001_1-CURRENTCOMDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_ADDRESSORG_GETDETAIL
ADDRESS_NUMBER - Address number in target system
Data type: BAPI4001_1-ADDR_NOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_ADDRESSORG_GETDETAIL
BAPIAD1VL - BAPI structure company address (w/o. comm.)
Data type: BAPIAD1VLOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADPRT - BAPI structure printer addresses
Data type: BAPIADPRTOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADSSF - BAPI structure SSF addresses
Data type: BAPIADSSFOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADURI - BAPI structure URI addresses
Data type: BAPIADURIOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADPAG - BAPI structure pager numbers
Data type: BAPIADPAGOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIAD_REM - BAPI structure address comments
Data type: BAPIAD_REMOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPICOMREM - BAPI Structure Communication Comments
Data type: BAPICOMREMOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADUSE - BAPI Structure for Communication Usages (BAS)
Data type: BAPIADUSEOptional: Yes
Call by Reference: Yes
RETURN - Message/error return table
Data type: BAPIRET2Optional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADTEL - BAPI structure telephone numbers
Data type: BAPIADTELOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADFAX - BAPI structure fax numbers
Data type: BAPIADFAXOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADTTX - BAPI structure teletex numbers
Data type: BAPIADTTXOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADTLX - BAPI structure telex numbers
Data type: BAPIADTLXOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADSMTP - BAPI structure internet addresses
Data type: BAPIADSMTPOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADRML - BAPI structure R/Mail addresses
Data type: BAPIADRMLOptional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADX400 - BAPI structure X400 addresses
Data type: BAPIADX400Optional: Yes
Call by Reference: No ( called with pass by value option)
BAPIADRFC - BAPI structure RFC addresses
Data type: BAPIADRFCOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BAPI_ADDRESSORG_GETDETAIL Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_obj_type | TYPE BAPI4001_1-OBJTYPE, " | |||
| lt_bapiad1vl | TYPE STANDARD TABLE OF BAPIAD1VL, " | |||
| lv_address_number | TYPE BAPI4001_1-ADDR_NO, " | |||
| lt_bapiadprt | TYPE STANDARD TABLE OF BAPIADPRT, " | |||
| lt_bapiadssf | TYPE STANDARD TABLE OF BAPIADSSF, " | |||
| lt_bapiaduri | TYPE STANDARD TABLE OF BAPIADURI, " | |||
| lt_bapiadpag | TYPE STANDARD TABLE OF BAPIADPAG, " | |||
| lt_bapiad_rem | TYPE STANDARD TABLE OF BAPIAD_REM, " | |||
| lt_bapicomrem | TYPE STANDARD TABLE OF BAPICOMREM, " | |||
| lt_bapiaduse | TYPE STANDARD TABLE OF BAPIADUSE, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_obj_id | TYPE BAPI4001_1-OBJKEY, " | |||
| lt_bapiadtel | TYPE STANDARD TABLE OF BAPIADTEL, " | |||
| lt_bapiadfax | TYPE STANDARD TABLE OF BAPIADFAX, " | |||
| lv_obj_id_ext | TYPE BAPI4001_1-EXTENSION, " SPACE | |||
| lv_context | TYPE BAPI4001_1-CONTEXT, " 1 | |||
| lt_bapiadttx | TYPE STANDARD TABLE OF BAPIADTTX, " | |||
| lt_bapiadtlx | TYPE STANDARD TABLE OF BAPIADTLX, " | |||
| lv_iv_current_comm_data | TYPE BAPI4001_1-CURRENTCOM, " 'X' | |||
| lt_bapiadsmtp | TYPE STANDARD TABLE OF BAPIADSMTP, " | |||
| lt_bapiadrml | TYPE STANDARD TABLE OF BAPIADRML, " | |||
| lt_bapiadx400 | TYPE STANDARD TABLE OF BAPIADX400, " | |||
| lt_bapiadrfc | TYPE STANDARD TABLE OF BAPIADRFC. " |
|   CALL FUNCTION 'BAPI_ADDRESSORG_GETDETAIL' "BAPI to Read Organization Addresses |
| EXPORTING | ||
| OBJ_TYPE | = lv_obj_type | |
| OBJ_ID | = lv_obj_id | |
| OBJ_ID_EXT | = lv_obj_id_ext | |
| CONTEXT | = lv_context | |
| IV_CURRENT_COMM_DATA | = lv_iv_current_comm_data | |
| IMPORTING | ||
| ADDRESS_NUMBER | = lv_address_number | |
| TABLES | ||
| BAPIAD1VL | = lt_bapiad1vl | |
| BAPIADPRT | = lt_bapiadprt | |
| BAPIADSSF | = lt_bapiadssf | |
| BAPIADURI | = lt_bapiaduri | |
| BAPIADPAG | = lt_bapiadpag | |
| BAPIAD_REM | = lt_bapiad_rem | |
| BAPICOMREM | = lt_bapicomrem | |
| BAPIADUSE | = lt_bapiaduse | |
| RETURN | = lt_return | |
| BAPIADTEL | = lt_bapiadtel | |
| BAPIADFAX | = lt_bapiadfax | |
| BAPIADTTX | = lt_bapiadttx | |
| BAPIADTLX | = lt_bapiadtlx | |
| BAPIADSMTP | = lt_bapiadsmtp | |
| BAPIADRML | = lt_bapiadrml | |
| BAPIADX400 | = lt_bapiadx400 | |
| BAPIADRFC | = lt_bapiadrfc | |
| . " BAPI_ADDRESSORG_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_ADDRESSORG_GETDETAIL
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| "SELECT single OBJTYPE FROM BAPI4001_1 INTO @DATA(ld_obj_type). | ||||
| "SELECT single ADDR_NO FROM BAPI4001_1 INTO @DATA(ld_address_number). | ||||
| "SELECT single OBJKEY FROM BAPI4001_1 INTO @DATA(ld_obj_id). | ||||
| "SELECT single EXTENSION FROM BAPI4001_1 INTO @DATA(ld_obj_id_ext). | ||||
| DATA(ld_obj_id_ext) | = ' '. | |||
| "SELECT single CONTEXT FROM BAPI4001_1 INTO @DATA(ld_context). | ||||
| DATA(ld_context) | = 1. | |||
| "SELECT single CURRENTCOM FROM BAPI4001_1 INTO @DATA(ld_iv_current_comm_data). | ||||
| DATA(ld_iv_current_comm_data) | = 'X'. | |||
Search for further information about these or an SAP related objects