Skip to Content
avatar image
Former Member

Download a PDF file in Webdynpro to a default location in the system

Hi Friends,

I Have a XString PDF Content which should be downloaded as a PDF file in webdynpro to a default location, which can be a desktop/downloads folder. We have function modules in R3 to download directly to a specified location but how to achieve this in webdynpro, i tried all the standard R3 function module which gives dumps, so please help me in downloading the file directly to a specified location from webdynpro application.

Thank you in advance...

Arjun.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 05, 2013 at 02:15 PM

    Hi,

    Please try this bleow code and see it works for your

    place a LinkToAction UI Element in the View and in Event Handler code as follows

    LV_FILENAME = 'RebateRequest.pdf'.

    LV_CTYPE = 'pdf'.

    CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE(

              EXPORTING I_FILENAME = LV_FILENAME

                        I_CONTENT  = LV_CONTENT

                        I_MIME_TYPE = LV_CTYPE

                        I_IN_NEW_WINDOW = ABAP_TRUE ).

    where LV_CONTENT is XSTRING, convert your internal table to XSTRING.

    Also kindly share the details of the Dump for further understanding

    Regards

    Vinay

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 05, 2013 at 02:26 PM

    hello,

    Check this link for an example to download a file from WebDynpro

    http://an-sap-consultant.blogspot.com/2012/03/web-dynpro-abap-download-file.html

    best regards,

    swanand

    Add comment
    10|10000 characters needed characters exceeded