Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 14, 2015 at 10:16 AM

    Hi,

    While executing does Browser opens up a downloading pop-up?

    Thanks

    KH

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      Check with you TL or concern person who can help you out in your organization regarding service market place credentials.

      Thanks

      KH