File downloading issue in web dynrpo
Hello Expert Learners,
I've been trying to download the internal table contents using the following code it's not working,
CALL METHOD lo_nd_vbak1->get_static_attributes_table
table = lt_download.
*I can see the table values in debugging
loop at lt_download into ls_download.
concatenate str ls_download-vbeln ls_download-erdat ls_download-erzet ls_download-ernam
cl_abap_char_utilities=>newline into str separated by cl_abap_char_utilities=>horizontal_tab.
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
text = str
BUFFER = xstr.
*Here I observed xstr value is getting populated .
CALL METHOD cl_wd_runtime_services=>attach_file_to_response
i_filename = 'C:\temp\Sales.xls'
i_content = xstr
i_mime_type = 'EXCEL'.
The file is not getting stored in the path I mentioned above ,even if I mentioned just the file name 'sales.xls' it's not working .
Please some one hlep.