2007 Sep 19 1:24 PM
Dear all,
1) i have one iternal table now i want it should be header line of another internal table
how it possible?
2) in second case i want my data in horizental wise ,or row wise, insted of colulmn wise. e.g. A
B
C
D
but i wann like below
A B C D.
Thanks ,
*******************Point is assured ***************
2007 Sep 19 1:37 PM
try like this.
loop at itab1.
if sy-tabix = 1.
wa2-field1 = itab1-field.
endif
if sy-tabix = 2.
wa2-field2 = itab1-field.
endif
if sy-tabix = 3.
wa2-field3 = itab1-field.
endif
if sy-tabix = 4.
wa2-field4 = itab1-field.
endif
endloop.
append wa2 to itab2.
hope it will help. If you want anymore clarifications, feel free to get back to me.
Thanks to All,
Point has been given
2007 Sep 19 1:29 PM
Hi,
Declare your internal tablw with header line.
In your second case.
Loop at itab.
concatenate itab-field1 itab-field2 itab-field3 into itab2 separated by space.
append itab2.
clear itab2.
endloop.
Thanks,
Sri.
2007 Sep 19 1:32 PM
1. table1 and table2 should have the same structure.
loop at table1 into table2.
....
endloop.
or move-corresponding table1 to table2..
2. Read Rich's blog about Dynamic Internal Table
/people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
This should solve your problem.
2007 Sep 19 1:37 PM
try like this.
loop at itab1.
if sy-tabix = 1.
wa2-field1 = itab1-field.
endif
if sy-tabix = 2.
wa2-field2 = itab1-field.
endif
if sy-tabix = 3.
wa2-field3 = itab1-field.
endif
if sy-tabix = 4.
wa2-field4 = itab1-field.
endif
endloop.
append wa2 to itab2.
hope it will help. If you want anymore clarifications, feel free to get back to me.
2007 Sep 19 1:37 PM
Hi,
Do like this.
Data:
begin of itab1 occurs 0,
f1(10) type c,
f2(10) type c,
end of itab1.
data:
itab2 like itab1 occurs 0 with header line,
itab3 like itab1 occurs 0 with header line.
Let itab1 have some data
*U can split into horizontal as:
loop at itab1.
<b>split itab1 into itab2.</b>
append itab2 to itab3.
clear itab2.
clear itab1.
endloop.
Regards,
Rama chary.Pammi
2007 Sep 21 6:05 AM
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |