cancel
Showing results for 
Search instead for 
Did you mean: 

not able to open pdf file ( smart form from webdynpro )

Former Member
0 Kudos

Dear friends,

while trying to download pdf file from webdynpro i am getting the following error ( pls check the screen shot and also my  code )

could any one please let me know what's the issue

Thanks

Vijaya

data    v_bin_filesize           TYPE i,

           st_job_output_info       TYPE ssfcrescl,

            bin_pdfx TYPE xstring,

data  : it_docs     TYPE STANDARD TABLE OF docs,

          it_lines    TYPE STANDARD TABLE OF tline.

data : lv_file_name type string.

          lv_file_name = 'PDFSMARTFORM.PDF'.

CALL FUNCTION 'CONVERT_OTF_2_PDF'

* EXPORTING

*   USE_OTF_MC_CMD               = 'X'

*   ARCHIVE_INDEX                =

     IMPORTING

       bin_filesize           = v_bin_filesize

     TABLES

       otf                    = st_job_output_info-otfdata

       doctab_archive         = it_docs

       lines                  = it_lines

     EXCEPTIONS

       err_conv_not_possible  = 1

       err_otf_mc_noendmarker = 2

       OTHERS                 = 3.

   

   cl_wd_runtime_services=>attach_file_to_response(

   i_filename = lv_file_name

   i_content = bin_pdfx

   i_mime_type = 'application/pdf'

   i_in_new_window = abap_false

   i_inplace       = abap_false ).

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

I think the binary file conversion was not done properly( you haven't filled bin_pdfx, its the otf_data ). OR, Use CONVERT_OTF FM and pass format as PDF. Check this document for reference:

Hope this helps u,

Regards,

Kiran

Former Member
0 Kudos

Hi Kiran

Thanks

Its working now

Answers (1)

Answers (1)

Former Member
0 Kudos

what is bin_pdfx in your code? it is not filled anywhere.