Skip to Content
0
Sep 03, 2009 at 03:46 PM

creating wage type amount values in PA30

35 Views

Hi all,

I am creating a record for an employee with some defined wage types in PA30, i am entering the grade and level in the screen of infotype 0008. i am filling the basic wage type, based on which HRA, Shift Allowance, Transport Allowance need to be filled automatically in the screen. After entering Basic wage in am hitting enter...then it is going to ZXPADU02. here i am writing the code below:

CASE innnn-infty.

WHEN '0008'.

CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn

EXPORTING

prelp = innnn

IMPORTING

pnnnn = i0008.

DATA: BEGIN OF WAGETYPES,

LGA LIKE P0008-LGA01,

BET LIKE P0008-BET01,

ANZ LIKE P0008-ANZ01,

end of WAGETYPES.

DO 40 TIMES VARYING WAGETYPES-LGA FROM i0008-LGA01 NEXT i0008-LGA02

VARYING WAGETYPES-BET FROM i0008-BET01 NEXT i0008-BET02

VARYING WAGETYPES-ANZ FROM i0008-ANZ01 NEXT i0008-ANZ02.

case WAGETYPES-LGA.

when '1000'. "Basic Wage type

v_bet01 = WAGETYPES-bet.

when '1010'. " HRA wage type

i0008-bet02 = ( v_bet01 * 30 ) / 100.

when '1040'. " Special Allowance

i0008-bet06 = '1'.

endcase.

CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp

EXPORTING

pnnnn = i0008

IMPORTING

prelp = innnn.

endcase.

Here i can able to see the values in the debugging...but after one do...enddo loop the filled values from i0008 calculations is again becoming blank.

Please share your ideas ...if i am wrong/missing any thing.

Regards,

Venkat.