Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

downloading report to the directory

Former Member
0 Kudos

Hi Friends ,

I just completed a report. The user needs to download the report in the repective directory specified as a .txt file. I have a check box on screen . If the user wants to download the file the checkbox needs to be checked. I was wondering how to go about this ?? I believe that i need to use OPEN DATASET , CLOSE DATA SET . Any suggestions ???

Thanks

Message was edited by: Hari Gopalakrishna

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Hari,

I think this should be simple.

Identify how u want to download the data and in what format. Do you want to download in a excel sheet or do you want to downalod the report list directly.

If the user wants to download the report list as it is the best option is to ask him to do it by the std SAP download options on a list.

If they want to download the data in a excel then you can write the code.

OPEN DATASET is only used if you want to write a file on the application server.

If you want to use local PC use GUI_DOWNLOAD.

Cheers

VJ

Message was edited by: Vijayendra Rao

2 REPLIES 2

Former Member
0 Kudos

Hi Hari,

I think this should be simple.

Identify how u want to download the data and in what format. Do you want to download in a excel sheet or do you want to downalod the report list directly.

If the user wants to download the report list as it is the best option is to ask him to do it by the std SAP download options on a list.

If they want to download the data in a excel then you can write the code.

OPEN DATASET is only used if you want to write a file on the application server.

If you want to use local PC use GUI_DOWNLOAD.

Cheers

VJ

Message was edited by: Vijayendra Rao

Former Member
0 Kudos

after you populate the final internal table(which you are displaying to the user as LIST) .

check this checkbox field.

& you have to provide another parameter field(p_fname) on the selection screen to enter the file name.

if P_CHKBOX = 'X'.

*--User selected to download the data.

data : v_filename type string.

v_filename = p_fname.

then call GUI_DOWNLOAD & pass this V_FILENAME & YOUR final internal table.

this will download your total LIST to the specified file path .

endif.