08-22-2007 12:01 PM
Hi All,
1)
I need to get the itab dynamically.
LOOP AT itab_dyn INTO wa.
ENDLOOP.
Here, itab_dyn can be itab1 or itab2 (based on a condition) and both of which have same fields only change in order of table fields. ex: table1 - F1, F2 ; table2- F2, F1
Can we have field symbols for that? Please tell any other possible solutions.
2)
But my basic requirement is to use AT END OF F1/F2 inside a single LOOP.
But even if we give SORT itab BY F1 F2 and F2 F1 based on condition, AT END OF won't work in both cases (ex: struct-F1 F2, SORT F2 F1. it will consider change of F1, when you write AT END OF F2) because I think the field should be first one while defining structure
Thanks in advance,
Nunu Vengal.
08-22-2007 12:06 PM
Hi Nunu,
I think the ideal scenario is to use the field symbol if you want to use the itab dynamically.
You can use at end of when you use field symbol also.
Award points if this helps.
Regards,
Ravi G