<?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 Problem reading DATASET into xstring in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562414#M254209</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 am facing a curious problem where I'd appreciate a helping hand: when I read data from a dataset into a variable of fixed-length, everything works fine. When I try to do the same with a variable-length type, nothing is read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works fine:&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;DATA binarydata(32000) TYPE x, &lt;/P&gt;&lt;P&gt;     alen TYPE i.&lt;/P&gt;&lt;P&gt;OPEN DATASET filename FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;READ DATASET filename INTO binarydata ACTUAL LENGTH alen.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here alen contains the correct number of bytes read (eg. 19000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I try:&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;DATA binarydata TYPE xstring, &lt;/P&gt;&lt;P&gt;     alen TYPE i.&lt;/P&gt;&lt;P&gt;OPEN DATASET filename FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;READ DATASET filename INTO binarydata ACTUAL LENGTH alen.&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;Here alen is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody tell me what's wrong here ?&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Heiko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Sep 2006 16:19:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-28T16:19:49Z</dc:date>
    <item>
      <title>Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562414#M254209</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 am facing a curious problem where I'd appreciate a helping hand: when I read data from a dataset into a variable of fixed-length, everything works fine. When I try to do the same with a variable-length type, nothing is read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code works fine:&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;DATA binarydata(32000) TYPE x, &lt;/P&gt;&lt;P&gt;     alen TYPE i.&lt;/P&gt;&lt;P&gt;OPEN DATASET filename FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;READ DATASET filename INTO binarydata ACTUAL LENGTH alen.&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here alen contains the correct number of bytes read (eg. 19000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I try:&lt;/P&gt;&lt;P&gt;&amp;lt;i&amp;gt;DATA binarydata TYPE xstring, &lt;/P&gt;&lt;P&gt;     alen TYPE i.&lt;/P&gt;&lt;P&gt;OPEN DATASET filename FOR INPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;READ DATASET filename INTO binarydata ACTUAL LENGTH alen.&lt;/P&gt;&lt;P&gt;&amp;lt;/i&amp;gt;&lt;/P&gt;&lt;P&gt;Here alen is 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody tell me what's wrong here ?&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Heiko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 16:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562414#M254209</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T16:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562415#M254210</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;For the string one try giving mode as TEXT instead of BINARY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA binarydata TYPE xstring, &lt;/P&gt;&lt;P&gt;alen TYPE i.&lt;/P&gt;&lt;P&gt;OPEN DATASET filename FOR INPUT IN &amp;lt;b&amp;gt;TEXT&amp;lt;/b&amp;gt; MODE.&lt;/P&gt;&lt;P&gt;READ DATASET filename INTO binarydata ACTUAL LENGTH alen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2006 23:05:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562415#M254210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-28T23:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562416#M254211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naren,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry, if I do that, I get a shortdump saying "For the statement 'READ DATASET ... INTO f'                                only character-type data objects are supported at the argument position 'f'".                                        &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Heiko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2006 06:35:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562416#M254211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-29T06:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562417#M254212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Heiko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   If you are using NON-UNICODE system, please try by unselecting the checkbox "Unicode Checks Active" in program attributes. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   While using UNICODE system, need to use as STRING.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reason:&lt;/P&gt;&lt;P&gt;In UNICODE enabled or when Unicode Checks is active, system can transfer data between structures only when both are of characater format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, the data is read in text mode i.e character format but trying to move to XSRTING which is sequence of 'X' type characters. Hence resulting in dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just for your info:&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;The elementary data type STRING is similar to data type C and refers to a variable-length string. Accordingly, the elementary data type XSTRING is similar to data type X and refers to a variable-length byte sequence.&amp;lt;/b&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Hope the above info clarifies you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2006 07:07:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562417#M254212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-29T07:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562418#M254213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer which helps to clarify the issue. But I already face the next problem: when I unselect "Unicode Checks Active" (I am using a non-unicode system), I cannot activate my report. I get an error saying "The program 'Z_HEIKO_UPLOAD' is not Unicode-compatible, according to its program attributes". Any hints on how to solve that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Heiko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2006 09:15:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562418#M254213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-29T09:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562419#M254214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Heiko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   This error will be encountered in UNICODE system. To check the same, you can use menupath System-&amp;gt;Status.&lt;/P&gt;&lt;P&gt;   In tab SAP System Data, if &amp;lt;b&amp;gt;Unicode System&amp;lt;/b&amp;gt; has value 'YES', the system is unicode enabled. Please check whether the value is YES or NO in your system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Sep 2006 09:24:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562419#M254214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-29T09:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562420#M254215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Eswar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sorry for the late reply but I have been gone last week.&lt;/P&gt;&lt;P&gt;But regarding my problem: I had already checked System-&amp;gt;Status and for Unicode System it says "No".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Heiko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 19:37:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562420#M254215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-06T19:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem reading DATASET into xstring</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562421#M254216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Heiko&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check you report using transaction &amp;lt;b&amp;gt;UCCHECK&amp;lt;/b&amp;gt; and see what the report tells you about unicode-errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2006 20:23:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-reading-dataset-into-xstring/m-p/1562421#M254216</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-10-06T20:23:00Z</dc:date>
    </item>
  </channel>
</rss>

