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: 

How to assign ranges ( select-option)to field symbol

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos
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.

0 Kudos

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..

Former Member
0 Kudos

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.