Skip to Content
0
Former Member
Feb 04, 2007 at 06:28 AM

populate the infotype p0015 -additional payments

127 Views

hi experts,

i am trying to populate the infotype p0015 -additional payments infotype .i know the program for uploading only one wage-type (subtype) in main screen of pa30.

what if i want to upload data for 5 wage type for every pernr ..in one program . how should be the format of the internal table . and one more things .. there is no input field for endda. but i have it in the program ..

the program for upload that i know is give below ..

DATA : P0015 LIKE P0015.

DATA : RETURN LIKE BAPIRETURN1.

DATA : KEY LIKE BAPIPAKEY.

DATA : RETURNE LIKE BAPIRETURN1 .

*----


Values (Change as per Requirement)

P0015-PERNR = '1'.

P0015-BEGDA = '2061101'.

P0015-ENDDA = '2061101'.

P0015-LGART = '3075'.

P0015-PREAS = '01'.

P0015-WAERS = 'INR'.

P0015-BETRG = '2500'.

*----- First Enqu

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

NUMBER = p0015-pernr

IMPORTING

RETURN = RETURNE.

*----


Update

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

INFTY = '0015'

NUMBER = P0015-PERNR

SUBTYPE = P0015-SUBTY

OBJECTID = P0015-OBJPS

LOCKINDICATOR = P0015-SPRPS

VALIDITYEND = P0015-ENDDA

VALIDITYBEGIN = P0015-BEGDA

RECORDNUMBER = P0015-SEQNR

RECORD = P0015

OPERATION = 'INS'

TCLAS = 'A'

DIALOG_MODE = '0'

IMPORTING

RETURN = RETURN

KEY = KEY.

IF RETURN IS NOT INITIAL.

WRITE :/ 'Error Occurred'.

ENDIF.

*----


Dequeue

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

EXPORTING

NUMBER = P0015-PERNR