SAP HRF_READ_ORG_UNIT Function Module for









HRF_READ_ORG_UNIT is a standard hrf read org unit SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 hrf read org unit FM, simply by entering the name HRF_READ_ORG_UNIT into the relevant SAP transaction such as SE37 or SE38.

Function Group: HRF_READ_STARS
Program Name: SAPLHRF_READ_STARS
Main Program: SAPLHRF_READ_STARS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function HRF_READ_ORG_UNIT 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 'HRF_READ_ORG_UNIT'"
EXPORTING
MS_DATA = "MetaStar line
* PAYROLL_INTER_PERSON = "Structure for Payroll Result: international (Person)
* PAYROLL_NAT_PERSON = "
* PAY_HEADER = "Headers for Payroll Result for PNP Payroll
* TIM_B2 = "Data Tables From Cluster B2
LANGUAGE = "SAP System, Current Language
* SELECTIONS = "HR Forms: Direct selections to Func. Modules
* FORM_OUTPUT_SELECTION = "HR Forms: Output Options
* PERSON = "PNP CE: Person
* PERNR = "Personnel Number
* PAYROLL_EVP = "Cluster Directory (For Export and Import of Payroll Results)
* CLUSTER_DIR = "Directory of Payroll Results
* PAYROLL_INTER = "Object for payroll result: International
* PAYROLL_NAT = "
* GROUP_RGDIR = "RGDIR of Person Results for a Group of PERAS
* GROUP_RGDIRS = "Table that contains all RGDIRs of a group

IMPORTING
ORG_UNIT = "Organizational Unit
TEXT = "Organizational Unit Text

EXCEPTIONS
DISPLAY_ERROR = 1 REJECT_PERNR = 2
.



IMPORTING Parameters details for HRF_READ_ORG_UNIT

MS_DATA - MetaStar line

Data type: ANY
Optional: No
Call by Reference: Yes

PAYROLL_INTER_PERSON - Structure for Payroll Result: international (Person)

Data type: PAY99_PERSON
Optional: Yes
Call by Reference: Yes

PAYROLL_NAT_PERSON -

Data type: ANY
Optional: Yes
Call by Reference: Yes

PAY_HEADER - Headers for Payroll Result for PNP Payroll

Data type: PAYROLL_HEADER
Optional: Yes
Call by Reference: Yes

TIM_B2 - Data Tables From Cluster B2

Data type: HRF_TIM_B2
Optional: Yes
Call by Reference: Yes

LANGUAGE - SAP System, Current Language

Data type: SYLANGU
Optional: No
Call by Reference: Yes

SELECTIONS - HR Forms: Direct selections to Func. Modules

Data type: HRF_T_SELTOFUN
Optional: Yes
Call by Reference: Yes

FORM_OUTPUT_SELECTION - HR Forms: Output Options

Data type: HRF02_FORM_OUTPUT_SELECTION
Optional: Yes
Call by Reference: Yes

PERSON - PNP CE: Person

Data type: PCCE_PNP_PERSON
Optional: Yes
Call by Reference: Yes

PERNR - Personnel Number

Data type: P_PERNR
Optional: Yes
Call by Reference: Yes

PAYROLL_EVP - Cluster Directory (For Export and Import of Payroll Results)

Data type: PC261
Optional: Yes
Call by Reference: Yes

CLUSTER_DIR - Directory of Payroll Results

Data type: HRPY_TT_RGDIR
Optional: Yes
Call by Reference: Yes

PAYROLL_INTER - Object for payroll result: International

Data type: PAY99_INTERNATIONAL
Optional: Yes
Call by Reference: Yes

PAYROLL_NAT -

Data type: ANY
Optional: Yes
Call by Reference: Yes

GROUP_RGDIR - RGDIR of Person Results for a Group of PERAS

Data type: HRPAY99_GROUP_RGDIR_T
Optional: Yes
Call by Reference: Yes

GROUP_RGDIRS - Table that contains all RGDIRs of a group

Data type: PCCE_T_GROUP_RGDIRS
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for HRF_READ_ORG_UNIT

ORG_UNIT - Organizational Unit

Data type: ORGEH
Optional: No
Call by Reference: Yes

TEXT - Organizational Unit Text

Data type: ORGTX
Optional: No
Call by Reference: Yes

EXCEPTIONS details

DISPLAY_ERROR - Error message is displayed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

REJECT_PERNR - Personnel number rejected

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for HRF_READ_ORG_UNIT 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_ms_data  TYPE ANY, "   
lv_org_unit  TYPE ORGEH, "   
lv_display_error  TYPE ORGEH, "   
lv_payroll_inter_person  TYPE PAY99_PERSON, "   
lv_payroll_nat_person  TYPE ANY, "   
lv_pay_header  TYPE PAYROLL_HEADER, "   
lv_tim_b2  TYPE HRF_TIM_B2, "   
lv_language  TYPE SYLANGU, "   
lv_selections  TYPE HRF_T_SELTOFUN, "   
lv_form_output_selection  TYPE HRF02_FORM_OUTPUT_SELECTION, "   
lv_text  TYPE ORGTX, "   
lv_person  TYPE PCCE_PNP_PERSON, "   
lv_reject_pernr  TYPE PCCE_PNP_PERSON, "   
lv_pernr  TYPE P_PERNR, "   
lv_payroll_evp  TYPE PC261, "   
lv_cluster_dir  TYPE HRPY_TT_RGDIR, "   
lv_payroll_inter  TYPE PAY99_INTERNATIONAL, "   
lv_payroll_nat  TYPE ANY, "   
lv_group_rgdir  TYPE HRPAY99_GROUP_RGDIR_T, "   
lv_group_rgdirs  TYPE PCCE_T_GROUP_RGDIRS. "   

  CALL FUNCTION 'HRF_READ_ORG_UNIT'  "
    EXPORTING
         MS_DATA = lv_ms_data
         PAYROLL_INTER_PERSON = lv_payroll_inter_person
         PAYROLL_NAT_PERSON = lv_payroll_nat_person
         PAY_HEADER = lv_pay_header
         TIM_B2 = lv_tim_b2
         LANGUAGE = lv_language
         SELECTIONS = lv_selections
         FORM_OUTPUT_SELECTION = lv_form_output_selection
         PERSON = lv_person
         PERNR = lv_pernr
         PAYROLL_EVP = lv_payroll_evp
         CLUSTER_DIR = lv_cluster_dir
         PAYROLL_INTER = lv_payroll_inter
         PAYROLL_NAT = lv_payroll_nat
         GROUP_RGDIR = lv_group_rgdir
         GROUP_RGDIRS = lv_group_rgdirs
    IMPORTING
         ORG_UNIT = lv_org_unit
         TEXT = lv_text
    EXCEPTIONS
        DISPLAY_ERROR = 1
        REJECT_PERNR = 2
. " HRF_READ_ORG_UNIT




ABAP code using 7.40 inline data declarations to call FM HRF_READ_ORG_UNIT

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.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!