05-19-2005 11:05 PM
Hi,
I am eager to know, is there a way in ABAP to collect an internal table lines into another itab without looping over the lines of the source itab.
I just want to make sure I am not missing something.
thanks.
ahmet sahan
05-19-2005 11:19 PM
Hi Ahment,
You can do this like this:
x_int_table_1[] = x_int_table_2[].
This will copy all the lines of x_int_table_2 to x_int_table_1.
Hope that helps.
Brad
05-19-2005 11:19 PM
Hi Ahment,
You can do this like this:
x_int_table_1[] = x_int_table_2[].
This will copy all the lines of x_int_table_2 to x_int_table_1.
Hope that helps.
Brad
05-20-2005 4:24 AM
Hi,
Also u can use INSERT LINES OF ITAB1 to ITAB2
See this link
http://help.sap.com/saphelp_46c/helpdata/en/34/8e72c56df74873e10000009b38f9b8/frameset.htm
Also refer
http://www.geocities.com/victorav15/sapr3/abap.html#itabid
Thanks & Regards,
Judith.
05-20-2005 4:45 AM
Hi,
This link explains the COLLECT with example.
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/collect.htm
But if you just want to move the lines,you can do so by
APPEND lines of itab1 to itab2.
05-20-2005 5:01 AM
Hi Ahmet,
If you are talking about using the COLLECT keyword, then you will have to loop at the source table.
But if you have used the word <i>collect</i> as a normal verb, then Brad's answer is the best.
Regards,
Anand Mandalika.