SAP HR_BEN_HANDLE_ERROR Function Module for
HR_BEN_HANDLE_ERROR is a standard hr ben handle error 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 hr ben handle error FM, simply by entering the name HR_BEN_HANDLE_ERROR into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRBEN00ERRORH
Program Name: SAPLHRBEN00ERRORH
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_BEN_HANDLE_ERROR 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_BEN_HANDLE_ERROR'".
EXPORTING
* PERNR = '00000000' "
MSG_CLASS = "
MSG_NUMBER = "
* MSG_PAR1 = '' "
* MSG_PAR2 = '' "
* MSG_PAR3 = '' "
* MSG_PAR4 = '' "
SEVERITY = "
REACTION = "
TABLES
* ERROR_TABLE = "
IMPORTING Parameters details for HR_BEN_HANDLE_ERROR
PERNR -
Data type: PSKEY-PERNRDefault: '00000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSG_CLASS -
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
MSG_NUMBER -
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
MSG_PAR1 -
Data type:Default: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSG_PAR2 -
Data type:Default: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSG_PAR3 -
Data type:Default: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
MSG_PAR4 -
Data type:Default: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEVERITY -
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
REACTION -
Data type: SY-MSGTYOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_BEN_HANDLE_ERROR
ERROR_TABLE -
Data type: RPBENERROptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_BEN_HANDLE_ERROR 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 PSKEY-PERNR, " '00000000' | |||
lt_error_table | TYPE STANDARD TABLE OF RPBENERR, " | |||
lv_msg_class | TYPE SY-MSGID, " | |||
lv_msg_number | TYPE SY-MSGNO, " | |||
lv_msg_par1 | TYPE SY, " '' | |||
lv_msg_par2 | TYPE SY, " '' | |||
lv_msg_par3 | TYPE SY, " '' | |||
lv_msg_par4 | TYPE SY, " '' | |||
lv_severity | TYPE SY-SUBRC, " | |||
lv_reaction | TYPE SY-MSGTY. " |
  CALL FUNCTION 'HR_BEN_HANDLE_ERROR' " |
EXPORTING | ||
PERNR | = lv_pernr | |
MSG_CLASS | = lv_msg_class | |
MSG_NUMBER | = lv_msg_number | |
MSG_PAR1 | = lv_msg_par1 | |
MSG_PAR2 | = lv_msg_par2 | |
MSG_PAR3 | = lv_msg_par3 | |
MSG_PAR4 | = lv_msg_par4 | |
SEVERITY | = lv_severity | |
REACTION | = lv_reaction | |
TABLES | ||
ERROR_TABLE | = lt_error_table | |
. " HR_BEN_HANDLE_ERROR |
ABAP code using 7.40 inline data declarations to call FM HR_BEN_HANDLE_ERROR
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 PSKEY INTO @DATA(ld_pernr). | ||||
DATA(ld_pernr) | = '00000000'. | |||
"SELECT single MSGID FROM SY INTO @DATA(ld_msg_class). | ||||
"SELECT single MSGNO FROM SY INTO @DATA(ld_msg_number). | ||||
DATA(ld_msg_par1) | = ''. | |||
DATA(ld_msg_par2) | = ''. | |||
DATA(ld_msg_par3) | = ''. | |||
DATA(ld_msg_par4) | = ''. | |||
"SELECT single SUBRC FROM SY INTO @DATA(ld_severity). | ||||
"SELECT single MSGTY FROM SY INTO @DATA(ld_reaction). | ||||
Search for further information about these or an SAP related objects