Application Development and Automation 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: 
Read only

Character to table conversion

Former Member
0 Likes
648

Hi All,

I have a string variable which has the name of a table. I want to use the contents of that table by looping at it. Is there a way to do it.

Thanks in advance.

Anju

Hi All,

I have a string variable which has the name of a table. I want to use the contents of that table by looping at it. Is there a way to do it.

Thanks in advance.

Anju

5 REPLIES 5
Read only

former_member189059
Active Contributor
0 Likes
621

Use Field Symbols

Read only

Former Member
0 Likes
621

How do I use field symbols to loop at that table. Please provide a sample code.

Thanks

Read only

Former Member
0 Likes
621

hi

good

example of the field symbol

REPORT demo_field_symbols_stat_assign .

FIELD-SYMBOLS: <f1> TYPE ANY, <f2> TYPE i.

DATA: text(20) TYPE c VALUE 'Hello, how are you?',

num TYPE i VALUE 5,

BEGIN OF line1,

col1 TYPE f VALUE '1.1e+10',

col2 TYPE i VALUE '1234',

END OF line1,

line2 LIKE line1.

ASSIGN text TO <f1>.

ASSIGN num TO <f2>.

DESCRIBE FIELD <f1> LENGTH <f2>.

WRITE: / <f1>, 'has length', num.

ASSIGN line1 TO <f1>.

ASSIGN line2-col2 TO <f2>.

MOVE <f1> TO line2.

ASSIGN 'LINE2-COL2 =' TO <f1>.

WRITE: / <f1>, <f2>.

The output is:

Hello, how are you? has length 20

LINE-COL2 = 1,234

thanks

mrutyun^

Read only

0 Likes
621

Can u use field symbols in a loop,

Read only

Former Member
0 Likes
621

done