<?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: Converting sapscript to PDF, store it on application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150749#M454070</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com" target="test_blank"&gt;http://www.sapbrain.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2007 14:35:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-10T14:35:52Z</dc:date>
    <item>
      <title>Converting sapscript to PDF, store it on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150748#M454069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have gone through this entire forum a couple of times, and I cannot seem to find a solution for my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Firstly, I am using SAP version 46C.  Most solutions proposed use syntax or FM not available in 46C!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using function module CONVERT_OTFSPOOLJOB_2_PDF to convert sapscript to PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on all your help so far, I have managed the space problem and converted length 134 to 255.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then download teh information using the open dataset &amp;lt;&amp;gt; for output in binary mode command.&lt;/P&gt;&lt;P&gt;I think what is needed is to convert the character sting to a binary string? But the FM proposed in previous threads does not exist in our version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give away a million to get this solved!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function z_create_pdf_file.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(RQIDENT) LIKE  TSP01-RQIDENT&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      PDF STRUCTURE  TLINE&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  call function 'CONVERT_OTFSPOOLJOB_2_PDF'&lt;/P&gt;&lt;P&gt;    exporting&lt;/P&gt;&lt;P&gt;      src_spoolid                    = rqident&lt;/P&gt;&lt;P&gt;      no_dialog                      = c_no&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    dst_device                     = c_device&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PDF_DESTINATION                =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   importing&lt;/P&gt;&lt;P&gt;     pdf_bytecount                  = bin_filesize&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PDF_SPOOLID                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTF_PAGECOUNT                  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BTC_JOBNAME                    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BTC_JOBCOUNT                   =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   tables&lt;/P&gt;&lt;P&gt;     pdf                            = pdf&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_NO_OTF_SPOOLJOB            = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_NO_SPOOLJOB                = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_NO_PERMISSION              = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_CONV_NOT_POSSIBLE          = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_BAD_DSTDEVICE              = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  USER_CANCELLED                 = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_SPOOLERROR                 = 7&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_TEMSEERROR                 = 8&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_BTCJOB_OPEN_FAILED         = 9&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_BTCJOB_SUBMIT_FAILED       = 10&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ERR_BTCJOB_CLOSE_FAILED        = 11&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  OTHERS                         = 12&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: itab type tline,&lt;/P&gt;&lt;P&gt;        output type string,&lt;/P&gt;&lt;P&gt;        outputx type string,&lt;/P&gt;&lt;P&gt;        pdf2(255) occurs 0 with header line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Make sure spaces is not dropped.&lt;/P&gt;&lt;P&gt;  loop at pdf into itab.&lt;/P&gt;&lt;P&gt;    translate itab using ' ~'.&lt;/P&gt;&lt;P&gt;    concatenate output itab into output.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  translate output using '~ '.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Transfer 134 spaces into 255 spaces&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    pdf2 = output.&lt;/P&gt;&lt;P&gt;    append pdf2.&lt;/P&gt;&lt;P&gt;    shift output left by 255 places.&lt;/P&gt;&lt;P&gt;    if output is initial.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: outfile(40) value '/TMP/ABAP4/TRY1.PDF'.&lt;/P&gt;&lt;P&gt;  open dataset outfile for output in binary mode.&lt;/P&gt;&lt;P&gt;  loop at pdf2.&lt;/P&gt;&lt;P&gt;    transfer pdf2 to outfile.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;  close dataset outfile.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 14:16:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150748#M454069</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T14:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Converting sapscript to PDF, store it on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150749#M454070</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;Check the following link:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com" target="test_blank"&gt;http://www.sapbrain.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhaskar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 14:35:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150749#M454070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T14:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Converting sapscript to PDF, store it on application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150750#M454071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bhaskar&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I have not used this website before, it's not really user friendly. I tried to search for PDF, but found no hits?  How do I search?  Is there somewhere specific where I must look?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2007 17:38:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-sapscript-to-pdf-store-it-on-application-server/m-p/2150750#M454071</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-10T17:38:17Z</dc:date>
    </item>
  </channel>
</rss>

