SAP HR_RU_VACATION_FOR_ORDER Function Module for Vacation for order
HR_RU_VACATION_FOR_ORDER is a standard hr ru vacation for order SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Vacation for order 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 ru vacation for order FM, simply by entering the name HR_RU_VACATION_FOR_ORDER into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPADRUPERSON
Program Name: SAPLHRPADRUPERSON
Main Program: SAPLHRPADRUPERSON
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_RU_VACATION_FOR_ORDER 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_RU_VACATION_FOR_ORDER'"Vacation for order.
EXPORTING
PERNR = "Personnel number
BEGDA = "Start Date
MASSN = "Action Type
LANGU = "Language Key
WERKS = "Personnel Area
BTRTL = "Personnel Subarea
* PERSG = "Employee Group
* PERSK = "Employee Subgroup
* IT_MASSN = "
IMPORTING
VBEGDA = "Start Date
VENDDA = "End Date
ABWTG = "Attendance and Absence Days
TABLES
PP0298 = "HR Master Record for Infotype 0298
PP2001 = "HR Time Record: Absences Infotype (2001)
VACATION = "Vacation for order
IMPORTING Parameters details for HR_RU_VACATION_FOR_ORDER
PERNR - Personnel number
Data type: PERNR-PERNROptional: No
Call by Reference: Yes
BEGDA - Start Date
Data type: P0298-BEGDAOptional: No
Call by Reference: Yes
MASSN - Action Type
Data type: P0298-MASSNOptional: No
Call by Reference: Yes
LANGU - Language Key
Data type: SPRSLOptional: No
Call by Reference: Yes
WERKS - Personnel Area
Data type: P0001-WERKSOptional: No
Call by Reference: Yes
BTRTL - Personnel Subarea
Data type: P0001-BTRTLOptional: No
Call by Reference: Yes
PERSG - Employee Group
Data type: PERSGOptional: Yes
Call by Reference: Yes
PERSK - Employee Subgroup
Data type: PERSKOptional: Yes
Call by Reference: Yes
IT_MASSN -
Data type: PRUVA_TT_RMASSNOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for HR_RU_VACATION_FOR_ORDER
VBEGDA - Start Date
Data type: BEGDAOptional: No
Call by Reference: Yes
VENDDA - End Date
Data type: ENDDAOptional: No
Call by Reference: Yes
ABWTG - Attendance and Absence Days
Data type: ABWTGOptional: No
Call by Reference: Yes
TABLES Parameters details for HR_RU_VACATION_FOR_ORDER
PP0298 - HR Master Record for Infotype 0298
Data type: P0298Optional: No
Call by Reference: Yes
PP2001 - HR Time Record: Absences Infotype (2001)
Data type: P2001Optional: No
Call by Reference: Yes
VACATION - Vacation for order
Data type: PRUVACATIONOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_RU_VACATION_FOR_ORDER 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_pernr | TYPE PERNR-PERNR, " | |||
| lt_pp0298 | TYPE STANDARD TABLE OF P0298, " | |||
| lv_vbegda | TYPE BEGDA, " | |||
| lv_begda | TYPE P0298-BEGDA, " | |||
| lt_pp2001 | TYPE STANDARD TABLE OF P2001, " | |||
| lv_vendda | TYPE ENDDA, " | |||
| lv_abwtg | TYPE ABWTG, " | |||
| lv_massn | TYPE P0298-MASSN, " | |||
| lt_vacation | TYPE STANDARD TABLE OF PRUVACATION, " | |||
| lv_langu | TYPE SPRSL, " | |||
| lv_werks | TYPE P0001-WERKS, " | |||
| lv_btrtl | TYPE P0001-BTRTL, " | |||
| lv_persg | TYPE PERSG, " | |||
| lv_persk | TYPE PERSK, " | |||
| lv_it_massn | TYPE PRUVA_TT_RMASSN. " |
|   CALL FUNCTION 'HR_RU_VACATION_FOR_ORDER' "Vacation for order |
| EXPORTING | ||
| PERNR | = lv_pernr | |
| BEGDA | = lv_begda | |
| MASSN | = lv_massn | |
| LANGU | = lv_langu | |
| WERKS | = lv_werks | |
| BTRTL | = lv_btrtl | |
| PERSG | = lv_persg | |
| PERSK | = lv_persk | |
| IT_MASSN | = lv_it_massn | |
| IMPORTING | ||
| VBEGDA | = lv_vbegda | |
| VENDDA | = lv_vendda | |
| ABWTG | = lv_abwtg | |
| TABLES | ||
| PP0298 | = lt_pp0298 | |
| PP2001 | = lt_pp2001 | |
| VACATION | = lt_vacation | |
| . " HR_RU_VACATION_FOR_ORDER | ||
ABAP code using 7.40 inline data declarations to call FM HR_RU_VACATION_FOR_ORDER
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 PERNR FROM PERNR INTO @DATA(ld_pernr). | ||||
| "SELECT single BEGDA FROM P0298 INTO @DATA(ld_begda). | ||||
| "SELECT single MASSN FROM P0298 INTO @DATA(ld_massn). | ||||
| "SELECT single WERKS FROM P0001 INTO @DATA(ld_werks). | ||||
| "SELECT single BTRTL FROM P0001 INTO @DATA(ld_btrtl). | ||||
Search for further information about these or an SAP related objects