2007 May 11 4:15 PM
I have an internal table (x) with some columns.
I need to create another internal table (y) consisting of a single
column from table (x).
I loop through the table (x), appending each record to the newly created table (y).
Is there a faster way to do this?
2007 May 11 4:30 PM
You can use this, but ONLY if the field on Y table is the first one in X table:
APPEND LINES OF x TO y.
That appers to work only when x and y has same structure, but actually when y has less fields then x works too if the fields on y has same structure of the firsts fields on x.
As SAP helps says it's 3 to 4 times faster then a loop.
Hope it helps!
You can use this, but ONLY if the field on Y table is the first one in X table:
APPEND LINES OF x TO y.
That appers to work only when x and y has same structure, but actually when y has less fields then x works too if the fields on y has same structure of the firsts fields on x.
As SAP helps says it's 3 to 4 times faster then a loop.
Hope it helps!
2007 May 11 4:18 PM
Hi Sachin,
How u can append X table records to the Y table. As fields are in compatiable.
plz tell me what is your exact requirement
Thanks,
Suma.
2007 May 11 4:21 PM
hi
If you loop the Y table, read records in X table and append values from X to Y only for that particular field , you can get the logic you are trying for
2007 May 11 4:27 PM
There are two ways,
first one is,
if the table A is appended from some other table then u can move that column
and append table B.
second one is,
Declare two internal tables
ITAB and ITAB1 9with just one field)
loop at iTAB.
itab1-f1 = itab-f4.
append itab1.
clear itab1.
endloop.
ther is no other faster way than this.
2007 May 11 4:30 PM
You can use this, but ONLY if the field on Y table is the first one in X table:
APPEND LINES OF x TO y.
That appers to work only when x and y has same structure, but actually when y has less fields then x works too if the fields on y has same structure of the firsts fields on x.
As SAP helps says it's 3 to 4 times faster then a loop.
Hope it helps!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |