Hi Shriniwas,
what i understand is based on selection the records will be download in excel format.
i have done like this kind of requirement i think it is help full for u..
declare the data types like this..
data w_no type sy_linno.
data a type c.
data v2 type c.
parameter p_file like ibipparms-path.
data w_file type string.
and declare the work area an internal tables.. fetch the data.. and display the data in ur grid format..
then after..
w_no = sy_linno.
set pf_status 'stat'.
at user_command.
if sy_ucomm = 'DOWNLOAD'.
do w_no times.
*reading the fields... and moving to another internal table to download that fields..
read line sy_index field value a into v2 wa_table-field into wa_field
wa_table-field into wa_field.
if v2 = 'X'.
append wa to it.
clear wa.
endif.
enddo.
at selection-screen on value-request for p_file.
call fm'f4_file'.
imp
file_name = p_file.
start-of-selection.
w_file = p_file.
call fm 'gui_download'
exp
file name = w_file
write_field_separater = 'X"
table
tata_tab = internal table.
refresh intrenal table.
i think this is help full to u..