SAP HR_PL_DISTRICT_GET_NAME Function Module for retrieve district name
HR_PL_DISTRICT_GET_NAME is a standard hr pl district get name SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for retrieve district name 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 pl district get name FM, simply by entering the name HR_PL_DISTRICT_GET_NAME into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPAYPLADDR
Program Name: SAPLHRPAYPLADDR
Main Program: SAPLHRPAYPLADDR
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_PL_DISTRICT_GET_NAME 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_PL_DISTRICT_GET_NAME'"retrieve district name.
EXPORTING
* SPRAS = 'L' "
* LAND1 = 'PL' "
REGIO = "
COUNC = "
TERY2 = "
* DISTRICT_MODE = '00' "
* DISTRICT_PROP = "
IMPORTING
DISTRICT_NAME = "
EXCEPTIONS
DISCTRICT_NOT_FOUND = 1
IMPORTING Parameters details for HR_PL_DISTRICT_GET_NAME
SPRAS -
Data type: T002-SPRASDefault: 'L'
Optional: Yes
Call by Reference: No ( called with pass by value option)
LAND1 -
Data type: T7PLE3-LAND1Default: 'PL'
Optional: Yes
Call by Reference: No ( called with pass by value option)
REGIO -
Data type: T7PLE3-REGIOOptional: No
Call by Reference: No ( called with pass by value option)
COUNC -
Data type: T7PLE3-COUNCOptional: No
Call by Reference: No ( called with pass by value option)
TERY2 -
Data type: T7PLE3-TERY2Optional: No
Call by Reference: No ( called with pass by value option)
DISTRICT_MODE -
Data type: T7PLE3-TERSRDefault: '00'
Optional: Yes
Call by Reference: No ( called with pass by value option)
DISTRICT_PROP -
Data type: CHAR40Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_PL_DISTRICT_GET_NAME
DISTRICT_NAME -
Data type: CHAR40Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DISCTRICT_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_PL_DISTRICT_GET_NAME 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_spras | TYPE T002-SPRAS, " 'L' | |||
lv_district_name | TYPE CHAR40, " | |||
lv_disctrict_not_found | TYPE CHAR40, " | |||
lv_land1 | TYPE T7PLE3-LAND1, " 'PL' | |||
lv_regio | TYPE T7PLE3-REGIO, " | |||
lv_counc | TYPE T7PLE3-COUNC, " | |||
lv_tery2 | TYPE T7PLE3-TERY2, " | |||
lv_district_mode | TYPE T7PLE3-TERSR, " '00' | |||
lv_district_prop | TYPE CHAR40. " |
  CALL FUNCTION 'HR_PL_DISTRICT_GET_NAME' "retrieve district name |
EXPORTING | ||
SPRAS | = lv_spras | |
LAND1 | = lv_land1 | |
REGIO | = lv_regio | |
COUNC | = lv_counc | |
TERY2 | = lv_tery2 | |
DISTRICT_MODE | = lv_district_mode | |
DISTRICT_PROP | = lv_district_prop | |
IMPORTING | ||
DISTRICT_NAME | = lv_district_name | |
EXCEPTIONS | ||
DISCTRICT_NOT_FOUND = 1 | ||
. " HR_PL_DISTRICT_GET_NAME |
ABAP code using 7.40 inline data declarations to call FM HR_PL_DISTRICT_GET_NAME
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 SPRAS FROM T002 INTO @DATA(ld_spras). | ||||
DATA(ld_spras) | = 'L'. | |||
"SELECT single LAND1 FROM T7PLE3 INTO @DATA(ld_land1). | ||||
DATA(ld_land1) | = 'PL'. | |||
"SELECT single REGIO FROM T7PLE3 INTO @DATA(ld_regio). | ||||
"SELECT single COUNC FROM T7PLE3 INTO @DATA(ld_counc). | ||||
"SELECT single TERY2 FROM T7PLE3 INTO @DATA(ld_tery2). | ||||
"SELECT single TERSR FROM T7PLE3 INTO @DATA(ld_district_mode). | ||||
DATA(ld_district_mode) | = '00'. | |||
Search for further information about these or an SAP related objects