‎2009 May 25 12:57 PM
Hi Guy's,
Please help me Friends!!
Based on the reqirement i did coding like this:
Loop at P0001 into wa_p0001.
Read table it_t001p into wa_t001p with key werks = wa_p0001-werks
BTRTL = wa_p0001- BTRTL.
If sy-subrc = 0.
***Problem
Loop at it_zhrlight into wa_light where MOlga = wa_t001p-molga
And r_from >= wa_p0001-pernr
And r_to <= wa_p0001-pernr.
Move pernr to output1 .
Exit.
Endloop.
Endif.
Endloop.
wa_light doesn't contain any entries.
But it_zhrlight contain the values... in where condition ineed to check r_from >= wa_p0001-pernr*
r_to <= wa_p0001-pernr.*
Plese guid me where i wrorte the mistake.
Thanks & Regards,
Sai.
‎2009 May 25 12:59 PM
Hi,
Does it have entries which correspond to the criteria: wa_t001p-molga?
Otherwise it can not be initial.
Best regards,
Guido Koopmann
‎2009 May 25 1:01 PM
Hi,
What about teh variable 'wa_t001p-molga'
Where does it get data from?
Regards,
Ankur Parab
‎2009 May 25 1:02 PM
1. how are r_from and r_to defined.
2. Are these r_from and r_to part of the internal table, or are these some sort of range?
‎2009 May 25 1:14 PM
Hi Sai,
Instead of looping you can :
Read table it_zhrlight into wa_light where MOlga = wa_t001p-molga
And r_from >= wa_p0001-pernr
And r_to <= wa_p0001-pernr.
Also you are moving field pernr to which field of output1???????
‎2009 May 25 1:22 PM
*Move pernr to output1 .*where are u passing value to pernr?
and what is the type of both of these pernr and output1??
and if :
Loop at it_zhrlight into wa_light where MOlga = wa_t001p-molga
And r_from >= wa_p0001-pernr
And r_to <= wa_p0001-pernr.is ur problem
then check the declaration for r_from and r_to with wa_p0001-pernr.
put a break point in the starting of loop and check the values.
Edited by: soumya prakash mishra on May 25, 2009 2:23 PM
‎2009 May 25 1:30 PM
>
> Hi Guy's,
>
> Please help me Friends!!
> Based on the reqirement i did coding like this:
>
> Loop at P0001 into wa_p0001.
> Read table it_t001p into wa_t001p with key werks = wa_p0001-werks
> BTRTL = wa_p0001- BTRTL.
> If sy-subrc = 0.
> ***Problem
> Loop at it_zhrlight into wa_light where MOlga = wa_t001p-molga
> And r_from >= wa_p0001-pernr
> And r_to <= wa_p0001-pernr.
> Move pernr to output1 .
> Exit.
> Endloop.
> Endif.
> Endloop.
>
> wa_light doesn't contain any entries.
> But it_zhrlight contain the values... in where condition ineed to check r_from >= wa_p0001-pernr*
> r_to <= wa_p0001-pernr.*
>
> Plese guid me where i wrorte the mistake.
>
> Thanks & Regards,
> Sai.
Hi
1. Entries avaialable in it_zhrlight internal table are satisfiying the where condition.
2. use GE, LE & EQ instead of >= , =<.
3. Work Area wa_light is like line of it_zhrlight.
‎2009 May 25 1:49 PM
Hi Sai,
R the work area wa_light and the internal table it_zhrlight have the same structure(fields in the same order).
If it is not then the w/a will not get the values
Regards,
Manjunath