2008 Aug 04 12:15 PM
Hi,
I have 3 workarea and i want to append into one internal table.so how to append.
Thanks,
Deesanth
2008 Aug 04 12:17 PM
Hi,
If those three work areas are different ones then u candirectly write the append statements.
like this
append wa1 to itab.
append wa2 to itab.
append wa3 to itab.
if u r requirement is different please let me know it clearly..
regards
Sunil Kumar Mutyala
2008 Aug 04 12:25 PM
Hi,
But all the values in the 3 workarea will append to one internal table in a single line(one record)not in 3 lines.
Thanks,
Deesanth
2008 Aug 04 12:39 PM
Hi,
Each time we use append statement one new line will get inserted in the internal table. ( 3 append statements means 3 lines)
DO you want to insert new lines or do you want to midify existing values of teh internal table?
Regards,
Swarna Munukoti.
2008 Aug 04 12:50 PM
No man ... 3 appends --> 3 lines in internal table.
Regards,
Suhas
2008 Aug 04 12:18 PM
Hi,
If those three work areas are having the same fields and order as internal table field order then you can append them directly to the internal table using APPEND statement.
Append S_WA1 to T_ITAB.
If it is having the different field order then move to the fields separately to internal table header and use APPEND.
2008 Aug 04 12:19 PM
Hi do as bdlow
append wa_data1 to itab.
append wa_data2 to itab.
append wa_data3 to itab.
rgds
rajesh
2008 Aug 04 12:20 PM
Hi,
I hope the following link will help you,
https://forums.sdn.sap.com/click.jspa?searchID=14807562&messageID=4249748
append wa1 to itab.
append wa2 to itab.
append wa3 to itab.
Regards,
Harish
2008 Aug 04 12:24 PM
Hi Deesanth,
Use 3 Append statements independently one for each workarea.
And for additional information on APPEND statement please check this link...
[Append|http://www.sapnet.ru/abap_docu/ABAPAPPEND.htm]
Hope this would help you
Good luck
Narin
2008 Aug 04 12:28 PM
HIII
then you need to use MODIFY statement like below code..
IF sy-subrc EQ 0.
LOOP AT i_output INTO wa_output.
READ TABLE i_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
wa_output-lgort = wa_mard-lgort.
MODIFY i_output FROM wa_output.
CLEAR wa_output.
ENDLOOP. " LOOP AT i_output
ENDIF. " IF sy-subrc EQ 0
here you need to use READ statement to get workarea data from different tables and use MODIFY statement to append that data in the same row.
reagrds
twinkal
2008 Aug 04 12:40 PM
Hi,
Append like this
append wa1 to itab.
append wa2 to itab.
append wa3 to itab.
2008 Aug 04 12:57 PM
Hi,
what exactly do you want to do?
If you want to have three lines use append.
If you have two same lines in two different workareas?
if you want to have doubled values you have to use command COLLECT
COLLECT wa into itab.
If you want to have it just once use modify.
One of this three commands must be useful for you!
Regards,
Karol
2008 Sep 25 2:40 PM