<?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: Problem with READ DATASET when reading file from app server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676769#M1448925</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to wonder what an RTF file looks like if it's sitting on the APPS server?  Probably isn't true RTF format anymore, is it?  Maybe just gobbledy-gook now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If something gets saved to APPS server, I'd want to be sure it was in tab- or comma-delimited or space delimited (fixed length) format, so that I could actually read it and work with it in an SAP program.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you have the file put back out as tab-delimted(.txt), or comma-separated-values (csv) or fixed length text (.txt) and try to read it that way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Mar 2010 16:08:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-18T16:08:15Z</dc:date>
    <item>
      <title>Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676759#M1448915</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;wondering if anyone can help, I'm using the following code to read from a file on app server, the file is of type .rtf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET file_rtf FOR INPUT IN TEXT MODE&lt;/P&gt;&lt;P&gt;                             ENCODING DEFAULT&lt;/P&gt;&lt;P&gt;                             WITH SMART LINEFEED.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET file_rtf INTO string.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the open dataset part works sy-subrc = 0, but the read returns sy-subrc = 8 and no data is passed to string. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas as to what is causing this problem appreciated, &lt;EM&gt;&amp;lt;removed&amp;gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Edited by: Thomas Zloch on Mar 17, 2010 3:57 PM - please don't offer p...&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 14:52:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676759#M1448915</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-17T14:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676760#M1448916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code in the below link has details about how to read/write to application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Application server file operartions|http://www.divulgesap.com/blog.php?p=NDk=]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let us know if you have any issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 14:58:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676760#M1448916</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T14:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676761#M1448917</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 suspect that file has not been written to the server properly!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try to download the file to presentation server using T-code &lt;STRONG&gt;CG3Y&lt;/STRONG&gt; and see? If it is success here then just debug and see how SAP is handling. If it fails here also means that the file is not written properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 15:02:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676761#M1448917</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-17T15:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676762#M1448918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the swift response, unfortuantly I'm writing this program in BI so unable to use transaction cg3y, however, the file content looks as expected when previewed in al11&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 15:18:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676762#M1448918</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-17T15:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676763#M1448919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
data: lv_line type string.
OPEN DATASET file_rtf FOR INPUT IN TEXT MODE
ENCODING DEFAULT
WITH SMART LINEFEED.
 if sy-subrc eq 0.     "was open actually successful?
DO.
READ DATASET file_rtf INTO lv_line." string.
IF SY-SUBRC NE 0.  "exit when NOT EQUAL...
EXIT.
ENDIF.
ENDDO.
close dataset file_rtf.
endif.
 &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggest you make these changes and retry...verify return code after open and after read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 19:13:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676763#M1448919</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-17T19:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676764#M1448920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks breakpoint, I should have clarified, the open dataset statement is successful (sy-subrc = 0), bur the read dataset fails sy-subrc = 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;F1 help states that this is because the end of file has been reached, so unsure why no data transferred to the string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:16:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676764#M1448920</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-18T10:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676765#M1448921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like you are trying to transfer your data read from appl.server file into a variable of type &lt;EM&gt;string&lt;/EM&gt;.Instead use a variable of type Character of length around 4000/8000 (which ever suits ur need) and re-run the code.&lt;/P&gt;&lt;P&gt;I think it should help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Dedeepya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 10:31:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676765#M1448921</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T10:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676766#M1448922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dedeepya, have followed your advice,  the read dataset still returns sy-subrc 4, but I now get a hexadecimal values off 200020002000.... at certain offset points.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:16:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676766#M1448922</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-18T11:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676767#M1448923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any specific reason that you are using WITH SMART LINEFEED ? Can you just comment that part and use OPEN DATASET FOR INPUT ENCODING DEFAULT and check.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:27:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676767#M1448923</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T11:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676768#M1448924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Asmita, with smart linefeed was added following Breakpoint input, removed and no change to read dataset which is the problem, the file opens successfully.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 11:32:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676768#M1448924</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-18T11:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676769#M1448925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have to wonder what an RTF file looks like if it's sitting on the APPS server?  Probably isn't true RTF format anymore, is it?  Maybe just gobbledy-gook now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If something gets saved to APPS server, I'd want to be sure it was in tab- or comma-delimited or space delimited (fixed length) format, so that I could actually read it and work with it in an SAP program.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you have the file put back out as tab-delimted(.txt), or comma-separated-values (csv) or fixed length text (.txt) and try to read it that way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 16:08:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676769#M1448925</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T16:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676770#M1448926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are reading an .RTF file, you should open it in binary mode. Not text mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you intending to use the file for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot open a true .RTF file and use it the way you use a regular text file. Either you should use a text file or open the rtf in binary mode and find a way to convert it to text. Try function SO_RTF_TO_RAW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Mar 2010 16:17:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676770#M1448926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-18T16:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676771#M1448927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank for all your contributions, problem was to do with rtf format, so reverted to binary and rebuilt as text. Points awarded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 08:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676771#M1448927</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-19T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676772#M1448928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the question still shows unanswered. but that ok. can you just confirm if function SO_RTF_TO_RAW worked?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 15:47:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676772#M1448928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-19T15:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with READ DATASET when reading file from app server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676773#M1448929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting errors when trying to close thread, will keep trying, thanks again. Oh and it worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Mar 2010 16:08:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-read-dataset-when-reading-file-from-app-server/m-p/6676773#M1448929</guid>
      <dc:creator>former_member444451</dc:creator>
      <dc:date>2010-03-19T16:08:05Z</dc:date>
    </item>
  </channel>
</rss>

