<?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: Open dataset in binary mode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287304#M1389306</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;It is the client's requirement. After downloading the file to application server, third party system will pick this file (their requirement is... the file should be in binary format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2009 07:15:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-23T07:15:21Z</dc:date>
    <item>
      <title>Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287299#M1389301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hellow ABAPers, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wish to download the file to application server in binary mode. When I tried to do it, it is converting into # symbols like below: &lt;/P&gt;&lt;P&gt;_________________________________&lt;/P&gt;&lt;P&gt;#&amp;lt;#?#x#m#l# #v#e#r#s#i#o#n#=#"#1#.#0#"# #e#n#c#o#d#i#n#g#=#"#U#T#F#-#8#"#?#&amp;gt;# # # # # # # # # # # # # # # # # # # # # # #&amp;lt;#F#i#n#a#n#c#e#-#R#e#q#&lt;/P&gt;&lt;P&gt;____________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Piece of code for the same is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OPEN DATASET LV_TBFILE FOR OUTPUT IN BINARY MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      LOOP AT PT_XML INTO WA_XML.&lt;/P&gt;&lt;P&gt;        TRANSFER WA_XML-LINE TO LV_TBFILE.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     CLOSE DATASET LV_TBFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to see the output in proper format in binary mode (without ###symbols)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2009 14:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287299#M1389301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-22T14:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287300#M1389302</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;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at pt_xml.
replace all occurences of CL_ABAP_CHAR_UTILITIES=&amp;gt;HORIZONTAL_TAB in pt_xml-line with space.
modify pt_xml.
endloop.

OPEN DATASET LV_TBFILE FOR OUTPUT IN BINARY MODE.

LOOP AT PT_XML INTO WA_XML.
TRANSFER WA_XML-LINE TO LV_TBFILE.
ENDLOOP.

CLOSE DATASET LV_TBFILE.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2009 16:24:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287300#M1389302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-22T16:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287301#M1389303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which application do you use to view the file? E.g. if you view the files via AL11 SAP will replace any control characters with the "#" sign. So if you haven't looked at the file in a hex editor yet, I'd download it and do that. (The output looks almost like some encoding issue, because the XML seems to claim UTF-8, which should be one byte per character for ASCII symbols, not two bytes as it seems in your output...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what's the definition of your table PT_XML?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2009 17:54:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287301#M1389303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-22T17:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287302#M1389304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your replay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My internal table declaration is like below:&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="--------------------------------" /&gt;&lt;P&gt;TYPES: BEGIN OF TY_XML,&lt;/P&gt;&lt;P&gt;       LINE TYPE CHAR120,&lt;/P&gt;&lt;P&gt;       END OF TY_XML.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also, Yes...  I am actually passing the xml data to this internal table for downloading. If I download it in text mode, the data would be like as below in AL11(showing only few lines of data)....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------" /&gt;&lt;P&gt;Directory:  /usr/sap/FED/iface/coop/outbox&lt;/P&gt;&lt;P&gt;Name:       CAPUTPFIN2009-08-20005.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Finance-Request xmlns:mbc="http://cfs.coop/Messaging/Batch/Common"&lt;/P&gt;&lt;P&gt;xmlns:mtg="http://www.origostandards.com/schema/mtg/v2"&lt;/P&gt;&lt;P&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;/P&gt;&lt;P&gt;xsi:schemaLocation="urn:cfs.coop:Finance Finance-Request-v1-1.xsd" xmlns="urn:cfs.coop:Finance" &amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;Header&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:DocumentId&amp;gt;CAPUTPFIN2009-08-20005.txt&amp;lt;/mbc:DocumentId&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:CreationDate&amp;gt;2009-09-05T16:22:31.000&amp;lt;/mbc:CreationDate&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:Description&amp;gt;Finance File&amp;lt;/mbc:Description&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:NumberOfRecords&amp;gt;000005&amp;lt;/mbc:NumberOfRecords&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mtg:initiator_id&amp;gt;UT&amp;lt;/mtg:initiator_id&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:SourceSystem&amp;gt;UTP&amp;lt;/mbc:SourceSystem&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:DateRange&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:FromDate&amp;gt;2009-07-24T00:00:00.000&amp;lt;/mbc:FromDate&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;mbc:ToDate&amp;gt;2009-08-20T00:00:00.000&amp;lt;/mbc:ToDate&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;/mbc:DateRange&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;/Header&amp;gt;&lt;/P&gt;&lt;P&gt;   &amp;lt;Details&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;lt;DetailRecord&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;TransactionNumber&amp;gt;000001&amp;lt;/TransactionNumber&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;BusinessClass&amp;gt;UT&amp;lt;/BusinessClass&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;ProductCode&amp;gt;3211&amp;lt;/ProductCode&amp;gt;&lt;/P&gt;&lt;P&gt;     &amp;lt;TransactionDate&amp;gt;2009-08-20&amp;lt;/TransactionDate&amp;gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please advice, how can we forward to resolve this issue now?&lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:06:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287302#M1389304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T07:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287303#M1389305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you download that in binary mode? In Binary mode no character translation is taken place due to different codepages.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:09:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287303#M1389305</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-23T07:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287304#M1389306</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;It is the client's requirement. After downloading the file to application server, third party system will pick this file (their requirement is... the file should be in binary format).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:15:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287304#M1389306</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T07:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287305#M1389307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vikranth, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used your code. But still it is not coming. &lt;/P&gt;&lt;P&gt;Am I doing any mistake?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ramesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:16:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287305#M1389307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-23T07:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287306#M1389308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, and the result using binary format is tha what you can see: no character translation between codepages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And to be honest: the cleint cant see how it is written. At least all files are binary files, the difference betweend binary and text files are just made by humans, nithing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the file is ok written in tect mode write it in text mode and dont care about the client.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 07:33:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287306#M1389308</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-10-23T07:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: Open dataset in binary mode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287307#M1389309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ramesh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your output file there really is no reason to write this as a binary file. In general one would expect that an XML file is actually a text file (after all, XML files are supposed to be human readable). So I agree with Rainer, don't use the BINARY file feature, instead write your file as a text file:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN DATASET lv_tbfile IN TEXT MODE FOR OUTPUT ENCODING UTF-8.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note that this doest &lt;STRONG&gt;not&lt;/STRONG&gt; mean that you ignore your client's requirements. Basically your client expects a file in a certain format. So I'd create the XML file using the &lt;STRONG&gt;text mode&lt;/STRONG&gt; feature and then provide this to your client. If they can parse the file and it looks good to them, it's correct (regardless if they label it binary or not). Remember, often people use different terminologies and what they label binary might not be what we as developers would call a binary file...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best wishes, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 03:41:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-in-binary-mode/m-p/6287307#M1389309</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T03:41:15Z</dc:date>
    </item>
  </channel>
</rss>

