2007 Jul 05 9:40 AM
Hello,
can you tell me what is the advantage to use "ASSIGNING" instead of "INTO" when i using LOOPS?
Thanks Ronald
Hello,
can you tell me what is the advantage to use "ASSIGNING" instead of "INTO" when i using LOOPS?
Thanks Ronald
2007 Jul 05 9:43 AM
When using ASSINING, you can modify the data directly.
If using INTO, you have to add MODIFY itab FROM wa at the end of the loop.
2007 Jul 05 9:45 AM
Hi,
When you use ASSIGNING you can directly modify the values in the TABLE when you modify the workarea, where as when you use INTO you needto use MODIFY Statement to push the changes on to the internal table.
Also its fast AS there will not be any copying of the data into the work area and back to internal table from workarea after MODIFY
Regards,
Sesh
2007 Jul 05 9:54 AM
they are used in different contexts
when you are assigning to a field symbol, then u need to use ASSIGNING
LOOP AT ITAB ASSIGNING <FS>.
When you are assigning to a workarea then u have to use INTO
LOOP AT ITAB INTO WA_ITAB.
2007 Jul 05 2:55 PM
It is also a performance issue. If you have a lot of entries in your table you should use assign, because then it is faster to work with references.