<?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: Opening files on Application server!! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361206#M1038075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your answer!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said I have 6 company codes and for each company code the plant information should be transferred to outfile i.e 6 plants info should be transferred to 6 output files of app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT S_COMPCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZJOHN.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\test1.txt'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\TEST.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE2.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE1.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR OUTFILE.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM OUT_DATASET USING w_output_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM OUT_FILE.&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;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Aug 2008 09:20:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-18T09:20:42Z</dc:date>
    <item>
      <title>Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361201#M1038070</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;&lt;/P&gt;&lt;P&gt;       My requirement is I have 6 plants for which I have two internal tables in which data is coming from &lt;/P&gt;&lt;P&gt;a function module. Now here inside a loop at plant I want to open 6 files from one internal table and 6 from another table. Files are getting opened for both tables once and after its trying to open the same files due to which am getting an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside a perform : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZJOHN.TXT'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\test1.txt'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\TEST.TXT'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE2.TXT'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inputfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE1.TXT'.&lt;/P&gt;&lt;P&gt;append inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR INPUTFILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;********************************************************************&lt;/P&gt;&lt;P&gt;  LOOP AT inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM OPEN_DATASET USING w_input_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM PASS_FILE.&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;******************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA.TXT'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA1.txt'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA2.TXT'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA4.TXT'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA5.TXT'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSITA6.TXT'.&lt;/P&gt;&lt;P&gt;append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear outfile.&lt;/P&gt;&lt;P&gt;refresh outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*****************************************************************&lt;/P&gt;&lt;P&gt;  LOOP AT outfile.&lt;/P&gt;&lt;P&gt;   PERFORM OUT_DATASET USING w_OUTPUT_file.&lt;/P&gt;&lt;P&gt;   PERFORM OUT_FILE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM.                                                      "OPEN_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORM OPEN_DATASET USING p_w_input_file.&lt;/P&gt;&lt;P&gt;    w_input_file = inputfile-zprc.&lt;/P&gt;&lt;P&gt;    OPEN DATASET w_input_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;    IF sy-subrc NE c_zero.&lt;/P&gt;&lt;P&gt;      MESSAGE a002 WITH w_input_file.  "File &amp;amp; could not be opened&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FORM PASS_FILE.&lt;/P&gt;&lt;P&gt;  R_VAR = R_VAR + 1.&lt;/P&gt;&lt;P&gt;     CASE R_VAR.&lt;/P&gt;&lt;P&gt;      WHEN 1.&lt;/P&gt;&lt;P&gt;          w_input_file1 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN 2.&lt;/P&gt;&lt;P&gt;          w_input_file2 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN 3.&lt;/P&gt;&lt;P&gt;          w_input_file3 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN 4.&lt;/P&gt;&lt;P&gt;          w_input_file4 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN 5.&lt;/P&gt;&lt;P&gt;          w_input_file5 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN 6.&lt;/P&gt;&lt;P&gt;          w_input_file6 = inputfile-zprc.&lt;/P&gt;&lt;P&gt;      WHEN OTHERS.&lt;/P&gt;&lt;P&gt;     ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 17:06:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361201#M1038070</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-14T17:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361202#M1038071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use CLOSE DATASET also inside the loop at input file &amp;amp; endloop. In ur code there is no CLOSE DATASET. May be thats why u r getting error. Try it and see...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Aug 2008 17:50:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361202#M1038071</guid>
      <dc:creator>former_member585060</dc:creator>
      <dc:date>2008-08-14T17:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361203#M1038072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the code I can see some problems:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) You are not passing the file name to the open_dataset routine correctly.  See Below for correction.&lt;/P&gt;&lt;P&gt;LOOP AT inputfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM OPEN_DATASET USING inputfile-zprc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM PASS_FILE.&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;*****************************************************************&lt;/P&gt;&lt;P&gt;LOOP AT outfile.&lt;/P&gt;&lt;P&gt;PERFORM OUT_DATASET USING outfile-zprc.&lt;/P&gt;&lt;P&gt;PERFORM OUT_FILE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDFORM. "OPEN_FILE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The datasets need to be closed. after reading the content.&lt;/P&gt;&lt;P&gt;Open Input Files&lt;/P&gt;&lt;P&gt;Read Input Files into Internal Tables or Process 1 record at a time building up output files in an internal table&lt;/P&gt;&lt;P&gt;Close Input Files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open Output Files&lt;/P&gt;&lt;P&gt;Transfer data to output files&lt;/P&gt;&lt;P&gt;Close Output Files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Aug 2008 03:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361203#M1038072</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-15T03:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361204#M1038073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , thanks for your help!! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am not getting any error in openings files on application server but when I have to transfer the data that is fetched from database to app server files data is not getting transferred........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p1 = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form conver_data using p1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    CASE p1.&lt;/P&gt;&lt;P&gt;      WHEN 1.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE header_record TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN 2.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE out_rec1 TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN 3.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE itab_hts TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN 4.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE header_record TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN 5.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE out_rec2 TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;      WHEN 6.&lt;/P&gt;&lt;P&gt;        ASSIGN COMPONENT sy-index OF STRUCTURE trailer_record TO &amp;lt;ff&amp;gt;.&lt;/P&gt;&lt;P&gt;    ENDCASE.&lt;/P&gt;&lt;P&gt;***Break at internal table inside of itab_material table&lt;/P&gt;&lt;P&gt;    IF sy-index EQ 9.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;    EXIT.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;following needed if you need a field separator within the record&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; if sy-index &amp;gt; 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MOVE C_SEPARATOR TO W_WA+W_OFFSET(C_ONE).&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   w_rec_len = w_rec_len + c_one.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   w_offset = w_offset + c_one.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    DESCRIBE FIELD &amp;lt;ff&amp;gt; OUTPUT-LENGTH w_len.&lt;/P&gt;&lt;P&gt;    w_rec_len = w_rec_len + w_len.&lt;/P&gt;&lt;P&gt;    MOVE &amp;lt;ff&amp;gt; TO w_wa+w_offset(w_len).&lt;/P&gt;&lt;P&gt;    w_offset = w_offset + w_len.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;endform&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSFER w_wa TO w_output_file1 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;******************************************************************&lt;/P&gt;&lt;P&gt;      TRANSFER w_wa TO w_output_file2 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;      TRANSFER w_wa TO w_output_file3 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;      TRANSFER w_wa TO w_output_file4 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;      TRANSFER w_wa TO w_output_file5 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;      TRANSFER w_wa TO w_output_file6 LENGTH w_rec_len.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help is appreciated&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Aug 2008 15:30:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361204#M1038073</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-16T15:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361205#M1038074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Personally I am not a big fan of using field-symbols in this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My preference would be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form conver_data using p1.&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs&amp;gt; type any.&lt;/P&gt;&lt;P&gt;data: l_text(50) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE p1.&lt;/P&gt;&lt;P&gt;WHEN 1.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF STRUCTURE header_record TO &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;WHEN 2.&lt;/P&gt;&lt;P&gt;  do 9 times.&lt;/P&gt;&lt;P&gt;  ASSIGN COMPONENT sy-index OF STRUCTURE out_rec1 TO &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  if sy-subrc eq 0.  "Test if assignment worked&lt;/P&gt;&lt;P&gt;  l_text = &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;  concatenate w_wa l_text into w_wa separated by c_separator.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;WHEN 3.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF STRUCTURE itab_hts TO &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;WHEN 4.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF STRUCTURE header_record TO &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;WHEN 5.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF STRUCTURE out_rec2 TO &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;WHEN 6.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT sy-index OF STRUCTURE trailer_record TO &amp;lt;fs&amp;gt;&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;David Cooper&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: David Cooper on Aug 18, 2008 11:30 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 03:27:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361205#M1038074</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T03:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Opening files on Application server!!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361206#M1038075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your answer!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I said I have 6 company codes and for each company code the plant information should be transferred to outfile i.e 6 plants info should be transferred to 6 output files of app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT S_COMPCODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZJOHN.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt; outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\test1.txt'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\TEST.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE2.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  outfile-zprc = '\usr\sap\QAS\DVEBMGS00\work\ZSAMPLE1.TXT'.&lt;/P&gt;&lt;P&gt;  append outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR OUTFILE.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT outfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM OUT_DATASET USING w_output_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    PERFORM OUT_FILE.&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;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2008 09:20:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/opening-files-on-application-server/m-p/4361206#M1038075</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-18T09:20:42Z</dc:date>
    </item>
  </channel>
</rss>

