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: 

Function module to download data into excel file

Former Member
0 Kudos

Hi Friends,

Please tell me the function module name which popsup a popup box to specify a filename and the location and when clicking on the OK button, the file should be downloaded to the specified location.

I need it ASAP.

Thanks,

Jaffer Ali.S

2 REPLIES 2

Former Member
0 Kudos

Go to Class

CL_GUI_FRONTEND_SERVICES it has all the methods you require. Just search the forums also you have same question answered lot many times.

Regards,

Atish

Former Member
0 Kudos

Hi Shamshudeen,

You have to use two funtion modules to acheive this.

1. To get the file path from user.

2. To download the excel sheet in prescribed path.

For 1 use following code

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fpath .

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = syst-cprog

dynpro_number = syst-dynnr

  • FIELD_NAME = ' '

IMPORTING

file_name = p_fpath .

The file path will be stored in p_fpath.

Now use GUI_DOWNLOAD function module and pass the file name p_fpath to it along with filetype as .xls

Hope this helps you.

Thanks,

Arun