<?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: send pdf with web service, using base64 encode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544962#M20445</link>
    <description>&lt;P&gt;So, you have a bug in your code, but how could we tell you what/where it is.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 20:42:52 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2017-11-17T20:42:52Z</dc:date>
    <item>
      <title>send pdf with web service, using base64 encode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544961#M20444</link>
      <description>&lt;P&gt;Hi Gurus,&lt;/P&gt;
  &lt;P&gt;I have a PDF in from a smartform using CONVERT_OTF and i can see pdf with GUI_DOWNLOAD. but i need to send it with base64 format, i used SCMS_BINARY_TO_XSTRING and convert base64 but it doesnt work.&lt;/P&gt;
  &lt;P&gt;Does anyone have any advice for me?&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 13:26:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544961#M20444</guid>
      <dc:creator>former_member382607</dc:creator>
      <dc:date>2017-11-17T13:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: send pdf with web service, using base64 encode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544962#M20445</link>
      <description>&lt;P&gt;So, you have a bug in your code, but how could we tell you what/where it is.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 20:42:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544962#M20445</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-17T20:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: send pdf with web service, using base64 encode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544963#M20446</link>
      <description>&lt;P&gt;thank you for answer,&lt;/P&gt;
  &lt;P&gt;here is my code,&lt;/P&gt;
  &lt;P&gt;I submit a program in fm,&lt;BR /&gt; &lt;BR /&gt; *** program codes&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'CONVERT_OTF'&lt;BR /&gt; EXPORTING&lt;BR /&gt; format = 'PDF'&lt;BR /&gt; archive_index = archive_index&lt;BR /&gt; IMPORTING&lt;BR /&gt; bin_filesize = lv_bin_filesize&lt;BR /&gt; TABLES&lt;BR /&gt; otf = otf-otfdata&lt;BR /&gt; lines = it_lines&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; err_conv_not_possible = 1.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'SCMS_BINARY_TO_XSTRING'&lt;BR /&gt; EXPORTING&lt;BR /&gt; input_length = lv_bin_filesize&lt;BR /&gt; IMPORTING&lt;BR /&gt; buffer = lv_xstring&lt;BR /&gt; TABLES&lt;BR /&gt; binary_tab = it_lines&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; failed = 1&lt;BR /&gt; OTHERS = 2.&lt;BR /&gt; IF sy-subrc EQ 0.&lt;BR /&gt; gt_py-xspdf = lv_xstring.&lt;BR /&gt; APPEND gt_py.&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; IF gt_py[] IS NOT INITIAL.&lt;BR /&gt; EXPORT gt_py TO SHARED BUFFER indx(st) ID 'ZTEMP'.&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; *** function module codes&lt;BR /&gt; &lt;BR /&gt; IMPORT gt_py FROM SHARED BUFFER indx(st) ID 'ZTEMP'.&lt;BR /&gt; &lt;BR /&gt; IF sy-subrc EQ 0.&lt;BR /&gt; READ TABLE gt_py INDEX 1.&lt;BR /&gt; IF sy-subrc EQ 0.&lt;BR /&gt; lv_pdf = gt_py-xspdf.&lt;BR /&gt; ENDIF.&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; CALL FUNCTION 'SSFC_BASE64_ENCODE'&lt;BR /&gt; EXPORTING&lt;BR /&gt; bindata = lv_pdf&lt;BR /&gt; binleng = lv_length&lt;BR /&gt; IMPORTING&lt;BR /&gt; b64data = lv_base64&lt;BR /&gt; EXCEPTIONS&lt;BR /&gt; ssf_krn_error = 1&lt;BR /&gt; ssf_krn_noop = 2&lt;BR /&gt; ssf_krn_nomemory = 3&lt;BR /&gt; ssf_krn_opinv = 4&lt;BR /&gt; ssf_krn_input_data_error = 5&lt;BR /&gt; ssf_krn_invalid_par = 6&lt;BR /&gt; ssf_krn_invalid_parlen = 7&lt;BR /&gt; OTHERS = 8.&lt;/P&gt;
  &lt;P&gt;i cant see lv_base64 like a pdf.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 06:35:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544963#M20446</guid>
      <dc:creator>former_member382607</dc:creator>
      <dc:date>2017-11-23T06:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: send pdf with web service, using base64 encode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544964#M20447</link>
      <description>&lt;P&gt;Based on the code you have posted, I can tell:&lt;/P&gt;
  &lt;UL&gt;
   &lt;LI&gt;you export the PDF as a table of fixed-length lines, but you don't export the length in bytes, how can you deduce it when you convert to base 64 (how do you calculate LV_LENGTH?)&lt;/LI&gt;
   &lt;LI&gt;why don't you retrieve directly the xstring parameter from CONVERT_OTF, containing the PDF, and exporting it as is.&lt;/LI&gt;
  &lt;/UL&gt;
  &lt;P&gt;But I still don't understand why you say "it doesn't work", and "cant see base 64 like a pdf". What do you mean exactly? What did you try? Please give concrete and clear examples, eventually screen shots, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2017 07:14:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544964#M20447</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-11-23T07:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: send pdf with web service, using base64 encode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544965#M20448</link>
      <description>&lt;P&gt;i try to send payslip pdf with web services using base64 format. payslip is calculated a program so i used submit in a function module.&lt;/P&gt;
  &lt;P&gt;lv_length is not calculated.&lt;/P&gt;
  &lt;P&gt;the company which use my web service said me 'we decode your webservice value, but it doesnt work'.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 09:45:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/send-pdf-with-web-service-using-base64-encode/m-p/544965#M20448</guid>
      <dc:creator>former_member382607</dc:creator>
      <dc:date>2017-11-29T09:45:58Z</dc:date>
    </item>
  </channel>
</rss>

