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

Function RH_BLOCK_UPDATE 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_BLOCK_UPDATE'".
EXPORTING
* UPD_PARTIT = 100 "Partition size for block update
* VTASK = 'D' "Update (B=buffer,D=online,V=update,S=sync)
* BUFFER_UPD = ' ' "Switch with buffer update
* ORDER_FLG = 'X' "Switch: take record sequence into account
* COMMIT_FLG = 'X' "Switch, with COMMIT
* CLEAR_BUFFER = 'X' "Switch delete buffer after update
* KEEP_LUPD = "Retain Last Changed By/On
* WORKF_ACTV = 'X' "Workflow Switch Active
CHANGING
NOOFRECS = "Number of records per update call
EXCEPTIONS
CORR_EXIT = 1
IMPORTING Parameters details for RH_BLOCK_UPDATE
UPD_PARTIT - Partition size for block update
Data type: HRRHAP-UPD_PARTITDefault: 100
Optional: Yes
Call by Reference: No ( called with pass by value option)
VTASK - Update (B=buffer,D=online,V=update,S=sync)
Data type: HRRHAP-VTASKDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BUFFER_UPD - Switch with buffer update
Data type: HRRHAP-BUFFER_UPDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ORDER_FLG - Switch: take record sequence into account
Data type: HRRHAP-ORDER_FLGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
COMMIT_FLG - Switch, with COMMIT
Data type: HRRHAP-COMMIT_FLGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CLEAR_BUFFER - Switch delete buffer after update
Data type: HRRHAP-BUFFER_CLRDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
KEEP_LUPD - Retain Last Changed By/On
Data type: HRRHAP-KEEP_LUPDOptional: Yes
Call by Reference: No ( called with pass by value option)
WORKF_ACTV - Workflow Switch Active
Data type: HRRHAP-WORKF_ACTVDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for RH_BLOCK_UPDATE
NOOFRECS - Number of records per update call
Data type: HRRHAP-NOOFRECSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CORR_EXIT - Error/termination while assigning correction number
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_BLOCK_UPDATE 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_noofrecs | TYPE HRRHAP-NOOFRECS, " | |||
| lv_corr_exit | TYPE HRRHAP, " | |||
| lv_upd_partit | TYPE HRRHAP-UPD_PARTIT, " 100 | |||
| lv_vtask | TYPE HRRHAP-VTASK, " 'D' | |||
| lv_buffer_upd | TYPE HRRHAP-BUFFER_UPD, " SPACE | |||
| lv_order_flg | TYPE HRRHAP-ORDER_FLG, " 'X' | |||
| lv_commit_flg | TYPE HRRHAP-COMMIT_FLG, " 'X' | |||
| lv_clear_buffer | TYPE HRRHAP-BUFFER_CLR, " 'X' | |||
| lv_keep_lupd | TYPE HRRHAP-KEEP_LUPD, " | |||
| lv_workf_actv | TYPE HRRHAP-WORKF_ACTV. " 'X' |
|   CALL FUNCTION 'RH_BLOCK_UPDATE' " |
| EXPORTING | ||
| UPD_PARTIT | = lv_upd_partit | |
| VTASK | = lv_vtask | |
| BUFFER_UPD | = lv_buffer_upd | |
| ORDER_FLG | = lv_order_flg | |
| COMMIT_FLG | = lv_commit_flg | |
| CLEAR_BUFFER | = lv_clear_buffer | |
| KEEP_LUPD | = lv_keep_lupd | |
| WORKF_ACTV | = lv_workf_actv | |
| CHANGING | ||
| NOOFRECS | = lv_noofrecs | |
| EXCEPTIONS | ||
| CORR_EXIT = 1 | ||
| . " RH_BLOCK_UPDATE | ||
ABAP code using 7.40 inline data declarations to call FM RH_BLOCK_UPDATE
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 NOOFRECS FROM HRRHAP INTO @DATA(ld_noofrecs). | ||||
| "SELECT single UPD_PARTIT FROM HRRHAP INTO @DATA(ld_upd_partit). | ||||
| DATA(ld_upd_partit) | = 100. | |||
| "SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask). | ||||
| DATA(ld_vtask) | = 'D'. | |||
| "SELECT single BUFFER_UPD FROM HRRHAP INTO @DATA(ld_buffer_upd). | ||||
| DATA(ld_buffer_upd) | = ' '. | |||
| "SELECT single ORDER_FLG FROM HRRHAP INTO @DATA(ld_order_flg). | ||||
| DATA(ld_order_flg) | = 'X'. | |||
| "SELECT single COMMIT_FLG FROM HRRHAP INTO @DATA(ld_commit_flg). | ||||
| DATA(ld_commit_flg) | = 'X'. | |||
| "SELECT single BUFFER_CLR FROM HRRHAP INTO @DATA(ld_clear_buffer). | ||||
| DATA(ld_clear_buffer) | = 'X'. | |||
| "SELECT single KEEP_LUPD FROM HRRHAP INTO @DATA(ld_keep_lupd). | ||||
| "SELECT single WORKF_ACTV FROM HRRHAP INTO @DATA(ld_workf_actv). | ||||
| DATA(ld_workf_actv) | = 'X'. | |||
Search for further information about these or an SAP related objects