<?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 data set in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970463#M701004</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;     I am sending one routine in which i am reading file from application server and populating that into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear mtab_data.&lt;/P&gt;&lt;P&gt;refresh mtab_data.&lt;/P&gt;&lt;P&gt;clear ctab.&lt;/P&gt;&lt;P&gt;refresh ctab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;refresh itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET phy_name_out FOR INPUT IN TEXT MODE ENCODING DEFAULT&lt;/P&gt;&lt;P&gt;  MESSAGE lv_file_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET phy_name_out.&lt;/P&gt;&lt;P&gt;    FORMAT COLOR COL_NEGATIVE ON.&lt;/P&gt;&lt;P&gt;WRITE : / 'MESSAGE :',LV_FILE_ERROR.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   flag = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FORMAT COLOR OFF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    CLEAR lv_file_line.&lt;/P&gt;&lt;P&gt;    READ DATASET phy_name_out INTO lv_file_line.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      lv_file_line+0(1) = ' '.&lt;/P&gt;&lt;P&gt;      SHIFT lv_file_line LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SPLIT lv_file_line AT '~' INTO&lt;/P&gt;&lt;P&gt;       wa_ctab-bukrs&lt;/P&gt;&lt;P&gt;       wa_ctab-fkdat&lt;/P&gt;&lt;P&gt;       wa_ctab-vbeln&lt;/P&gt;&lt;P&gt;       wa_ctab-posnr&lt;/P&gt;&lt;P&gt;       wa_ctab-kunag&lt;/P&gt;&lt;P&gt;       wa_ctab-zterm&lt;/P&gt;&lt;P&gt;       wa_ctab-inco1&lt;/P&gt;&lt;P&gt;       wa_ctab-inco2&lt;/P&gt;&lt;P&gt;       wa_ctab-matnr&lt;/P&gt;&lt;P&gt;       wa_ctab-fkimg&lt;/P&gt;&lt;P&gt;       wa_ctab-vrkme&lt;/P&gt;&lt;P&gt;       wa_ctab-bpric&lt;/P&gt;&lt;P&gt;       wa_ctab-fpric&lt;/P&gt;&lt;P&gt;       wa_ctab-netwr&lt;/P&gt;&lt;P&gt;       wa_ctab-waerk&lt;/P&gt;&lt;P&gt;       wa_ctab-fkart&lt;/P&gt;&lt;P&gt;       wa_ctab-lgort&lt;/P&gt;&lt;P&gt;       wa_ctab-charg&lt;/P&gt;&lt;P&gt;       wa_ctab-vkorg&lt;/P&gt;&lt;P&gt;       wa_ctab-vtweg&lt;/P&gt;&lt;P&gt;       wa_ctab-spart&lt;/P&gt;&lt;P&gt;       wa_ctab-kunnr&lt;/P&gt;&lt;P&gt;       wa_ctab-gjahr&lt;/P&gt;&lt;P&gt;       wa_ctab-maktx.&lt;/P&gt;&lt;P&gt;      APPEND wa_ctab TO ctab.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET phy_name_out.&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;endform.                    " download_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : phy_name_out is varriable which hold full path of application server's file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gagan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Oct 2007 11:08:46 GMT</pubDate>
    <dc:creator>former_member194152</dc:creator>
    <dc:date>2007-10-29T11:08:46Z</dc:date>
    <item>
      <title>open data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970459#M701000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have file on appl server and i have opended it using open data set &lt;/P&gt;&lt;P&gt;used do  and read it. i have sent the data into an internal table. now how can i upload it to sap can i use normal call transaction or bdc session method on this data.&lt;/P&gt;&lt;P&gt;pl clarify.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Quavi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 10:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970459#M701000</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T10:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: open data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970460#M701001</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;You can use any one of them. No problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Atish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970460#M701001</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: open data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970461#M701002</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;u can use either session or call transaction to upload the data..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nagaraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:04:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970461#M701002</guid>
      <dc:creator>former_member404244</dc:creator>
      <dc:date>2007-10-29T11:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: open data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970462#M701003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;go through this link&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.kabai.com/abaps/z04.htm" target="test_blank"&gt;http://www.kabai.com/abaps/z04.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;dsn&amp;gt; INTO &amp;lt;f&amp;gt; [LENGTH &amp;lt;len&amp;gt;].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement reads data from the file &amp;lt;dsn&amp;gt; into the variable &amp;lt;f&amp;gt;. In order to determine into which variable you should read data from a file, you need to know the structure of the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can specify the transfer mode in the OPEN DATASET statement. If you have not already opened the file for reading, the system tries to open it either in binary mode, or using the additions from the last OPEN DATASET statement. However, it is good practice only to open files using the OPEN DATASET statement. For further information about the OPEN DATASET statement and the naming conventions for files, refer to Opening a File.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the system was able to read data successfully, SY-SUBRC is set to 0. When the end of the file is reached, SY-SUBRC is set to 4. If the file could not be opened, SY-SUBRC is set to 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are working in binary mode, you can use the LENGTH addition to find out the length of the data transferred to &amp;lt;f&amp;gt;. The system sets the value of the variable &amp;lt;len&amp;gt; to this length. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d42358411d1829f0000e829fbfe/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3d42358411d1829f0000e829fbfe/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970462#M701003</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-10-29T11:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: open data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970463#M701004</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;     I am sending one routine in which i am reading file from application server and populating that into an internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form download_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear mtab_data.&lt;/P&gt;&lt;P&gt;refresh mtab_data.&lt;/P&gt;&lt;P&gt;clear ctab.&lt;/P&gt;&lt;P&gt;refresh ctab.&lt;/P&gt;&lt;P&gt;clear itab.&lt;/P&gt;&lt;P&gt;refresh itab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OPEN DATASET phy_name_out FOR INPUT IN TEXT MODE ENCODING DEFAULT&lt;/P&gt;&lt;P&gt;  MESSAGE lv_file_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    CLOSE DATASET phy_name_out.&lt;/P&gt;&lt;P&gt;    FORMAT COLOR COL_NEGATIVE ON.&lt;/P&gt;&lt;P&gt;WRITE : / 'MESSAGE :',LV_FILE_ERROR.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   flag = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   STOP.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    FORMAT COLOR OFF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    CLEAR lv_file_line.&lt;/P&gt;&lt;P&gt;    READ DATASET phy_name_out INTO lv_file_line.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      lv_file_line+0(1) = ' '.&lt;/P&gt;&lt;P&gt;      SHIFT lv_file_line LEFT DELETING LEADING space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      SPLIT lv_file_line AT '~' INTO&lt;/P&gt;&lt;P&gt;       wa_ctab-bukrs&lt;/P&gt;&lt;P&gt;       wa_ctab-fkdat&lt;/P&gt;&lt;P&gt;       wa_ctab-vbeln&lt;/P&gt;&lt;P&gt;       wa_ctab-posnr&lt;/P&gt;&lt;P&gt;       wa_ctab-kunag&lt;/P&gt;&lt;P&gt;       wa_ctab-zterm&lt;/P&gt;&lt;P&gt;       wa_ctab-inco1&lt;/P&gt;&lt;P&gt;       wa_ctab-inco2&lt;/P&gt;&lt;P&gt;       wa_ctab-matnr&lt;/P&gt;&lt;P&gt;       wa_ctab-fkimg&lt;/P&gt;&lt;P&gt;       wa_ctab-vrkme&lt;/P&gt;&lt;P&gt;       wa_ctab-bpric&lt;/P&gt;&lt;P&gt;       wa_ctab-fpric&lt;/P&gt;&lt;P&gt;       wa_ctab-netwr&lt;/P&gt;&lt;P&gt;       wa_ctab-waerk&lt;/P&gt;&lt;P&gt;       wa_ctab-fkart&lt;/P&gt;&lt;P&gt;       wa_ctab-lgort&lt;/P&gt;&lt;P&gt;       wa_ctab-charg&lt;/P&gt;&lt;P&gt;       wa_ctab-vkorg&lt;/P&gt;&lt;P&gt;       wa_ctab-vtweg&lt;/P&gt;&lt;P&gt;       wa_ctab-spart&lt;/P&gt;&lt;P&gt;       wa_ctab-kunnr&lt;/P&gt;&lt;P&gt;       wa_ctab-gjahr&lt;/P&gt;&lt;P&gt;       wa_ctab-maktx.&lt;/P&gt;&lt;P&gt;      APPEND wa_ctab TO ctab.&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET phy_name_out.&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;endform.                    " download_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : phy_name_out is varriable which hold full path of application server's file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Gagan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Oct 2007 11:08:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set/m-p/2970463#M701004</guid>
      <dc:creator>former_member194152</dc:creator>
      <dc:date>2007-10-29T11:08:46Z</dc:date>
    </item>
  </channel>
</rss>

