<?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 OPEN DATASET to column in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352201#M804086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to write an internal table to an EXCEL file on application server. The problem is that all columns in the internal table are merged and written to 1st column in excel sheet. I want it in seperate columns.&lt;/P&gt;&lt;P&gt;I am using following code.&lt;/P&gt;&lt;P&gt;  OPEN DATASET y_lv_filename FOR OUTPUT IN LEGACY TEXT MODE.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      LOOP AT p_y_i_file INTO y_wa_ymdcoseph.&lt;/P&gt;&lt;P&gt;        TRANSFER y_wa_ymdcoseph TO y_lv_filename.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close File On Application server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        PERFORM y_f_close_file_0700 IN PROGRAM yti_utility_routines&lt;/P&gt;&lt;P&gt;                                 USING y_lv_filename&lt;/P&gt;&lt;P&gt;                              CHANGING y_v_subrc.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2008 14:27:08 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-23T14:27:08Z</dc:date>
    <item>
      <title>OPEN DATASET to column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352201#M804086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to write an internal table to an EXCEL file on application server. The problem is that all columns in the internal table are merged and written to 1st column in excel sheet. I want it in seperate columns.&lt;/P&gt;&lt;P&gt;I am using following code.&lt;/P&gt;&lt;P&gt;  OPEN DATASET y_lv_filename FOR OUTPUT IN LEGACY TEXT MODE.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      LOOP AT p_y_i_file INTO y_wa_ymdcoseph.&lt;/P&gt;&lt;P&gt;        TRANSFER y_wa_ymdcoseph TO y_lv_filename.&lt;/P&gt;&lt;P&gt;      ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close File On Application server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;        PERFORM y_f_close_file_0700 IN PROGRAM yti_utility_routines&lt;/P&gt;&lt;P&gt;                                 USING y_lv_filename&lt;/P&gt;&lt;P&gt;                              CHANGING y_v_subrc.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 14:27:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352201#M804086</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-23T14:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET to column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352202#M804087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see below sample program from application server to presentation server for view data...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : fp_v_filepath type string.&lt;/P&gt;&lt;P&gt;fp_v_filepath = 'C:\BDC.prn'.           * PRN (file extension   &lt;/P&gt;&lt;P&gt;                                                            used notepad)&lt;/P&gt;&lt;P&gt;data : begin of it_data occurs 0,&lt;/P&gt;&lt;P&gt;         age(4),&lt;/P&gt;&lt;P&gt;         name(15),&lt;/P&gt;&lt;P&gt;       end of it_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : begin of wa_data,&lt;/P&gt;&lt;P&gt;          age(4),&lt;/P&gt;&lt;P&gt;          name(15),&lt;/P&gt;&lt;P&gt;       end of wa_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Open the file and transfer the data into the internal table&lt;/P&gt;&lt;P&gt;                                                 &lt;/P&gt;&lt;P&gt;open dataset fp_v_filepath           " give the file path&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for&lt;/P&gt;&lt;P&gt;input in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    read dataset&lt;/P&gt;&lt;P&gt;    fp_v_filepath "again file path&lt;/P&gt;&lt;P&gt;    into wa_data .&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      append wa_data to it_data. "it_data the same structure as of your flat file + workarea same structure&lt;/P&gt;&lt;P&gt;      clear wa_data.&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;  enddo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_data into wa_data.&lt;/P&gt;&lt;P&gt;  write : / wa_data-age , wa_data-name.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;s.suresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 23, 2008 12:13 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 14:55:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352202#M804087</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-23T14:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET to column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352203#M804088</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;For this you need to create a tab delimited file and upload the same.&lt;/P&gt;&lt;P&gt;If you are using 4.6C or below, declare the tab variable as Hexadecimal else you can use class ABAP_CHAR_UTILITIES&amp;gt;&amp;gt;Horizontal Tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check the right name of the class in system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this would be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lalit Kabra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2008 14:58:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352203#M804088</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-23T14:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: OPEN DATASET to column</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352204#M804089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2009 08:26:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-dataset-to-column/m-p/3352204#M804089</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-21T08:26:28Z</dc:date>
    </item>
  </channel>
</rss>

