Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Downloading as .txt including header,itab footer with specific path

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)

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question