Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Issue in opening PDF on click of button

$
0
0

Hi experts,

 

We are trying to open PDF document created through Adobe Forms on event handler of a button through following code:

 

DATA: witab       TYPE TABLE OF tline,
      itab        TYPE tline,
      outputx     TYPE xstring,
      display_url TYPE string.

FIELD-SYMBOLS: <p> TYPE x.


*LOOP AT witab INTO itab .
*    ASSIGN itab TO <p> CASTING TYPE x.
*    CONCATENATE outputx <p> INTO outputx IN BYTE MODE.
*  ENDLOOP.

  response->set_data( data = fp_output_pdf-pdf ).

  response->set_header_field( name = 'content-type'
                              value = 'application/pdf' ).

  response->set_header_field( name = 'cache-control'
                              value = 'max-age=0' ).

  CONCATENATE 'attachment; filename=' 'test.pdf'
    INTO display_url.

  response->set_header_field( name = 'content-disposition'
                              value = display_url ).

  navigation->response_complete( ).

 

 

But it gives a junk output.

 

I checked lot of threads but none helped.

 

Can anyone help in getting PDF opened in eventhandler ?

 

 

Thank you.

 

Best Regards

Vikas


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>