SAP BAPI_ADDRESSPERS_GETDETAIL Function Module for BAPI to read person addresses
BAPI_ADDRESSPERS_GETDETAIL is a standard bapi addresspers 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 person 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 addresspers getdetail FM, simply by entering the name BAPI_ADDRESSPERS_GETDETAIL into the relevant SAP transaction such as SE37 or SE38.
Function Group: SZAL
Program Name: SAPLSZAL
Main Program: SAPLSZAL
Appliation area: S
Release date: 06-Jan-1999
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_ADDRESSPERS_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_ADDRESSPERS_GETDETAIL'"BAPI to read person addresses.
EXPORTING
OBJ_TYPE = "Person object BOR object type
OBJ_ID = "Person object BOR object key
* OBJ_ID_EXT = ' ' "BOR object key extension (GUID)
* CONTEXT = 0 "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
PERSON_NUMBER = "Person number in target system
TABLES
* BAPIAD2VL = "BAPI structure person 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_ADDRESSPERS_GETDETAIL
OBJ_TYPE - Person object BOR object type
Data type: BAPI4002_1-OBJTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJ_ID - Person object BOR object key
Data type: BAPI4002_1-OBJKEYOptional: No
Call by Reference: No ( called with pass by value option)
OBJ_ID_EXT - BOR object key extension (GUID)
Data type: BAPI4002_1-EXTENSIONDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONTEXT - Semantic meaning of the addresses (-> constants)
Data type: BAPI4002_1-CONTEXTOptional: 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: BAPI4002_1-CURRENTCOMDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BAPI_ADDRESSPERS_GETDETAIL
ADDRESS_NUMBER - Address number in target system
Data type: BAPI4002_1-ADDR_NOOptional: No
Call by Reference: No ( called with pass by value option)
PERSON_NUMBER - Person number in target system
Data type: BAPI4002_1-PERS_NOOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_ADDRESSPERS_GETDETAIL
BAPIAD2VL - BAPI structure person address (w/o. comm.)
Data type: BAPIAD2VLOptional: 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_ADDRESSPERS_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 BAPI4002_1-OBJTYPE, " | |||
| lt_bapiad2vl | TYPE STANDARD TABLE OF BAPIAD2VL, " | |||
| lv_address_number | TYPE BAPI4002_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 BAPI4002_1-OBJKEY, " | |||
| lt_bapiadtel | TYPE STANDARD TABLE OF BAPIADTEL, " | |||
| lv_person_number | TYPE BAPI4002_1-PERS_NO, " | |||
| lt_bapiadfax | TYPE STANDARD TABLE OF BAPIADFAX, " | |||
| lv_obj_id_ext | TYPE BAPI4002_1-EXTENSION, " SPACE | |||
| lv_context | TYPE BAPI4002_1-CONTEXT, " 0 | |||
| lt_bapiadttx | TYPE STANDARD TABLE OF BAPIADTTX, " | |||
| lt_bapiadtlx | TYPE STANDARD TABLE OF BAPIADTLX, " | |||
| lv_iv_current_comm_data | TYPE BAPI4002_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_ADDRESSPERS_GETDETAIL' "BAPI to read person 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 | |
| PERSON_NUMBER | = lv_person_number | |
| TABLES | ||
| BAPIAD2VL | = lt_bapiad2vl | |
| 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_ADDRESSPERS_GETDETAIL | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_ADDRESSPERS_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 BAPI4002_1 INTO @DATA(ld_obj_type). | ||||
| "SELECT single ADDR_NO FROM BAPI4002_1 INTO @DATA(ld_address_number). | ||||
| "SELECT single OBJKEY FROM BAPI4002_1 INTO @DATA(ld_obj_id). | ||||
| "SELECT single PERS_NO FROM BAPI4002_1 INTO @DATA(ld_person_number). | ||||
| "SELECT single EXTENSION FROM BAPI4002_1 INTO @DATA(ld_obj_id_ext). | ||||
| DATA(ld_obj_id_ext) | = ' '. | |||
| "SELECT single CONTEXT FROM BAPI4002_1 INTO @DATA(ld_context). | ||||
| "SELECT single CURRENTCOM FROM BAPI4002_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