12-28-2007 6:51 AM
HI
i have defined 2 internal tables one for invoice header details
and another for line item details.(both have different details) now i have to download this data to text file in this format
invno1 text....
line1 text...
line2 text..
...
invno2 text..
line1....
line2...
how to do this? if i use ws_download for 2 tables seperately i am getting following o/p.
invno1 text...
invno2 text....
line1 text...
line2 text....
line1 text....
line2 text...
any one plz help me...
12-28-2007 7:00 AM
Hi Sravanthi,
Create a final internal table with the excat download strucutre and move the corresponding header and item data into it then only we will able to download the data in the required format.
say ur final internal table it_final
loop at header.
mpve-coressponding header to it_final.
loop at item where field1 = header-field1 .(field1 refres to invoice number)
mpve-coressponding item to it_final.
append it_final.
endloop.
endloop.
now call the download function with the it_final internal table
12-28-2007 7:04 AM
call ws_download twice for two diff tables.
or ise diff file names... that will not mess up
12-28-2007 7:09 AM
Hi,
Use GUI_DOWNLOAD as follows:
call 'GUI_DOWNLOAD'
APPEND = space
tables:
DATA_TAB = header.
call 'GUI_DOWNLOAD'
APPEND = 'A'
tables:
DATA_TAB = item.
call 'GUI_DOWNLOAD'
APPEND = 'A'.
tables:
DATA_TAB = header.
call 'GUI_DOWNLOAD'
APPEND = 'A'
tables:
DATA_TAB = item.
This gives proper result.
12-28-2007 7:10 AM
Hi,
Create only one internal table and use GUI_DOWNLOAD FM to download the data .
Regards,
PRashant