<?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: To create a file on Application Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595494#M267479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; in first reply i have posted code for reading file from application server. &lt;/P&gt;&lt;P&gt; this code will create file on applicaton server.&lt;/P&gt;&lt;P&gt; in this code i have added "length" statement which is use to catete record when you have no data for the last field. for example you have data in you itab like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC   123    XYX&lt;/P&gt;&lt;P&gt;WER   453    SDF&lt;/P&gt;&lt;P&gt;ASS   577    &lt;/P&gt;&lt;P&gt;QWE   321    232&lt;/P&gt;&lt;P&gt;in this situation when you dont have record for the third row, file will be created with blank record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  open file on application server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  open dataset &amp;lt;file name&amp;gt; for output in text mode.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  transfer the record  first.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  transfer itab to &amp;lt;filename&amp;gt; length len.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  close the file at Application Server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  close dataset &amp;lt;filename&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Sep 2006 05:55:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-09-22T05:55:01Z</dc:date>
    <item>
      <title>To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595486#M267471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can i create a File on Application Server ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please send code for that .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e-mail-- kknewdelhi@gmail.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595486#M267471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595487#M267472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. we will have to use&lt;/P&gt;&lt;P&gt;   the commands&lt;/P&gt;&lt;P&gt;  OPEN DATASET, TRANSFER, CLOSE DATASET&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Just see F1 help on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Also note that the filename&lt;/P&gt;&lt;P&gt;   to open&lt;/P&gt;&lt;P&gt;   is case sensitive in case of UNIX/AIX&lt;/P&gt;&lt;P&gt;   application servers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:31:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595487#M267472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595488#M267473</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;we use OPEN DATASET and CLOSE DATASET commands for creating a file on application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u can see them in AL11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;filename&amp;gt; FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;LOOP...&lt;/P&gt;&lt;P&gt;TRANSFER &amp;lt;itab&amp;gt; to &amp;lt;filename&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;filename&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if found useful...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:31:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595488#M267473</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595489#M267474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;lt;b&amp;gt;CG3Z&amp;lt;/b&amp;gt; - Upload a empty file to a application server from presentation server.it create a  file in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:32:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595489#M267474</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595490#M267475</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;  Go thro' the link, this might help,&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_downloadsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_downloadsap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595490#M267475</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595491#M267476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna Kuamr,&lt;/P&gt;&lt;P&gt;     there is a slight change in Pawan's Code to write to an Application Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;filename&amp;gt; FOR &amp;lt;b&amp;gt;OUTPUT&amp;lt;/b&amp;gt; IN TEXT MODE.&lt;/P&gt;&lt;P&gt;LOOP...&lt;/P&gt;&lt;P&gt;TRANSFER &amp;lt;itab&amp;gt; to &amp;lt;filename&amp;gt;&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;filename&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:35:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595491#M267476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595492#M267477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Krishna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check your mail now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vinay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595492#M267477</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595493#M267478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use OPEN DATASET Stmt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: p_file like rlgrap-filename obligatory&lt;/P&gt;&lt;P&gt;                 default '/usr/sap/upload.xls'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;types: begin of t_data,&lt;/P&gt;&lt;P&gt;         vbeln like vbap-vbeln,&lt;/P&gt;&lt;P&gt;         posnr like vbap-posnr,&lt;/P&gt;&lt;P&gt;         matnr like vbap-matnr,&lt;/P&gt;&lt;P&gt;         werks like vbap-werks,&lt;/P&gt;&lt;P&gt;         megne like vbap-zmeng,&lt;/P&gt;&lt;P&gt;       end of t_data.&lt;/P&gt;&lt;P&gt;data: it_data type standard table of t_data,&lt;/P&gt;&lt;P&gt;      wa_data type t_data.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;open dataset p_file for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;   write:/ 'Unable to open file:', p_file.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;   do.&lt;/P&gt;&lt;P&gt;     read dataset p_file into wa_data.&lt;/P&gt;&lt;P&gt;     if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;        exit.&lt;/P&gt;&lt;P&gt;     else.&lt;/P&gt;&lt;P&gt;        append wa_data to it_data.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;   enddo.&lt;/P&gt;&lt;P&gt;   close dataset p_file.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:36:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595493#M267478</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595494#M267479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; in first reply i have posted code for reading file from application server. &lt;/P&gt;&lt;P&gt; this code will create file on applicaton server.&lt;/P&gt;&lt;P&gt; in this code i have added "length" statement which is use to catete record when you have no data for the last field. for example you have data in you itab like..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABC   123    XYX&lt;/P&gt;&lt;P&gt;WER   453    SDF&lt;/P&gt;&lt;P&gt;ASS   577    &lt;/P&gt;&lt;P&gt;QWE   321    232&lt;/P&gt;&lt;P&gt;in this situation when you dont have record for the third row, file will be created with blank record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  open file on application server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  open dataset &amp;lt;file name&amp;gt; for output in text mode.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  transfer the record  first.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  transfer itab to &amp;lt;filename&amp;gt; length len.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  close the file at Application Server.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  close dataset &amp;lt;filename&amp;gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 05:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595494#M267479</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T05:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595495#M267480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use code:&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  dsn(40) VALUE&lt;/P&gt;&lt;P&gt;  '\usr\sap\TDV\DVEBMGS00\data\stat.dat',&lt;/P&gt;&lt;P&gt;  rec(80).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First use opendataset.&lt;/P&gt;&lt;P&gt;read datset and last close dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn.&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 dsn INTO rec.&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;    ELSE.&lt;/P&gt;&lt;P&gt;      WRITE / rec.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLOSE DATASET dsn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 06:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595495#M267480</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T06:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: To create a file on Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595496#M267481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use transfer insted of read staments&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Sep 2006 06:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/to-create-a-file-on-application-server/m-p/1595496#M267481</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-09-22T06:09:32Z</dc:date>
    </item>
  </channel>
</rss>

