<?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: Can't read with OPEN DATASET in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745773#M1113179</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI SY-SUBRC 8..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it should be some thing to do with the &lt;STRONG&gt;p_file&lt;/STRONG&gt; make sure you are using the same case.. the path p_file is case sensitive.... check in tr. AL11 how are the paths defined.. and get the p_file exactly the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Nov 2008 13:54:07 GMT</pubDate>
    <dc:creator>former_member156446</dc:creator>
    <dc:date>2008-11-03T13:54:07Z</dc:date>
    <item>
      <title>Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745766#M1113172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm reading some files(TXT) from server with this command:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL 'SYSTEM' ID 'COMMAND' FIELD lv_command&lt;/P&gt;&lt;P&gt;                ID 'TAB'     FIELD lt_result-&lt;STRONG&gt;sys&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point i have my lt_result table filled with archives names.&lt;/P&gt;&lt;P&gt;They all have full permission: - rwxrwxrwx. Then i use the OPEN DATASET command  to get data from each archive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_file FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I can perfectly read some of them but i keep getting sy-subrc = 8(The file could not be opened) at others...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to solve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:21:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745766#M1113172</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T13:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745767#M1113173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check any open datasets prior to that. and also how you defined p_file..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:23:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745767#M1113173</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T13:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745768#M1113174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p_file          LIKE rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked and there is no prior open dataset...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:27:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745768#M1113174</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T13:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745769#M1113175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And also  i'm doing this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      READ DATASET p_file INTO ttp_arq11 LENGTH leng.&lt;/P&gt;&lt;P&gt;      .....&lt;/P&gt;&lt;P&gt;     CLOSE DATASET p_file.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF i_arq,&lt;/P&gt;&lt;P&gt;        line(999),&lt;/P&gt;&lt;P&gt;       END OF i_arq.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: leng(3)   TYPE n VALUE 999.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745769#M1113175</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T13:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745770#M1113176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what are those files which you can't open/read using the open dataset.&lt;/P&gt;&lt;P&gt;are they normal text files or any thing else.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:34:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745770#M1113176</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T13:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745771#M1113177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Normal text files:  name_of_file.txt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:37:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745771#M1113177</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T13:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745772#M1113178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i thought they are not normal ones. may be they are associated with some code page etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:53:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745772#M1113178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T13:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745773#M1113179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI SY-SUBRC 8..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then it should be some thing to do with the &lt;STRONG&gt;p_file&lt;/STRONG&gt; make sure you are using the same case.. the path p_file is case sensitive.... check in tr. AL11 how are the paths defined.. and get the p_file exactly the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:54:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745773#M1113179</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-11-03T13:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745774#M1113180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vijay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by code page?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 13:58:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745774#M1113180</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T13:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745775#M1113181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the path is correct otherwise i wouldnt be able to read other files...I get sy-subrc = 8 only with a couple of files...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 14:00:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745775#M1113181</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T14:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745776#M1113182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try opening the file using tcode cg3y .If you able we can then need to trouble shoot . if not then might be an authorization issue or file might be error. pls let us know the out come.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 14:05:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745776#M1113182</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745777#M1113183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know any other transaction to do this?&lt;/P&gt;&lt;P&gt;Because cg3y only accepts fields with max 60 lenght and my path has 70 lenght ( with file name included ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 14:16:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745777#M1113183</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T14:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745778#M1113184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try to do some exception handling while opening the dataset and reading the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like this :&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA : lex_file_open TYPE REF TO cx_sy_file_open,
         lex_file_access TYPE REF TO cx_sy_file_access_error,
         lex_file_io TYPE REF TO cx_sy_file_io,
         lex_root type ref to cx_root.

* Try to open the data set and catch the appropriate exception
  TRY.

      OPEN DATASET l_fsap FOR OUTPUT IN BINARY MODE.

    CATCH cx_sy_file_open INTO lex_file_open.
      MESSAGE lex_file_open-&amp;gt;errortext TYPE 'I'.
    CATCH cx_sy_file_access_error INTO lex_file_access.
      MESSAGE lex_file_access-&amp;gt;filename TYPE 'I'.
    catch CX_ROOT into lex_root...                        " any Other exceptions


  ENDTRY.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, for read dataset also handle the exceptions. You might  get the exact root cause why the files are not being read.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 14:17:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745778#M1113184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-03T14:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can't read with OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745779#M1113185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The prolem was the file's extension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file_name.txt  is different from file_name.TXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said, it's case sensitive. I just changed my code to search for both cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Danilo Henriques on Nov 3, 2008 8:47 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2008 19:44:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/can-t-read-with-open-dataset/m-p/4745779#M1113185</guid>
      <dc:creator>danilo_henriques</dc:creator>
      <dc:date>2008-11-03T19:44:00Z</dc:date>
    </item>
  </channel>
</rss>

