05-11-2007 12:13 PM
Hi ,
I have following scenario
ranges : r_test1 for agr_1251,
r_test2 for agr_1251.
In runtime i am getting which range i have to populate in a field v_rname.for now let it me v_rname = 'r_test2'
i want to assign (v_rname ) to <field -symbol> ie is range to field symbol.
and i want to update the <field -symbol>-sign ='I'
<field -symbol>-LOW ='some value'
append <field -symbol>.
This is the logic i want to follow, for this how should i have to declare the field symbol ? I couldn't assign a range to field symbol . Please help me.
thanks
Murali
05-11-2007 12:20 PM
something like this
REPORT ABC MESSAGE-ID ZZ.
RANGES : IT_RANGES FOR MARA-MATNR,
IT_TEMP FOR MARA-MATNR.
DATA : V_CHAR(10) VALUE 'IT_RANGES'.
FIELD-SYMBOLS : <FS> LIKE IT_RANGES.
ASSIGN (V_CHAR) TO <FS>.
<FS>-SIGN = 'I'.
<FS>-OPTION = 'BT'.
<FS>-LOW = '100000'.
APPEND <FS> TO IT_TEMP.
LOOP AT IT_TEMP.
WRITE : IT_TEMP-LOW.
ENDLOOP.
05-11-2007 12:53 PM
Hi Chandru,
The problem is instead of Appending ( APPEND <FS> TO IT_TEMP)
it into different range. i want it to be in the same range which you have assigned it to field symbol . in your example into IT_RANGES . Do you have any solution on this ? If we try Append <FS>, it will say it is not an internal table..
05-11-2007 12:24 PM
Try this
FIELD-SYMBOLS : <field_symbol> TYPE ANY TABLE.
ASSIGN (v_rname) to <field_symbol>.
<field -symbol>-sign ='I'
<field -symbol>-LOW ='some value'
append <field -symbol>.
This should work because your range is a table.
Hope this helps you.