Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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

   IMPORTING

     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.

   endloop.

CALL FUNCTION 'SCMS_STRING_TO_XSTRING'

   EXPORTING

     text           = str

  IMPORTING

    BUFFER         = xstr.

*Here I observed  xstr value is getting populated .

CALL METHOD cl_wd_runtime_services=>attach_file_to_response

   EXPORTING

     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.

Regards,

Nagendra

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question