‎2008 Dec 24 6:53 PM
Hi,
want to write 5 tables in 1 file, to write 5 tables into file ,calling program 5 times,passing different itab each time.
But when 1 itab gets write in to the file, when program calls again with 2 itab, it writes overwrites itab 2 . This erase itab 2 data.
Plz tell how to write all itabs.
Thanks.
‎2008 Dec 24 6:56 PM
Use APPENDING TABLE ITAB while selecting the data.
I used SELECT setname setclass descript FROM setheadert APPENDING TABLE i_setheadert
While i_setheadert had already data before selecting from setheadert.
‎2008 Dec 24 6:56 PM
Use APPENDING TABLE ITAB while selecting the data.
I used SELECT setname setclass descript FROM setheadert APPENDING TABLE i_setheadert
While i_setheadert had already data before selecting from setheadert.
‎2008 Dec 24 6:58 PM
‎2008 Dec 24 7:05 PM
You can use like this -
OPEN DATASET dsn FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
LOOP AT ITAB INTO wa_itab.
TRANSFER wa_itab TO dsn.
ENDLOOP.
ENDIF.
CLOSE DATASET dsn.
P.S. - You should use search. F1 on statements. Search in Forums.