<?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 Convert file into XSTRING in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-file-into-xstring/m-p/3968616#M947971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want convert a file (es pdf txt doc) into XSTRING buffer to test some function, i do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    call function 'GUI_UPLOAD'
      exporting
        filename                      = UPATH
     IMPORTING
       FILELENGTH                    = length
      tables
        data_tab                      = STREAM
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;And now, i have the binary stream... i convert binary stream into XSTRING...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    call function 'SCMS_BINARY_TO_XSTRING'
      exporting
        input_length       = length
     IMPORTING
       BUFFER             = XSTREAM
      tables
        binary_tab         = STREAM
     EXCEPTIONS
       FAILED             = 1
       OTHERS             = 2
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But STREAM is a binary table, with a defined line of some char (not char but x).... And, after, when I use the stream i have a lot of white space... because the line of binary tab is 1024...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a standard line length!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I can do??? I want a correct XSTRING...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jun 2008 15:38:59 GMT</pubDate>
    <dc:creator>marco_modenese</dc:creator>
    <dc:date>2008-06-12T15:38:59Z</dc:date>
    <item>
      <title>Convert file into XSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-file-into-xstring/m-p/3968616#M947971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi expert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want convert a file (es pdf txt doc) into XSTRING buffer to test some function, i do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    call function 'GUI_UPLOAD'
      exporting
        filename                      = UPATH
     IMPORTING
       FILELENGTH                    = length
      tables
        data_tab                      = STREAM
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;And now, i have the binary stream... i convert binary stream into XSTRING...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    call function 'SCMS_BINARY_TO_XSTRING'
      exporting
        input_length       = length
     IMPORTING
       BUFFER             = XSTREAM
      tables
        binary_tab         = STREAM
     EXCEPTIONS
       FAILED             = 1
       OTHERS             = 2
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But STREAM is a binary table, with a defined line of some char (not char but x).... And, after, when I use the stream i have a lot of white space... because the line of binary tab is 1024...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have a standard line length!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I can do??? I want a correct XSTRING...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 15:38:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-file-into-xstring/m-p/3968616#M947971</guid>
      <dc:creator>marco_modenese</dc:creator>
      <dc:date>2008-06-12T15:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert file into XSTRING</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/convert-file-into-xstring/m-p/3968617#M947972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You might want to do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at stream&lt;/P&gt;&lt;P&gt;....move data to right deleting trailing space using command SHIFT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SHIFT stream right deleting trailing space.&lt;/P&gt;&lt;P&gt;.. this command will remove trailing white space..&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is this you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thnx,&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:11 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2008 16:11:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/convert-file-into-xstring/m-p/3968617#M947972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-12T16:11:30Z</dc:date>
    </item>
  </channel>
</rss>

