2006 Apr 07 5:27 AM
Hi,
I need to determine the name of a variable during runtime. For example L_TEMP (type i) contains value 10.
During runtime we know the value is 10 but Im more interested in obtaining the name L_TEMP and assigning it to another variable of type c.
I need the name to compare it against another value.
A reason on why I need this is when using the following syntax:
do 10 times varying l_temp
from mver-gsv01
next mver-gsv02.
<whatever code> ...
enddo.
I need to keep track of which field in MVER is being processed within the DO loop ie. GSV01, GSV02, GVS03 ... etc
Help would be appreciated and points rewarded.
Thanks
Liam
2006 Apr 07 5:34 AM
Liam,
I don't think that will be possible. However, can you explain a little more, with the code you have, your requirement.
I am sure we will be able to process the data without knowing the name of the field.
Regards,
Ravi
2006 Apr 07 5:44 AM
Hi,
I'm given a from date and to date range such as 03.2006 to 10.2006.
Using this date range I need to select from MVER to obtain material consumption history. I then need to sum the quantity for periods 3 to 10 i.e. from MVER-GSV03 to MVER-GSV10.
So by first selecting the record in a structure ST_MVER we then use the following syntax to 'loop' through all 13 periods (GSV01 to GVS13) and summing them up but only for thos periods chosen i.e. period 3 to 10, not 1 to 13.
do 10 times varying l_temp
from mver-gsv01
next mver-gsv02.
if current <l_temp period> is greate or equal to from period (3) and less than to period (10).
sum it up.
endif.
enddo.
Hope this helps.