Skip to Content
avatar image
Former Member

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

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 ).

1.jpg (69.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 04, 2014 at 10:48 AM

    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: Opening a Smartform in Web Dynpro ABAP

    Hope this helps u,

    Regards,

    Kiran

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 04, 2014 at 10:52 AM

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

    Add comment
    10|10000 characters needed characters exceeded