on 02-19-2008 1:58 PM
Hello,
I have a scenario; where the table is been populated with data; and i need to download these data in to an Excel file on button action. I need the exact way to do this. Can anyone help me through this.
Regards,
Vinod
Rewards waiting..
U have to pass the data to an internal table(it_table[]) and use FM as follows..
Download
CALL TRANSFORMATION ('ID')
SOURCE tab2 = it_table[]
RESULT XML xml_out.
lr_conv = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
EXPORTING
INSTRING = xml_out
*
IMPORTING
OUTXSTRING = lv_content.
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'file.xls'
i_content = lv_content
i_mime_type = 'x-excel/application'
i_in_new_window = abap_true ).
Regards
kartik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.