SAP RH_CHECK_WHEN_BOOKING Function Module for
RH_CHECK_WHEN_BOOKING is a standard rh check when booking 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 rh check when booking FM, simply by entering the name RH_CHECK_WHEN_BOOKING into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHPV
Program Name: SAPLRHPV
Main Program: SAPLRHPV
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RH_CHECK_WHEN_BOOKING 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 'RH_CHECK_WHEN_BOOKING'".
EXPORTING
EVENT_DATA = "
* WITH_EXT_LO = 'X' "
* I_MODE = 'A' "
* FCODE = "
ATTEND_DATA = "
* P_PRIO = "
* EXCL_EVEID = "
* WITH_AUTH = 'X' "
* WITH_PART_FREE = 'X' "
* WITH_VV_FREE = 'X' "
* WITH_PREREQ = 'X' "
* WITH_EXT_CO = 'X' "
IMPORTING
AUTH_FAILED = "
PART_FREE_FAILED = "
VV_FREE_FAILED = "
PREREQ_FAILED = "
EXT_CO_FAILED = "
EXT_LO_FAILED = "
TABLES
ET_MESS = "
EXCEPTIONS
WRONG_INPUT_DATA = 1
IMPORTING Parameters details for RH_CHECK_WHEN_BOOKING
EVENT_DATA -
Data type: HRVEVDATOptional: No
Call by Reference: No ( called with pass by value option)
WITH_EXT_LO -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_MODE -
Data type:Default: 'A'
Optional: Yes
Call by Reference: Yes
FCODE -
Data type: FCODEOptional: Yes
Call by Reference: Yes
ATTEND_DATA -
Data type: HRSOBIDOptional: No
Call by Reference: Yes
P_PRIO -
Data type: HRVP002-P_PRIOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCL_EVEID -
Data type: HRVPV-EVEIDOptional: Yes
Call by Reference: Yes
WITH_AUTH -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PART_FREE -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_VV_FREE -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_PREREQ -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
WITH_EXT_CO -
Data type: FLAG_XDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_CHECK_WHEN_BOOKING
AUTH_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
PART_FREE_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
VV_FREE_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
PREREQ_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
EXT_CO_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
EXT_LO_FAILED -
Data type: FLAG_XOptional: No
Call by Reference: Yes
TABLES Parameters details for RH_CHECK_WHEN_BOOKING
ET_MESS -
Data type: SYMSGOptional: No
Call by Reference: Yes
EXCEPTIONS details
WRONG_INPUT_DATA -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RH_CHECK_WHEN_BOOKING 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: | ||||
| lt_et_mess | TYPE STANDARD TABLE OF SYMSG, " | |||
| lv_event_data | TYPE HRVEVDAT, " | |||
| lv_auth_failed | TYPE FLAG_X, " | |||
| lv_wrong_input_data | TYPE FLAG_X, " | |||
| lv_with_ext_lo | TYPE FLAG_X, " 'X' | |||
| lv_i_mode | TYPE FLAG_X, " 'A' | |||
| lv_fcode | TYPE FCODE, " | |||
| lv_attend_data | TYPE HRSOBID, " | |||
| lv_part_free_failed | TYPE FLAG_X, " | |||
| lv_p_prio | TYPE HRVP002-P_PRIO, " | |||
| lv_vv_free_failed | TYPE FLAG_X, " | |||
| lv_excl_eveid | TYPE HRVPV-EVEID, " | |||
| lv_prereq_failed | TYPE FLAG_X, " | |||
| lv_with_auth | TYPE FLAG_X, " 'X' | |||
| lv_ext_co_failed | TYPE FLAG_X, " | |||
| lv_ext_lo_failed | TYPE FLAG_X, " | |||
| lv_with_part_free | TYPE FLAG_X, " 'X' | |||
| lv_with_vv_free | TYPE FLAG_X, " 'X' | |||
| lv_with_prereq | TYPE FLAG_X, " 'X' | |||
| lv_with_ext_co | TYPE FLAG_X. " 'X' |
|   CALL FUNCTION 'RH_CHECK_WHEN_BOOKING' " |
| EXPORTING | ||
| EVENT_DATA | = lv_event_data | |
| WITH_EXT_LO | = lv_with_ext_lo | |
| I_MODE | = lv_i_mode | |
| FCODE | = lv_fcode | |
| ATTEND_DATA | = lv_attend_data | |
| P_PRIO | = lv_p_prio | |
| EXCL_EVEID | = lv_excl_eveid | |
| WITH_AUTH | = lv_with_auth | |
| WITH_PART_FREE | = lv_with_part_free | |
| WITH_VV_FREE | = lv_with_vv_free | |
| WITH_PREREQ | = lv_with_prereq | |
| WITH_EXT_CO | = lv_with_ext_co | |
| IMPORTING | ||
| AUTH_FAILED | = lv_auth_failed | |
| PART_FREE_FAILED | = lv_part_free_failed | |
| VV_FREE_FAILED | = lv_vv_free_failed | |
| PREREQ_FAILED | = lv_prereq_failed | |
| EXT_CO_FAILED | = lv_ext_co_failed | |
| EXT_LO_FAILED | = lv_ext_lo_failed | |
| TABLES | ||
| ET_MESS | = lt_et_mess | |
| EXCEPTIONS | ||
| WRONG_INPUT_DATA = 1 | ||
| . " RH_CHECK_WHEN_BOOKING | ||
ABAP code using 7.40 inline data declarations to call FM RH_CHECK_WHEN_BOOKING
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.| DATA(ld_with_ext_lo) | = 'X'. | |||
| DATA(ld_i_mode) | = 'A'. | |||
| "SELECT single P_PRIO FROM HRVP002 INTO @DATA(ld_p_prio). | ||||
| "SELECT single EVEID FROM HRVPV INTO @DATA(ld_excl_eveid). | ||||
| DATA(ld_with_auth) | = 'X'. | |||
| DATA(ld_with_part_free) | = 'X'. | |||
| DATA(ld_with_vv_free) | = 'X'. | |||
| DATA(ld_with_prereq) | = 'X'. | |||
| DATA(ld_with_ext_co) | = 'X'. | |||
Search for further information about these or an SAP related objects