SAP HR_GET_ADDRESS Function Module for HR ADR: Read Address from T536C -> ADRV
HR_GET_ADDRESS is a standard hr get address SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for HR ADR: Read Address from T536C -> ADRV 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 hr get address FM, simply by entering the name HR_GET_ADDRESS into the relevant SAP transaction such as SE37 or SE38.
Function Group: 0P0A
Program Name: SAPL0P0A
Main Program:
Appliation area: P
Release date: 01-Sep-1999
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_GET_ADDRESS 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 'HR_GET_ADDRESS'"HR ADR: Read Address from T536C -> ADRV.
EXPORTING
ANKEY = "Address Key
ANART = "Address Type
MOLGA = "Country Indicator
IMPORTING
ADDRESS = "Address Structure
ADDRESS_DETAIL = "Detailed Address Including Telephone Number
ADDRESS_COMP = "Additional Address Information incl. email
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for HR_GET_ADDRESS
ANKEY - Address Key
Data type: T536C-ANKEYOptional: No
Call by Reference: No ( called with pass by value option)
ANART - Address Type
Data type: T536C-ANARTOptional: No
Call by Reference: No ( called with pass by value option)
MOLGA - Country Indicator
Data type: T536C-MOLGAOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_GET_ADDRESS
ADDRESS - Address Structure
Data type: ADRSOptional: No
Call by Reference: No ( called with pass by value option)
ADDRESS_DETAIL - Detailed Address Including Telephone Number
Data type: SADROptional: No
Call by Reference: No ( called with pass by value option)
ADDRESS_COMP - Additional Address Information incl. email
Data type: HRADDRESS_COMPOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_GET_ADDRESS 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_ankey | TYPE T536C-ANKEY, " | |||
| lv_address | TYPE ADRS, " | |||
| lv_not_found | TYPE ADRS, " | |||
| lv_anart | TYPE T536C-ANART, " | |||
| lv_address_detail | TYPE SADR, " | |||
| lv_molga | TYPE T536C-MOLGA, " | |||
| lv_address_comp | TYPE HRADDRESS_COMP. " |
|   CALL FUNCTION 'HR_GET_ADDRESS' "HR ADR: Read Address from T536C -> ADRV |
| EXPORTING | ||
| ANKEY | = lv_ankey | |
| ANART | = lv_anart | |
| MOLGA | = lv_molga | |
| IMPORTING | ||
| ADDRESS | = lv_address | |
| ADDRESS_DETAIL | = lv_address_detail | |
| ADDRESS_COMP | = lv_address_comp | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " HR_GET_ADDRESS | ||
ABAP code using 7.40 inline data declarations to call FM HR_GET_ADDRESS
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 ANKEY FROM T536C INTO @DATA(ld_ankey). | ||||
| "SELECT single ANART FROM T536C INTO @DATA(ld_anart). | ||||
| "SELECT single MOLGA FROM T536C INTO @DATA(ld_molga). | ||||
Search for further information about these or an SAP related objects