<?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: Fun module to read file in Application server  ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373431#M809994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of FM you can just type in a simple code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  w_dataset1(27) value '/var/textfile.txt', &lt;/P&gt;&lt;P&gt;          w_dataset2(27)  value '/var/outfile.txt'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab1 occurs 0,         "Text file format &lt;/P&gt;&lt;P&gt;           matnr(18),      "MATERIAL NUMBER &lt;/P&gt;&lt;P&gt;           bwkrs(4),       "PLANT &lt;/P&gt;&lt;P&gt;       end of itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Uploading of text file from Application server. &lt;/P&gt;&lt;P&gt;open dataset w_dataset1 for input in text mode. &lt;/P&gt;&lt;P&gt;       do. &lt;/P&gt;&lt;P&gt;              if sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;                  exit. &lt;/P&gt;&lt;P&gt;              endif. &lt;/P&gt;&lt;P&gt;              read dataset w_dataset1 into itab1. &lt;/P&gt;&lt;P&gt;             append itab1. &lt;/P&gt;&lt;P&gt;             clear itab1. &lt;/P&gt;&lt;P&gt;        enddo. &lt;/P&gt;&lt;P&gt;close dataset w_dataset1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jayant Sahu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Feb 2008 10:00:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-06T10:00:11Z</dc:date>
    <item>
      <title>Fun module to read file in Application server  ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373430#M809993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any function module to read file in Application server.&lt;/P&gt;&lt;P&gt;Pls provide logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Naseer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 09:57:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373430#M809993</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T09:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Fun module to read file in Application server  ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373431#M809994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of FM you can just type in a simple code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:  w_dataset1(27) value '/var/textfile.txt', &lt;/P&gt;&lt;P&gt;          w_dataset2(27)  value '/var/outfile.txt'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:begin of itab1 occurs 0,         "Text file format &lt;/P&gt;&lt;P&gt;           matnr(18),      "MATERIAL NUMBER &lt;/P&gt;&lt;P&gt;           bwkrs(4),       "PLANT &lt;/P&gt;&lt;P&gt;       end of itab1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Uploading of text file from Application server. &lt;/P&gt;&lt;P&gt;open dataset w_dataset1 for input in text mode. &lt;/P&gt;&lt;P&gt;       do. &lt;/P&gt;&lt;P&gt;              if sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;                  exit. &lt;/P&gt;&lt;P&gt;              endif. &lt;/P&gt;&lt;P&gt;              read dataset w_dataset1 into itab1. &lt;/P&gt;&lt;P&gt;             append itab1. &lt;/P&gt;&lt;P&gt;             clear itab1. &lt;/P&gt;&lt;P&gt;        enddo. &lt;/P&gt;&lt;P&gt;close dataset w_dataset1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jayant Sahu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 10:00:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373431#M809994</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T10:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Fun module to read file in Application server  ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373432#M809995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;call function 'RZL_READ_DIR_LOCAL'&lt;/P&gt;&lt;P&gt;      exporting&lt;/P&gt;&lt;P&gt;        name     = lv_dst&lt;/P&gt;&lt;P&gt;      tables&lt;/P&gt;&lt;P&gt;        file_tbl = it_filedir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 10:02:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373432#M809995</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T10:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Fun module to read file in Application server  ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373433#M809996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading it with the help of Function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do keep these points in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I don't think there is any directy way,&lt;/P&gt;&lt;P&gt;to rad .XLS file&lt;/P&gt;&lt;P&gt;into internal table&lt;/P&gt;&lt;P&gt;on the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The reason is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) .XLS is a Microsoft technology&lt;/P&gt;&lt;P&gt;b) the application server OS may not be microsoft os,&lt;/P&gt;&lt;P&gt;it may be UNIX, AIX etc.&lt;/P&gt;&lt;P&gt;c) Converter tehnology is not there,&lt;/P&gt;&lt;P&gt;and possibly SAP does not support it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. FILE_READ_AND_CONVERT_SAP_DATA&lt;/P&gt;&lt;P&gt;This FM, &lt;/P&gt;&lt;P&gt;can read files from applicatin server&lt;/P&gt;&lt;P&gt;in TXT and other formats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. BUT, in case of .XLS file,&lt;/P&gt;&lt;P&gt;it EXPECTS the file to be on the presentation server only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(bcos Microsoft OS be there on presentation server)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. IN SAP,&lt;/P&gt;&lt;P&gt;people don't work directly with .xls file&lt;/P&gt;&lt;P&gt;while uploading data.&lt;/P&gt;&lt;P&gt;We need to work with TEXT Files&lt;/P&gt;&lt;P&gt;which are TAB DELIMITED or CSV files etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jayant Sahu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 10:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373433#M809996</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T10:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Fun module to read file in Application server  ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373434#M809997</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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Retrieve Data file from Application server(Upload from Unix)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: i_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OPEN DATASET i_file FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;      MESSAGE e999(za) WITH 'Error opening file' i_file.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Reads each line of file individually&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      READ DATASET i_file INTO wa_datatab.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Perform processing here&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    .....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    ENDDO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2008 10:05:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/fun-module-to-read-file-in-application-server/m-p/3373434#M809997</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-06T10:05:24Z</dc:date>
    </item>
  </channel>
</rss>

