REPORT zxx_xx NO STANDARD PAGE HEADING.
LOAD-OF-PROGRAM.
**__ To avoid the Dump
PERFORM do_nothing(sapfp50p).
START-OF-SELECTION.
PERFORM infotype_operations.
*&---------------------------------------------------------------------*
*& Form INFOTYPE_OPERATIONS
*&---------------------------------------------------------------------*
FORM infotype_operations.
Data: ls_p2003 TYPE p2003,
ls_return TYPE bapireturn1,
ls_key TYPE bapipakey.
ls_p2003-subty = '03'.
ls_p2003-vtart = '03'.
ls_p2003-otype = 'S'.
ls_p2003-infty = '2003'.
ls_p2003-seqnr = '000'.
ls_p2003-plans = '30000009'.
**__extra pay ID
ls_p2003-aufkz = '+'.
CALL FUNCTION 'HR_INITIALIZE_BUFFER'
EXPORTING
tclas = 'A'
pernr = ls_p2003-pernr.
**__ Lock the Employee
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = ls_p2003-pernr
IMPORTING
return = ls_return.
**__ Infotype Operation
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2003'
number = ls_p2003-pernr
subtype = ls_p2003-subty
validityend = ls_p2003-begda
validitybegin = ls_p2003-endda
record = ls_p2003
operation = 'INS'
IMPORTING
return = ls_return
key = ls_key.
**__ Dequeue Employee
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = ls_p2003-pernr
IMPORTING
return = ls_return.
**__ Initialize Buffer
CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
ENDFORM infotype_operations.
**__ Report to do operations on Info type 2003
SUBMIT zxx_xx WITH p_xx EQ lv_xx
WITH p_xx EQ lv_xx
EXPORTING LIST TO MEMORY
AND RETURN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 |