Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

creating wage type amount values in PA30

former_member203501
Active Contributor
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

Try to declare a decimal value i and assign

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

i0008-bet02 = i.

check with i0008-bet02 char proteries.

Thanks,

AMS

Edited by: SAP@AMS on Sep 4, 2009 6:17 AM

Edited by: SAP@AMS on Sep 4, 2009 6:18 AM

former_member203501
Active Contributor
0 Kudos

Solved by my own