SAP Function RH_INSERT_INFTY - Insert Infotype Records

Parameter Reference Type Length Default Optional Text
AUTHY HRRHAP-AUTHY C 1 'X' X Authorization Check Switch
COMMIT_FLG HRRHAP-COMMIT_FLG C 1 'X' X Switch with COMMIT
FCODE HRRHAP-FCODE C 20 'INSE' X Function Code
FORM 0 SPACE X FORM Name for Transferring Table Infotypes
KEEP_LUPD HRRHAP-KEEP_LUPD C 1 X Retain Last Changed By/On
OLD_TABNR HRRHAP-OLD_TABNR C 1 SPACE X Flag: Take Old Pointer Value (TABNR)
ORDER_FLG HRRHAP-ORDER_FLG C 1 'X' X Switch: Take Record Sequence Into Account
PPPAR_IMP PPPAR u 551 X Import Structure PPPAR
REPID SYST-REPID C 40 SPACE X Report Name for Transferring Table Infotypes
VTASK HRRHAP-VTASK C 1 Update (B=Buffer,D=Online,V=Update,S=Sync)
WORKF_ACTV HRRHAP-WORKF_ACTV C 1 'X' X Workflow Switch Active

Parameter Reference Length Optional Text
ILFCODE ILFCOD 8 X Table of Logical Function Codes
INNNN 0 Table of Infotype Records

Exception Text
BEGDA_GREATER_ENDDA Start Date is After End Date
CORR_EXIT Error/Termination While Assigning Correction Number
ERROR_DURING_INSERT No Authorization
NO_AUTHORIZATION Error while Creating Record
REPID_FORM_INITIAL Report/FORM Name for Table Infotype is Empty

Functionality
This function module lets you insert multiple infotype records for OMobjects into the Personnel Planning databases (HRPnnnn). The infotyperecords in the table parameter INNNN must all have the structure Pnnnn(logical structure for nnnn infotype).
The FCODE (function code) parameter should be set to 'INSE' (default).
The individual parameter values VTASK (update type) have the followingmeanings:
'D' -> update in dialog
'S' -> synchronous update via update task
'V' -> asynchronous update via update task
'B' -> update internal in buffer only, no database update
In HR applications, the parameter is set to 'D' for update in dialog.However, if you have multiple, logically-connected operations that youwant to first update internally in the buffer, and then write to thedatabase together, you should set the parameter to 'B' for internalbuffer update only. The database update is then carried out by callingthe function module 'RH_UPDATE_DATABASE'.
The function module also lets you change the status of multipleinfotype records. In that case you should set the FCODE parameter asfollows:
- BEAN -> submit
- GENE -> approve
- AKTI -> activate
- PLVO -> propose change
- ABLN -> reject
In the case of a status change, however, note the following: Thefact that the record is deleted with the old status (except PLVO),means that for infotypes with time constraint 1, predecessors (if theyexist) are extended. If the system transfers several infotype recordsof an infotype with time constraint 1 for the same object to thefunction module, without sorting them according to date, the automaticextension of predecessors can invalidate the transferred infotyperecords. To avoid this, in the case of a status change, you must eithertransfer the infotype records sorted in ascending order by date, orcall the function module separately for each infotype record.