<?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: How to read a file IN BINARY MODE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771821#M1306695</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for your replies, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the split option is not valid because I've no mark to know when there is a end of line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I were checking the refered link but any of my test worked, it allways returns all the data contained on the file, so which is the correct option to read only one line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jun 2009 10:12:05 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-17T10:12:05Z</dc:date>
    <item>
      <title>How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771818#M1306692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a file on the AL11 which I need to read in binary mode line by line. &lt;/P&gt;&lt;P&gt;I've did it but I cant reach to do line by line, when the read dataset sentence is executed it returns all the data contained in the file and, as there is any kind of character which can be used as separator I'm not able to know how to split it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to read only one line? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance, &lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:33:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771818#M1306692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771819#M1306693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use &lt;STRONG&gt;SPLIT&lt;/STRONG&gt; command for splitting the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer following code:&lt;/P&gt;&lt;P&gt;==================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Local data delaration.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: v_string TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Opening the file from the given location.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;OPEN DATASET p_pathup FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF sy-subrc 0.&lt;/P&gt;&lt;P&gt;MESSAGE i000 WITH text-018.&lt;/P&gt;&lt;P&gt;LEAVE LIST-PROCESSING.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;File opened, Reading the contents and transfering to internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET p_pathup INTO v_string.&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;SPLIT v_string AT c_sep&lt;/P&gt;&lt;P&gt;INTO w_upload-lifnr&lt;/P&gt;&lt;P&gt;w_upload-loevm_ven&lt;/P&gt;&lt;P&gt;w_upload-banksrec&lt;/P&gt;&lt;P&gt;w_upload-bankkrec&lt;/P&gt;&lt;P&gt;w_upload-banknrec&lt;/P&gt;&lt;P&gt;w_upload-loevm_rec&lt;/P&gt;&lt;P&gt;w_upload-waers&lt;/P&gt;&lt;P&gt;w_upload-bankssnd&lt;/P&gt;&lt;P&gt;w_upload-bankksnd&lt;/P&gt;&lt;P&gt;w_upload-loevm_snd&lt;/P&gt;&lt;P&gt;w_upload-chainno&lt;/P&gt;&lt;P&gt;w_upload-chainbankt&lt;/P&gt;&lt;P&gt;w_upload-chainbanks&lt;/P&gt;&lt;P&gt;w_upload-chainbankk&lt;/P&gt;&lt;P&gt;w_upload-chainbankn&lt;/P&gt;&lt;P&gt;w_upload-loevm_cor.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND w_upload TO i_upload.&lt;/P&gt;&lt;P&gt;CLEAR: w_upload,&lt;/P&gt;&lt;P&gt;v_string.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Closing the file.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLOSE DATASET p_pathup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any help on understanding the logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:35:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771819#M1306693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771820#M1306694</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;Refer the link &lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3cda358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3cda358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 09:37:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771820#M1306694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T09:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771821#M1306695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for your replies, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the split option is not valid because I've no mark to know when there is a end of line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I were checking the refered link but any of my test worked, it allways returns all the data contained on the file, so which is the correct option to read only one line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 10:12:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771821#M1306695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T10:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771822#M1306696</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;OPEN DATASET p_pathup FOR INPUT IN BINARY MODE ENCODING DEFAULT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;give binary instead of text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope it'll help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sneha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 10:15:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771822#M1306696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T10:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771823#M1306697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Sneha, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this instruction return all the data conteined on the file on a single execution, is there any option to read the data line by line as in the text mode? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 10:24:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771823#M1306697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T10:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to read a file IN BINARY MODE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771824#M1306698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you open a file in binary mode, the system expects an unstructured sequence of bytes in the file. If you have fixed number of bytes in a line, then try using the MAXIMUM LENGTH addition while reading the file.&lt;/P&gt;&lt;P&gt;   Why do you have to read the file in binary mode only?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Susanta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 13:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-a-file-in-binary-mode/m-p/5771824#M1306698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-17T13:26:33Z</dc:date>
    </item>
  </channel>
</rss>

