<?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: reading stat file in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590989#M1274595</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;you need to read lines into character type variable and then parse it into your structure if your program is unicode. Here is one paragraph from ABAP documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check also ABAP documentation for statements like OPEN DATASET and READ DATASET. There are some examples as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2009 02:06:10 GMT</pubDate>
    <dc:creator>mvoros</dc:creator>
    <dc:date>2009-05-14T02:06:10Z</dc:date>
    <item>
      <title>reading stat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590988#M1274594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guru's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using  &lt;STRONG&gt;open dataset&lt;/STRONG&gt; to read a stat file. It always gives me the binary format of the data. Below is the code snippet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dset for INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'Error in opening file'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    READ DATASET dset into wa_upload MAXIMUM LENGTH 2000.&lt;/P&gt;&lt;P&gt;    IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;The "wa_upload" has the same format as the stat file. How to read as a text format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2009 18:20:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590988#M1274594</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-13T18:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: reading stat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590989#M1274595</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;you need to read lines into character type variable and then parse it into your structure if your program is unicode. Here is one paragraph from ABAP documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement exports data from the file specified in dset into the data object dobj. For dobj, variables with elementary data types and flat structures can be specified. In Unicode programs, dobj must be character-type if the file was opened as a text file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check also ABAP documentation for statements like OPEN DATASET and READ DATASET. There are some examples as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 02:06:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590989#M1274595</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2009-05-14T02:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: reading stat file</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590990#M1274596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Martin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did have the object as character type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data wa_upload(2000) type C .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it still gives the binary format. It looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;22########RSCONN01##8RSSYSTDB##4####&lt;STRONG&gt;SE&lt;/STRONG&gt;&lt;STRONG&gt;SA&lt;/STRONG&gt;&amp;lt;#####&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raja.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2009 21:08:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-stat-file/m-p/5590990#M1274596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-14T21:08:41Z</dc:date>
    </item>
  </channel>
</rss>

