<?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 Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652598#M879746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Saritha,
1.
When you use &lt;STRONG&gt;IN TEXT MODE ENCODING default&lt;/STRONG&gt; addition, it supports only character-type variables only. In your case &lt;STRONG&gt;wa_output-labst&lt;/STRONG&gt; is a quantity field.

check this F1 help on &lt;STRONG&gt;IN TEXT MODE.&lt;/STRONG&gt;
&lt;PRE&gt;&lt;CODE&gt;... TEXT MODE encoding [linefeed]&lt;/CODE&gt;&lt;/PRE&gt; .

&lt;STRONG&gt;Effect&lt;/STRONG&gt;: 
The addition IN TEXT MODE opens the file as a text file. The addition ENCODING defines how the characters are represented in the text file. When writing to a text file, the content of a data object is converted to the representation entered after ENCODING, and transferred to the file. If the data type is character-type and flat, trailing blanks are cut off. In the data type string, trailing blanks are not cut off. The end-of-line selection of the relevant platform is applied to the transferred data by default. When reading from a text file, the content of the file is read until the next end-of-line selection, converted from the format specified after ENCODING into the current character format, and transferred to a data object. The end-of-line selection used is controlled using the addition linefeed (as of Release 7.0). 

In Unicode programs, only the content of character-type data objects can be transferred to text files and read from text files. The addition encoding must be specified in Unicode programs, and can only be omitted in non-Unicode programs. 

Try to use BINARY MODE or create one structure with all Char Variables.


Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Apr 2008 04:18:44 GMT</pubDate>
    <dc:creator>venkat_o</dc:creator>
    <dc:date>2008-04-13T04:18:44Z</dc:date>
    <item>
      <title>OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652597#M879745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I want to store report output in application sever&lt;/STRONG&gt; .For that i followed open dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;My problem:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;when i used below statements.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;1) 1st&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;+OPEN DATASET P&lt;/U&gt;FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.+_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;+TRANSFER WA&lt;/U&gt;OUTPUT TO P_FILE.+_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;+loop at i&lt;/U&gt;output into wa_output.+_&lt;/P&gt;&lt;P&gt;&lt;U&gt;+write:/0 wa&lt;/U&gt;output-werks,+_&lt;/P&gt;&lt;P&gt;&lt;U&gt;+10 wa&lt;/U&gt;output-matnr,+_&lt;/P&gt;&lt;P&gt;&lt;U&gt;+25 wa&lt;/U&gt;output-lgort,+_&lt;/P&gt;&lt;P&gt;&lt;U&gt;+35 wa&lt;/U&gt;output-labst.+_&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;endloop.&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;+CLOSE DATASET P&lt;/U&gt;FILE.+_&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;i got dump error:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Only character-type data objects are supported at the argument&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;position "f" for the statement&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;"TRANSFER f TO ..."   .&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;In this case, the operand "f" has the non-character-type "TY&lt;/U&gt;OUTPUT"  ._&lt;/P&gt;&lt;P&gt;&lt;U&gt;The current program is flagged as a Unicode program. In the Unicode context ,&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;type X fields are seen as non-character-type, as are structures that&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;contain non-character-type components.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2) 2nd type&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OPEN DATASET P_FILE FOR OUTPUT IN BINARY MODE.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TRANSFER WA_OUTPUT TO P_FILE.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;loop at i_output into wa_output.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;write:/0 wa_output-werks,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;10 wa_output-matnr,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;25 wa_output-lgort,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;35 wa_output-labst.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;endloop.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CLOSE DATASET P_FILE.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;i donot get any error,but in t-code AL11.This file is creates without any data in it.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kindly help me.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 02:58:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652597#M879745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T02:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652598#M879746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;
Hi Saritha,
1.
When you use &lt;STRONG&gt;IN TEXT MODE ENCODING default&lt;/STRONG&gt; addition, it supports only character-type variables only. In your case &lt;STRONG&gt;wa_output-labst&lt;/STRONG&gt; is a quantity field.

check this F1 help on &lt;STRONG&gt;IN TEXT MODE.&lt;/STRONG&gt;
&lt;PRE&gt;&lt;CODE&gt;... TEXT MODE encoding [linefeed]&lt;/CODE&gt;&lt;/PRE&gt; .

&lt;STRONG&gt;Effect&lt;/STRONG&gt;: 
The addition IN TEXT MODE opens the file as a text file. The addition ENCODING defines how the characters are represented in the text file. When writing to a text file, the content of a data object is converted to the representation entered after ENCODING, and transferred to the file. If the data type is character-type and flat, trailing blanks are cut off. In the data type string, trailing blanks are not cut off. The end-of-line selection of the relevant platform is applied to the transferred data by default. When reading from a text file, the content of the file is read until the next end-of-line selection, converted from the format specified after ENCODING into the current character format, and transferred to a data object. The end-of-line selection used is controlled using the addition linefeed (as of Release 7.0). 

In Unicode programs, only the content of character-type data objects can be transferred to text files and read from text files. The addition encoding must be specified in Unicode programs, and can only be omitted in non-Unicode programs. 

Try to use BINARY MODE or create one structure with all Char Variables.


Regards,
Venkat.O
&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 04:18:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652598#M879746</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2008-04-13T04:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652599#M879747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saritha,&lt;/P&gt;&lt;P&gt;                I think you have to make all the fields of the table t_output of type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then..try this...&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;loop at t_output into wa_output.&lt;/P&gt;&lt;P&gt; transfer wa_output TO p_file.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET p_file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:11:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652599#M879747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652600#M879748</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;Please refer the code below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

*   Download internal table to Application server file(Unix)
DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.

  open dataset e_file for output in text mode.
  lOOP AT it_datatab......
    transfer it_datatab to e_file.
  ENDLOOP.

  close dataset e_file.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sriram Ponna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Apr 2008 06:44:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3652600#M879748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-13T06:44:30Z</dc:date>
    </item>
  </channel>
</rss>

