<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic smart form  pdf file opening error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433168#M206884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i developed a smart form and converted to pdf file and downloaded the same into my desktop using GUI_DOWNLOAD fn module .but when im trying to open the file a pop up is appearing stating that the file is damaged.wat could be the problem.plz help me....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;DurgaPrasad.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 02 Jul 2006 17:33:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-07-02T17:33:00Z</dc:date>
    <item>
      <title>smart form  pdf file opening error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433168#M206884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i developed a smart form and converted to pdf file and downloaded the same into my desktop using GUI_DOWNLOAD fn module .but when im trying to open the file a pop up is appearing stating that the file is damaged.wat could be the problem.plz help me....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank in advance...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;DurgaPrasad.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Jul 2006 17:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433168#M206884</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-02T17:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: smart form  pdf file opening error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433169#M206885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you paste the code would be good to identify the problem&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the steps to convert to PDF, I guess there is a problem while converting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. call the smart form FM&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;call function '/xxx/xxxx'
EXPORTING
user_settings = space
control_parameters = control_parameters
output_options = output_options
IMPORTING
job_output_info = output_data
TABLES
zsystems = lt_sys
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.

2. convert the OTF data to PDF

call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = l_pdf_len
bin_file = l_pdf_xstring
TABLES
OTF = OUTPUT_DATA-OTFDATA
LINES = LT_LINES
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 5.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Jul 2006 17:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433169#M206885</guid>
      <dc:creator>Manohar2u</dc:creator>
      <dc:date>2006-07-02T17:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: smart form  pdf file opening error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433170#M206886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used this code in my report and it works fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION w_nameform&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;      output_options     = output_options&lt;/P&gt;&lt;P&gt;      .................................... &lt;/P&gt;&lt;P&gt;   IMPORTING&lt;/P&gt;&lt;P&gt;      job_output_info    = job_output_info&lt;/P&gt;&lt;P&gt;      ....................................&lt;/P&gt;&lt;P&gt;   TABLES&lt;/P&gt;&lt;P&gt;      .................................... &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;      formatting_error   = 1&lt;/P&gt;&lt;P&gt;      internal_error     = 2&lt;/P&gt;&lt;P&gt;      send_error         = 3&lt;/P&gt;&lt;P&gt;      user_canceled      = 4&lt;/P&gt;&lt;P&gt;      OTHERS             = 5.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERT_OTF_2_PDF'&lt;/P&gt;&lt;P&gt;     IMPORTING&lt;/P&gt;&lt;P&gt;       bin_filesize           = filesize&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;       otf                    = job_output_info-otfdata&lt;/P&gt;&lt;P&gt;       doctab_archive         = doctab_archive&lt;/P&gt;&lt;P&gt;       lines                  = t_pdf&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;       err_conv_not_possible  = 1&lt;/P&gt;&lt;P&gt;       err_otf_mc_noendmarker = 2&lt;/P&gt;&lt;P&gt;       OTHERS                 = 3.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download&lt;/P&gt;&lt;P&gt;   EXPORTING&lt;/P&gt;&lt;P&gt;       bin_filesize            = filesize&lt;/P&gt;&lt;P&gt;       filename                = filename&lt;/P&gt;&lt;P&gt;       filetype                = 'BIN'&lt;/P&gt;&lt;P&gt;   CHANGING&lt;/P&gt;&lt;P&gt;       data_tab                = t_pdf&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;       file_write_error        = 1&lt;/P&gt;&lt;P&gt;       no_batch                = 2&lt;/P&gt;&lt;P&gt;       gui_refuse_filetransfer = 3&lt;/P&gt;&lt;P&gt;       invalid_type            = 4&lt;/P&gt;&lt;P&gt;       no_authority            = 5&lt;/P&gt;&lt;P&gt;       unknown_error           = 6&lt;/P&gt;&lt;P&gt;       header_not_allowed      = 7&lt;/P&gt;&lt;P&gt;       separator_not_allowed   = 8&lt;/P&gt;&lt;P&gt;       filesize_not_allowed    = 9&lt;/P&gt;&lt;P&gt;       header_too_long         = 10&lt;/P&gt;&lt;P&gt;       dp_error_create         = 11&lt;/P&gt;&lt;P&gt;       dp_error_send           = 12&lt;/P&gt;&lt;P&gt;       dp_error_write          = 13&lt;/P&gt;&lt;P&gt;       unknown_dp_error        = 14&lt;/P&gt;&lt;P&gt;       access_denied           = 15&lt;/P&gt;&lt;P&gt;       dp_out_of_memory        = 16&lt;/P&gt;&lt;P&gt;       disk_full               = 17&lt;/P&gt;&lt;P&gt;       dp_timeout              = 18&lt;/P&gt;&lt;P&gt;       file_not_found          = 19&lt;/P&gt;&lt;P&gt;       dataprovider_exception  = 20&lt;/P&gt;&lt;P&gt;       control_flush_error     = 21&lt;/P&gt;&lt;P&gt;       OTHERS                  = 22.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open file &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'WS_EXECUTE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        commandline        = filename&lt;/P&gt;&lt;P&gt;        program            = 'AcroRd32.exe'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        frontend_error     = 1&lt;/P&gt;&lt;P&gt;        no_batch           = 2&lt;/P&gt;&lt;P&gt;        prog_not_found     = 3&lt;/P&gt;&lt;P&gt;        illegal_option     = 4&lt;/P&gt;&lt;P&gt;        gui_refuse_execute = 5&lt;/P&gt;&lt;P&gt;        OTHERS             = 6.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Jul 2006 18:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433170#M206886</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-02T18:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: smart form  pdf file opening error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433171#M206887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DurgaPrasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PDF File opening error occurs when the file was created with empty data. I guess the internal table you were passing to PDF was empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check if you have enabled following option before calling Smart Form function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONTROL_PARAMETERS-GETOTF = 'X'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also make sure that you get the OTF data back from following internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOB_OUTPUT_INFO-OTFDATA&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sanjeev.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Sanjeev K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2006 02:41:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/smart-form-pdf-file-opening-error/m-p/1433171#M206887</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-07-03T02:41:45Z</dc:date>
    </item>
  </channel>
</rss>

