Skip to Content

SAP GW - Download file by using execute action

Hello Experts,

I've the following scenario:

I need to send some header and table data (as input to GW service) and get a file (in my case it's PDF file but it could be any other file).

I'm aware of file download option (by using get_stream) in GW but in the case I need to use execute_action.

How can I define an entity/complex entity or any other data structure that will return a file (I tried to define an entity with xstring field and set relevant header fields (content type etc) but it seems that the gateway framework classes that runs AFTER my custom DPC class code is changing it).

Regards,

Omri

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 24, 2017 at 11:59 AM

    Solved it on my own by using ICM cache.

    https://github.com/CmIm/sapui5-display_smartform_pdf/blob/master/Z_TEST_PDF_DISPLAY

    Instead of returning file (xstring) I'm returning a link to file (url) which is saved on ICM cache.

    Regards,

    Omri

    Add comment
    10|10000 characters needed characters exceeded