Downloading data into excel
I would like to download data into excel and would like to prompt the user to save the file into a location of their choice. How can I achieve this
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_WORK 'ADD'.
Get the created worksheet
CALL METHOD OF H_EXCEL 'WORKSHEETS' = H_SHEET EXPORTING #1 = 1.
Activate (select) the first sheet
CALL METHOD OF H_SHEET 'ACTIVATE'.
LOOP AT ITAB.
V_COL = SY-TABIX.
PERFORM FILL_CELL USING 1 V_COL ITAB-vbeln.
PERFORM FILL_CELL USING 3 V_COL ITAB-posnr.
The above code creates an excel file and writes the code in intercative fashion i.e the excel opens and we can view the downloading of data directly. But instead I would like this process to happen in the background and then be prompted to save the file in some location.