<?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/3346880#M802568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put the cursor on the keyword OPEN and press F1, than read the online help. Do that before asking here. Its clearly stated in the online help on how to output binary data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Jan 2008 08:55:45 GMT</pubDate>
    <dc:creator>rainer_hbenthal</dc:creator>
    <dc:date>2008-01-29T08:55:45Z</dc:date>
    <item>
      <title>Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346876#M802564</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;I am trying to transfer data from my internal table to application server. When i use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open Dataset e_file for output in text mode encoding Default&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Statement its throwing run time error as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; The current statement is defined for character-type data objects only.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My internal table consist of  many fields(more than sixty) from tables  BSEC,BSEG,KNA1,T001,T880,PAYR. Plz help me to resolve this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dhurga R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:51:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346876#M802564</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T08:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346877#M802565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your internal table must have some field/fields whose data type is not character type. 'Open dataset' only allowed for character type data types. so before transfering to application server convery all of your data type as character type and then transfer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:55:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346877#M802565</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T08:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346878#M802566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It allows to transfer only character type data.So, declare the internal table field as character type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:55:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346878#M802566</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T08:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346879#M802567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dhurga,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  This is the area where you are getting error.Better to paste your code here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:55:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346879#M802567</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T08:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346880#M802568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put the cursor on the keyword OPEN and press F1, than read the online help. Do that before asking here. Its clearly stated in the online help on how to output binary data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:55:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346880#M802568</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-01-29T08:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346881#M802569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is wrong. Completly wrong. RTFOH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 08:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346881#M802569</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2008-01-29T08:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346882#M802570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi see this program where &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXCEL to INTERNAL table and then to APPLICATION SEVER &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZSD_EXCEL_INT_APP&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;*&amp;amp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZSD_EXCEL_INT_APP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameter: file_nm type localfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types : begin of it_tab1,&lt;/P&gt;&lt;P&gt;        f1(20),&lt;/P&gt;&lt;P&gt;        f2(40),&lt;/P&gt;&lt;P&gt;        f3(20),&lt;/P&gt;&lt;P&gt;       end of it_tab1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_tab type table of ALSMEX_TABLINE with header line,&lt;/P&gt;&lt;P&gt;       file type rlgrap-filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : it_tab2 type it_tab1 occurs 1,&lt;/P&gt;&lt;P&gt;       wa_tab2 type it_tab1,&lt;/P&gt;&lt;P&gt;       w_message(100)  TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen on value-request for file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'KD_GET_FILENAME_ON_F4'&lt;/P&gt;&lt;P&gt; EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PROGRAM_NAME        = SYST-REPID&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DYNPRO_NUMBER       = SYST-DYNNR&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FIELD_NAME          = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   STATIC              = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  MASK                = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;   file_name           = file_nm&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   MASK_TOO_LONG       = 1&lt;/P&gt;&lt;P&gt;   OTHERS              = 2&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh it_tab2[].clear wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file = file_nm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    filename                      = file&lt;/P&gt;&lt;P&gt;    i_begin_col                   = '1'&lt;/P&gt;&lt;P&gt;    i_begin_row                   =  '1'&lt;/P&gt;&lt;P&gt;    i_end_col                     = '10'&lt;/P&gt;&lt;P&gt;    i_end_row                     = '35'&lt;/P&gt;&lt;P&gt;  tables&lt;/P&gt;&lt;P&gt;    intern                        = it_tab&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   INCONSISTENT_PARAMETERS       = 1&lt;/P&gt;&lt;P&gt;   UPLOAD_OLE                    = 2&lt;/P&gt;&lt;P&gt;   OTHERS                        = 3&lt;/P&gt;&lt;P&gt;          .&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt; MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  case it_tab-col.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   when '002'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f1 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   when '004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f2 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  when '008'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_tab2-f3 = it_tab-value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; at end of row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  append wa_tab2 to it_tab2.&lt;/P&gt;&lt;P&gt; clear wa_tab2.&lt;/P&gt;&lt;P&gt;  endat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : p_file TYPE  rlgrap-filename value 'TEST3.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;*--- Display error messages if any.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    MESSAGE e001(zsd_mes).&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Data is downloaded to the application server file path&lt;/P&gt;&lt;P&gt;    LOOP AT it_tab2 INTO wa_tab2.&lt;/P&gt;&lt;P&gt;      TRANSFER wa_tab2 TO p_file.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Close the Application server file (Mandatory).&lt;/P&gt;&lt;P&gt;  CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; loop at it_tab2 into wa_tab2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2008 09:00:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346882#M802570</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-29T09:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Open Dataset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346883#M802571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data : p_file TYPE rlgrap-filename value 'TEST3.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mention the file name P_file correctly. U have defaulted the file name with out giving the path (directory) name.&lt;/P&gt;&lt;P&gt;The file name should start with \&amp;lt;directory path&amp;gt;\TEST3.txt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Mar 2008 09:06:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset/m-p/3346883#M802571</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-05T09:06:58Z</dc:date>
    </item>
  </channel>
</rss>

