12-20-2011 2:01 PM
i have a specifix path like C://asd , an internal table itab, and a footer and header. I tried to use GUI_DOWNLOAD but, i can only send an internal table to this function.
I need to download these things .txt like this format
The account 21324.2342 (Header)
123 1231 123 1234 123 1234 123 1234 (itab[1])
321 4321 321 4321 321 4321 321 4321 (itab[2])
123 1231 123 1234 123 1234 123 1234 (itab[3])
321 4321 321 4321 321 4321 321 4321 (itab[4])
123 1231 123 1234 123 1234 123 1234 (itab[5])
321 4321 321 4321 321 4321 321 4321 (itab[6])
Sum is 123412 (Footer)
12-21-2011 7:07 AM
Hi ,
In function module GUI_DOWNLOAD there is a parameter called as append.
Cal this FM for 3 times,
1: For Header with append not used.
2: For Internal table with append as 'X'.
3: for Footer with append as 'X'.
In all the call keep the file name same .
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
CHANGING
data_tab = gt_header
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
append = c_x
CHANGING
data_tab = p_gt_line
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
append = c_x
CHANGING
data_tab = gt_control
EXCEPTIONS
OTHERS = 1.
Regards,
Ganesh.
Edited by: Ganesh Lathi on Dec 21, 2011 8:08 AM
12-21-2011 1:39 AM
You need to create another internal table which contains only 1 field (possibly a string or a type c length 1000), then filled this table with the 'header', 'content', 'footer' and do a gui_download on this internal table.
12-21-2011 6:29 AM
Hi,
when you are using function module GUI_DOUNLOAD, there is one parameter callled fieldnames....there you can mention an internal table containing information about header like column name, column value. Crete that internal table first and then pass that internal table in that function module so that you will be able to see header in the downloaded file
12-21-2011 7:07 AM
Hi ,
In function module GUI_DOWNLOAD there is a parameter called as append.
Cal this FM for 3 times,
1: For Header with append not used.
2: For Internal table with append as 'X'.
3: for Footer with append as 'X'.
In all the call keep the file name same .
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
CHANGING
data_tab = gt_header
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
append = c_x
CHANGING
data_tab = p_gt_line
EXCEPTIONS
OTHERS = 1.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = lv_filename
filetype = 'ASC'
append = c_x
CHANGING
data_tab = gt_control
EXCEPTIONS
OTHERS = 1.
Regards,
Ganesh.
Edited by: Ganesh Lathi on Dec 21, 2011 8:08 AM