SAP HR_OC_INSERT_BATCH Function Module for
HR_OC_INSERT_BATCH is a standard hr oc insert batch 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 oc insert batch FM, simply by entering the name HR_OC_INSERT_BATCH into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPAY99_OCF
Program Name: SAPLHRPAY99_OCF
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_OC_INSERT_BATCH 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_OC_INSERT_BATCH'".
EXPORTING
* SEQUENCE_NUMBER = '00000' "
* REPLACE = ' ' "
* LAUFD = "
* LAUFI = ' ' "
* REVERSAL = ' ' "
* POSTING_INDICATOR = ' ' "
FU_DIALOG = "
* COUNTRY_GRP = "
* FORMPRINT = ' ' "
TABLES
EMPLOYEES = "
* INSERTED_RECORDS = "
EXCEPTIONS
INSERT_NOT_SUCCESSFUL = 1
IMPORTING Parameters details for HR_OC_INSERT_BATCH
SEQUENCE_NUMBER -
Data type: PC261-SEQNRDefault: '00000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
REPLACE -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LAUFD -
Data type: PAYR_FI-LAUFDOptional: Yes
Call by Reference: No ( called with pass by value option)
LAUFI -
Data type: PAYR_FI-LAUFIDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
REVERSAL -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
POSTING_INDICATOR -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FU_DIALOG -
Data type: HROC_DIALOGOptional: No
Call by Reference: No ( called with pass by value option)
COUNTRY_GRP -
Data type: T500L-MOLGAOptional: Yes
Call by Reference: No ( called with pass by value option)
FORMPRINT -
Data type: CDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for HR_OC_INSERT_BATCH
EMPLOYEES -
Data type: HROCT_EE_TABLEOptional: No
Call by Reference: No ( called with pass by value option)
INSERTED_RECORDS -
Data type: T52OCGOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INSERT_NOT_SUCCESSFUL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for HR_OC_INSERT_BATCH 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_employees | TYPE STANDARD TABLE OF HROCT_EE_TABLE, " | |||
lv_sequence_number | TYPE PC261-SEQNR, " '00000' | |||
lv_insert_not_successful | TYPE PC261, " | |||
lv_replace | TYPE C, " SPACE | |||
lt_inserted_records | TYPE STANDARD TABLE OF T52OCG, " | |||
lv_laufd | TYPE PAYR_FI-LAUFD, " | |||
lv_laufi | TYPE PAYR_FI-LAUFI, " SPACE | |||
lv_reversal | TYPE C, " SPACE | |||
lv_posting_indicator | TYPE C, " SPACE | |||
lv_fu_dialog | TYPE HROC_DIALOG, " | |||
lv_country_grp | TYPE T500L-MOLGA, " | |||
lv_formprint | TYPE C. " SPACE |
  CALL FUNCTION 'HR_OC_INSERT_BATCH' " |
EXPORTING | ||
SEQUENCE_NUMBER | = lv_sequence_number | |
REPLACE | = lv_replace | |
LAUFD | = lv_laufd | |
LAUFI | = lv_laufi | |
REVERSAL | = lv_reversal | |
POSTING_INDICATOR | = lv_posting_indicator | |
FU_DIALOG | = lv_fu_dialog | |
COUNTRY_GRP | = lv_country_grp | |
FORMPRINT | = lv_formprint | |
TABLES | ||
EMPLOYEES | = lt_employees | |
INSERTED_RECORDS | = lt_inserted_records | |
EXCEPTIONS | ||
INSERT_NOT_SUCCESSFUL = 1 | ||
. " HR_OC_INSERT_BATCH |
ABAP code using 7.40 inline data declarations to call FM HR_OC_INSERT_BATCH
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 SEQNR FROM PC261 INTO @DATA(ld_sequence_number). | ||||
DATA(ld_sequence_number) | = '00000'. | |||
DATA(ld_replace) | = ' '. | |||
"SELECT single LAUFD FROM PAYR_FI INTO @DATA(ld_laufd). | ||||
"SELECT single LAUFI FROM PAYR_FI INTO @DATA(ld_laufi). | ||||
DATA(ld_laufi) | = ' '. | |||
DATA(ld_reversal) | = ' '. | |||
DATA(ld_posting_indicator) | = ' '. | |||
"SELECT single MOLGA FROM T500L INTO @DATA(ld_country_grp). | ||||
DATA(ld_formprint) | = ' '. | |||
Search for further information about these or an SAP related objects