‎2008 Sep 22 11:04 AM
Hello,
I need to convert the below to the one I mention below that.
Row Column Value
1 1 X1
1 2 Y1
1 3 Z1
2 1 X2
2 2 Y2
2 3 Z3
Col_1 Col_2 Col_3
X1 Y1 Z1
X2 Y2 Z2
Is there any special ABAP statement or FM which does this already ?
Thanks,
Kiran
‎2008 Sep 22 11:07 AM
Hi,
there is no ready made one .. you have to use logic.
use nested loop.
Regards,
Anirban
‎2008 Sep 22 11:07 AM
Hi,
there is no ready made one .. you have to use logic.
use nested loop.
Regards,
Anirban
‎2008 Sep 22 11:08 AM
Hi,
Except field name, data type and length are same, then you can directly use 'APPEND LINES OF ITAB1 TO ITAB2'.
Try this.
Regards,
R.Nagarajan.
‎2008 Sep 22 11:21 AM
hi,
Iam giving u the code samples.
1.LOOP AT IT_EXCEL INTO WA_EXCEL.
ASSIGN COMPONENT WA_EXCEL-COL OF STRUCTURE WA_EKKO TO <FEX>.
MOVE WA_EXCEL-VALUE TO <FEX>.
AT END OF ROW.
APPEND WA_EXCEL TO IT_EXCEL.
CLEAR WA_EXCEL.
ENDAT.
ENDLOOP.
2.
***SORT IT_EXCEL BY ROW COL.
***
***LOOP AT IT_EXCEL INTO WA_EXCEL.
***
***CASE WA_EXCEL-COL.
***
***WHEN 1.
***WA_EKKO-EBELN = WA_EXCEL-VALUE.
***
***WHEN 2.
***WA_EKKO-BUKRS = WA_EXCEL-VALUE.
***
***WHEN 3.
***WA_EKKO-BSTYP = WA_EXCEL-VALUE.
***
***WHEN OTHERS.
***
***ENDCASE.
***
***AT END OF ROW.
***APPEND IT_EKKO .
***CLEAR WA_EKKO.
***ENDAT.
***
***ENDLOOP.
Regards,
deepthi.
‎2008 Sep 23 10:56 AM