2007 Aug 28 1:16 PM
How can u transfer the data from one itab to another without using move & write statements?
2007 Aug 28 1:19 PM
Hi,
You can just use '=' to move the data.
itab2 = tab1. " Table with out header line
itab2[] = tab1[]. " Table with header line
You can also use
INSERT LINES OF itab1 INTO itab2.
Regards,
Sesh
hi,
u can do it many ways as
itab2 [] = itab1[].
loop at itab1.
read table itab1 with index sy-tabix.
itab2 = itab1.
append itab2.
endloop.
loop at itab1.
insert itab2 from itab1.
endloop.
insert lines of ........... itab1 to itab2.
,,,,,,,,,,,
if helpful reward some points.
with regards,
Suresh aluri.
2007 Aug 28 1:19 PM
Define another ITAB which has the same structure as that of the first ITAB.
Then use the statement.
ITAB2[] = ITAB1[].
Hope this is your requirement.
Regards,
Pavan
2007 Aug 28 1:19 PM
Hi,
You can just use '=' to move the data.
itab2 = tab1. " Table with out header line
itab2[] = tab1[]. " Table with header line
You can also use
INSERT LINES OF itab1 INTO itab2.
Regards,
Sesh
2007 Aug 28 1:22 PM
HI,
You can use ITAB1[] = ITAB2[]. but these 2 itabs should be same structure
Regards
Sudheer
2007 Aug 28 1:24 PM
LOL = is just a synony for move, but well, why would someone have this requirement? i dont get it. this is very unusual.
2007 Aug 28 1:29 PM
Hello,
Use Insert lines of
<b>INSERT LINES OF itab1 [FROM idx1] [TO idx2] INTO itab2 [INDEX idx3].</b>
Effect
Inserts the internal table itab1 or an extract of it into the internal table itab2. This operation is the same as using a loop at the source area and inserting the entries into the target table line-by-line.
eg:
INSERT LINES OF NAME_TAB_1 FROM 2 INTO NAME_TAB_2 INDEX 2.
Regards,
Lijo
2007 Aug 28 1:42 PM
hi,
u can do it many ways as
itab2 [] = itab1[].
loop at itab1.
read table itab1 with index sy-tabix.
itab2 = itab1.
append itab2.
endloop.
loop at itab1.
insert itab2 from itab1.
endloop.
insert lines of ........... itab1 to itab2.
,,,,,,,,,,,
if helpful reward some points.
with regards,
Suresh aluri.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |