Quantcast
Channel: SCN : All Content - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 3667

Display a pdf after action

$
0
0

Hi all,

 

I'm working on a report which contains actions allowing the user to reach a a new page. In this new one, a pdf stored on the application server has to be displayed.

 

On the PDF view, I created an interactive form linked with my context (PDF_DATA-PDF : xstring)


       gv_filepath = '/tmp/test.pdf'.


       " Open the file in binary mode
       OPEN DATASETgv_filepath FOR INPUT IN BINARY MODE.


       IF sy-subrc = 0.
         READ DATASETgv_filepath INTO gv_filedata.
       

           IF sy-subrc = 0.
                CLOSE DATASETgv_filepath. "Close the file

                " Convert the file from hex-string to Binary format
                CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
                  EXPORTING
                    buffer        = gv_filedata
                  IMPORTING
                    output_length = gv_filesize
                  TABLES
                    binary_tab    = gt_bin_data.



************************

Here, I don't know what to do with this gt_bin_data....


************************


            lo_node = wd_context->get_child_node( 'PDF_DATA' ).
            lo_node->set_attribute( name = 'PDF' value = ?).

            wd_comp_controller->gestion_affichage().


         ENDIF.

       ENDIF.

Please suggest how do I handle this?
      


Viewing all articles
Browse latest Browse all 3667

Trending Articles