<?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: Reading a file after submit in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380946#M1237471</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;If you know the file path on the application server then you can use the OPEN DATASET  to read the data from the application server after the SUBMIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN DATASET p_file FOR INPUT IN TEXT MODE. 
     IF SY-SUBRC EQ 0.
        READ DATASET p_file INTO WA.
        IF SY-UBRC NE  0.
           EXIT.
        ENDIF.
 
       CLOSE DATASET p_file.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Apr 2009 07:08:51 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-04T07:08:51Z</dc:date>
    <item>
      <title>Reading a file after submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380945#M1237470</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;&lt;/P&gt;&lt;P&gt;I am Submitting a standard transaction FPO4, this will create a file in the application server, i need to get the content of the file. I tried using the FM List to Memory and ASCII but didn't work out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one please suggest alternate method for doing the same. I would need to read the content of the file and create other report from the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Vijay Penumaka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Apr 2009 06:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380945#M1237470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-04T06:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file after submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380946#M1237471</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;If you know the file path on the application server then you can use the OPEN DATASET  to read the data from the application server after the SUBMIT statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;OPEN DATASET p_file FOR INPUT IN TEXT MODE. 
     IF SY-SUBRC EQ 0.
        READ DATASET p_file INTO WA.
        IF SY-UBRC NE  0.
           EXIT.
        ENDIF.
 
       CLOSE DATASET p_file.
    ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Apr 2009 07:08:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380946#M1237471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-04T07:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file after submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380947#M1237472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI ,&lt;/P&gt;&lt;P&gt;u have to use in the following way..&lt;/P&gt;&lt;P&gt; DATA: BEGIN OF it_table OCCURS 0,&lt;/P&gt;&lt;P&gt;         value(50) TYPE c,&lt;/P&gt;&lt;P&gt;        END OF it_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;READ DATASET file_name INTO wa_file.&lt;/P&gt;&lt;P&gt;split wa_file at space into it_table .&lt;/P&gt;&lt;P&gt;loop at it_table .&lt;/P&gt;&lt;P&gt;case sy-tabix.&lt;/P&gt;&lt;P&gt;when 1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-del_note  = it_table-value.&lt;/P&gt;&lt;P&gt;when 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-del_note1  = it_table-value.&lt;/P&gt;&lt;P&gt;when 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_data-del_note2  = it_table-value.&lt;/P&gt;&lt;P&gt;end case.&lt;/P&gt;&lt;P&gt;at last .&lt;/P&gt;&lt;P&gt;append it_data .&lt;/P&gt;&lt;P&gt;endat .&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET file_name .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Apr 2009 07:29:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380947#M1237472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-04T07:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a file after submit</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380948#M1237473</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;Here the issue is file is getting created on the same path every time dynamically. say (/devabap/if/out/XXXX.0 for the first time and the next time we run the report file name would be /devabap/if/out/XXXX.1 etc.2,3,4,5,). I am now using the FM:  FILE_GET_NAME to get the name and then proceeding further to get my output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i am trying to use the above function module for a single run i am getting the correct result. &lt;/P&gt;&lt;P&gt;If i run the same report with different variant parallely in background then in the application server there are there are two files already created for two different run's as said above ( .0 and .1) the logic is such that i  have to get the latest file and so a wrong file is getting picked up at the time of parallel run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:  When i Submit the transaction the ouput screen along with the data contains the file path &amp;amp; name as said above.I am trying to get the file name from the submit screen as the file is generated dynamically. For change in the instance (run) again there will be change in the file name. So system is not identifying the correct file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Apr 2009 07:35:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reading-a-file-after-submit/m-p/5380948#M1237473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-04T07:35:16Z</dc:date>
    </item>
  </channel>
</rss>

