<?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 Re: PDF file Conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-conversion/m-p/3991862#M953685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE p_spoolno TO lv_spoolno.

* CONVERT THE SPOOL TO PDF
  CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid                    = lv_spoolno
      no_dialog                      = lc_no_dialog
*     DST_DEVICE                     =
*     PDF_DESTINATION                =
   IMPORTING
     pdf_bytecount                  = lv_bytecount
*     PDF_SPOOLID                    =
*     OTF_PAGECOUNT                  =
*     BTC_JOBNAME                    =
*     BTC_JOBCOUNT                   =
   TABLES
     pdf                            = gt_pdf_output
   EXCEPTIONS
     err_no_otf_spooljob            = 1
     err_no_spooljob                = 2
     err_no_permission              = 3
     err_conv_not_possible          = 4
     err_bad_dstdevice              = 5
     user_cancelled                 = 6
     err_spoolerror                 = 7
     err_temseerror                 = 8
     err_btcjob_open_failed         = 9
     err_btcjob_submit_failed       = 10
     err_btcjob_close_failed        = 11
     OTHERS                         = 12
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
* Transfer the 132-long strings to 255-long strings
    LOOP AT gt_pdf_output INTO wa_pdf_output.
      TRANSLATE wa_pdf_output USING ' ~'.
      CONCATENATE v_buffer wa_pdf_output INTO v_buffer.
      MODIFY gt_pdf_output FROM wa_pdf_output.
      CLEAR wa_pdf_output.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;TO CONVERT THE DATA INTO PDF FORMAT ELSE THE PDF FILE*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;WON'T OPEN &amp;amp; REPORT WOULD GIVE A MESSAGE THAT*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;THE FILE IS DAMAGED &amp;amp; COULD NOT BE OPENED*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRANSLATE v_buffer USING '~ '.

    CLEAR : wa_messg_att,
            gt_messg_att.

    DO.
      wa_messg_att = v_buffer.
      APPEND wa_messg_att TO gt_messg_att.
      SHIFT v_buffer LEFT BY 255 PLACES.
      IF v_buffer IS INITIAL.
        EXIT.
      ENDIF.
      CLEAR wa_messg_att.
    ENDDO.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jun 2008 11:54:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-10T11:54:36Z</dc:date>
    <item>
      <title>PDF file Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-conversion/m-p/3991861#M953684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAP, SOST Transaction, we can see the pdf document of delivery, but when send to the customers by email, the pdf file doesn't open at customer end.SOST sends this &lt;/P&gt;&lt;P&gt;It gives the file conversion error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What we can do from developer's perspective to solve this ?&lt;/P&gt;&lt;P&gt;Is this a ABAP issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 11:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-conversion/m-p/3991861#M953684</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-10T11:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file Conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-conversion/m-p/3991862#M953685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;MOVE p_spoolno TO lv_spoolno.

* CONVERT THE SPOOL TO PDF
  CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid                    = lv_spoolno
      no_dialog                      = lc_no_dialog
*     DST_DEVICE                     =
*     PDF_DESTINATION                =
   IMPORTING
     pdf_bytecount                  = lv_bytecount
*     PDF_SPOOLID                    =
*     OTF_PAGECOUNT                  =
*     BTC_JOBNAME                    =
*     BTC_JOBCOUNT                   =
   TABLES
     pdf                            = gt_pdf_output
   EXCEPTIONS
     err_no_otf_spooljob            = 1
     err_no_spooljob                = 2
     err_no_permission              = 3
     err_conv_not_possible          = 4
     err_bad_dstdevice              = 5
     user_cancelled                 = 6
     err_spoolerror                 = 7
     err_temseerror                 = 8
     err_btcjob_open_failed         = 9
     err_btcjob_submit_failed       = 10
     err_btcjob_close_failed        = 11
     OTHERS                         = 12
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.
* Transfer the 132-long strings to 255-long strings
    LOOP AT gt_pdf_output INTO wa_pdf_output.
      TRANSLATE wa_pdf_output USING ' ~'.
      CONCATENATE v_buffer wa_pdf_output INTO v_buffer.
      MODIFY gt_pdf_output FROM wa_pdf_output.
      CLEAR wa_pdf_output.
    ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;TO CONVERT THE DATA INTO PDF FORMAT ELSE THE PDF FILE*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;WON'T OPEN &amp;amp; REPORT WOULD GIVE A MESSAGE THAT*&lt;/P&gt;&lt;/LI&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;THE FILE IS DAMAGED &amp;amp; COULD NOT BE OPENED*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TRANSLATE v_buffer USING '~ '.

    CLEAR : wa_messg_att,
            gt_messg_att.

    DO.
      wa_messg_att = v_buffer.
      APPEND wa_messg_att TO gt_messg_att.
      SHIFT v_buffer LEFT BY 255 PLACES.
      IF v_buffer IS INITIAL.
        EXIT.
      ENDIF.
      CLEAR wa_messg_att.
    ENDDO.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 11:54:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-conversion/m-p/3991862#M953685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-10T11:54:36Z</dc:date>
    </item>
  </channel>
</rss>

