2007 Sep 07 6:26 AM
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
2007 Sep 07 6:29 AM
2007 Sep 07 6:31 AM
How do I use field symbols to loop at that table. Please provide a sample code.
Thanks
2007 Sep 07 6:58 AM
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^
2007 Sep 07 7:06 AM
2009 Jan 06 11:04 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |