‎2008 Oct 24 12:05 PM
hi,
i am new to hr abap..in the infotype PA0008 we have the field wage type(LGA01) and the corresponding amount (BET01)...they are ranges from one to 40 for the wage types...for the particular wage type the wage amount is displayed..now if i want to check for the particualr value 1000 int he wage amount i need to get displayed the wage type...my doubt is if i use the do varyin condition do i get just only the positon of the range or the value???suppose the particular wage amount is in the lga31 type do i get the value or just only the postion of the wage type??
‎2008 Oct 24 12:43 PM
You get the the value and WT intself.
Look at below code.
DATA: GWA_0008 TYPE PA0008,
LGART TYPE PA0008-LGA01,
BETRG TYPE PA0008-BET01.
SELECT SINGLE * FROM PA0008 INTO GWA_0008.
DO 40 TIMES
VARYING LGART FROM GWA_0008-LGA01 NEXT GWA_0008-LGA02
VARYING BETRG FROM GWA_0008-BET01 NEXT GWA_0008-BET02.
if sy-index = 31.
"here LGART will store WT and BETRG corresponding value to it (for LGA31 and BET31)
endif
ENDDO.
I hope now it is clear.
Regards
Marcin
‎2008 Oct 24 12:17 PM
Hi,
did you try F1 on varying? Have also a look into sy-index in the DO-Loop.
Regards, Dieter
‎2008 Oct 24 12:43 PM
You get the the value and WT intself.
Look at below code.
DATA: GWA_0008 TYPE PA0008,
LGART TYPE PA0008-LGA01,
BETRG TYPE PA0008-BET01.
SELECT SINGLE * FROM PA0008 INTO GWA_0008.
DO 40 TIMES
VARYING LGART FROM GWA_0008-LGA01 NEXT GWA_0008-LGA02
VARYING BETRG FROM GWA_0008-BET01 NEXT GWA_0008-BET02.
if sy-index = 31.
"here LGART will store WT and BETRG corresponding value to it (for LGA31 and BET31)
endif
ENDDO.
I hope now it is clear.
Regards
Marcin
‎2008 Oct 24 1:46 PM