<?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: Application Server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097416#M436840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kumar P,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try this which can help u,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: file2(200) type c default 'seshu'.&lt;/P&gt;&lt;P&gt;here seshu is the file name which is availabel in application server....&lt;/P&gt;&lt;P&gt;open dataset file2 for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    refresh tab_map.&lt;/P&gt;&lt;P&gt;    read dataset file2 into g_tab_vf01.&lt;/P&gt;&lt;P&gt;tab_map is itab for bdcdata structure....&lt;/P&gt;&lt;P&gt;g_tab_vf01 is the itab to download records from file called seshu.&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2007 09:06:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-04-16T09:06:12Z</dc:date>
    <item>
      <title>Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097407#M436831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any one give simple steps to upload a file from aplication server and its related function module ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097407#M436831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097408#M436832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi......&lt;/P&gt;&lt;P&gt;see the following code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will create a CSV file in the application server.......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  YCSV_SPFLI_APP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES :&lt;/P&gt;&lt;P&gt;  SPFLI.                               " Flight&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  FIELD-SYMBOLS : &amp;lt;FS&amp;gt;. "TYPE C.&lt;/P&gt;&lt;P&gt;DATA T_SPFLI LIKE STANDARD TABLE OF SPFLI .&lt;/P&gt;&lt;P&gt;DATA W_CHAR(20) TYPE C.&lt;/P&gt;&lt;P&gt;DATA W_TYPE .&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;  BEGIN OF T_TABLE OCCURS 0,&lt;/P&gt;&lt;P&gt;    LINE TYPE STRING,&lt;/P&gt;&lt;P&gt;  END OF T_TABLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM SPFLI INTO TABLE T_SPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_SPFLI INTO SPFLI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO.&lt;/P&gt;&lt;P&gt;    ASSIGN COMPONENT SY-INDEX OF STRUCTURE SPFLI TO &amp;lt;FS&amp;gt;.&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;      MOVE &amp;lt;FS&amp;gt; TO W_CHAR.&lt;/P&gt;&lt;P&gt;      IF SY-INDEX EQ 1.&lt;/P&gt;&lt;P&gt;        T_TABLE-LINE = &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;        CONCATENATE T_TABLE-LINE ',' W_CHAR INTO T_TABLE-LINE.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;P&gt;  CONDENSE T_TABLE-LINE.&lt;/P&gt;&lt;P&gt;  APPEND T_TABLE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_TABLE.&lt;/P&gt;&lt;P&gt;  WRITE / T_TABLE-LINE.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;OPEN DATASET 'YH647_SPFLI' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;  MESSAGE ' File is Not Opend' TYPE 'S'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;LOOP AT T_TABLE.&lt;/P&gt;&lt;P&gt;  TRANSFER T_TABLE-LINE TO 'YH647_SPFLI'.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;CLOSE DATASET 'YH647_SPFLI'.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;OPEN DATASET for opening files &lt;/P&gt;&lt;P&gt;CLOSE DATASET for closing files &lt;/P&gt;&lt;P&gt;DELETE DATASET for deleting files&lt;/P&gt;&lt;P&gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let me know you have any doubts.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful.....&lt;/P&gt;&lt;P&gt;Suresh......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:36:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097408#M436832</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097409#M436833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  try the following code n let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"Table declarations...................................................&lt;/P&gt;&lt;P&gt;tables: bkpf.                          " Accounting Document Header&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"Selection screen elements............................................&lt;/P&gt;&lt;P&gt;parameters:&lt;/P&gt;&lt;P&gt;  p_burks like bkpf-bukrs.             " Company Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select-options:&lt;/P&gt;&lt;P&gt;  s_gjahr for bkpf-gjahr.              " Fiscal year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type declaration of the structure to hold Accounting Document Header*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  begin of fs_bkpf,&lt;/P&gt;&lt;P&gt;    bukrs type bkpf-bukrs,             " Company Code&lt;/P&gt;&lt;P&gt;    belnr type bkpf-belnr,             " Accounting Document Number&lt;/P&gt;&lt;P&gt;    gjahr type bkpf-gjahr,             " Fiscal year&lt;/P&gt;&lt;P&gt;    blart type bkpf-blart,             " 	Document type&lt;/P&gt;&lt;P&gt;    bldat type bkpf-bldat,             " Document date in document&lt;/P&gt;&lt;P&gt;  end of fs_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold Accounting Document Header                   *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  t_bkpf like standard table&lt;/P&gt;&lt;P&gt;           of fs_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Type declaration of the structure to hold file data                 *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  begin of fs_table,&lt;/P&gt;&lt;P&gt;    str type string,&lt;/P&gt;&lt;P&gt;  end of fs_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table to hold file data                                    *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  t_table like standard table&lt;/P&gt;&lt;P&gt;            of fs_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols: &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*" Data declarations...................................................&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Work variables                                                      *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;"----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="---------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  w_char(50)      type c,&lt;/P&gt;&lt;P&gt;  w_file_name(50) type c value 'YH645_050103'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select bukrs                           " Company Code&lt;/P&gt;&lt;P&gt;       belnr                           " Accounting Document Number&lt;/P&gt;&lt;P&gt;       gjahr                           " Fiscal year&lt;/P&gt;&lt;P&gt;       blart                           " 	Document type&lt;/P&gt;&lt;P&gt;       bldat                           " Document date in document&lt;/P&gt;&lt;P&gt;  from bkpf&lt;/P&gt;&lt;P&gt;  into table t_bkpf&lt;/P&gt;&lt;P&gt; where bukrs eq p_burks&lt;/P&gt;&lt;P&gt;   and gjahr in s_gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;  loop at t_bkpf into fs_bkpf.&lt;/P&gt;&lt;P&gt;    do.&lt;/P&gt;&lt;P&gt;      assign component sy-index of structure fs_bkpf to &amp;lt;fs&amp;gt;.&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;        move &amp;lt;fs&amp;gt; to w_char.&lt;/P&gt;&lt;P&gt;        if sy-index eq 1.&lt;/P&gt;&lt;P&gt;          fs_table-str = &amp;lt;fs&amp;gt;.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          concatenate fs_table-str ',' w_char into fs_table-str.&lt;/P&gt;&lt;P&gt;        endif.                         " IF SY-INDEX...&lt;/P&gt;&lt;P&gt;      endif.                           " IF SY-SUBRC...&lt;/P&gt;&lt;P&gt;    enddo.                             " DO...&lt;/P&gt;&lt;P&gt;    append fs_table to t_table.&lt;/P&gt;&lt;P&gt;  endloop.                             " LOOP AT T_KNA1...&lt;/P&gt;&lt;P&gt;endif.                                 " IF SY-SUBRC...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;open dataset w_file_name for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at t_table into fs_table.&lt;/P&gt;&lt;P&gt;  transfer fs_table-str to w_file_name.&lt;/P&gt;&lt;P&gt;endloop.                               " LOOP AT T_TABLE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first select the data from ddic structure and move it into an internal table, open a dataset intext mode and move the contents of internal table to application server using transfer fs_table-str to w_file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To open a file for writing, use the FOR OUTPUT addition to the OPEN DATASET statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;dsn&amp;gt; FOR OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not already exist, it is created automatically. If it does already exist, but is closed, its contents are overwritten. If the file exists and is already open (for read or write access, or for appending), the position is reset to the beginning of the file. If the system can open the file &amp;lt;dsn&amp;gt; successfully, SY-SUBRC is set to 0. If not, it is set to 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points if helpful.&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;kiran kumar k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        kiran kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:36:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097409#M436833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097410#M436834</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;Thanks ...No coding is needed , Just the steps to be followed is enough with the steps from begining ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097410#M436834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097411#M436835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi......&lt;/P&gt;&lt;P&gt;see the following link.&lt;/P&gt;&lt;P&gt;here it is explained clearly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3c8c358411d1829f0000e829fbfe/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful......&lt;/P&gt;&lt;P&gt;Suresh.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:41:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097411#M436835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097412#M436836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;Check this out&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapdevelopment.co.uk/file/file_uptabsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_uptabsap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 08:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097412#M436836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T08:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097413#M436837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these out for the same&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;A href="http://www.sapdevelopment.co.uk/file/file_uptabsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_uptabsap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET, is to open a file in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can open a file in application server to READ or WRITE or APPEND data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below extract the documenation can easily help you understand the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form 1 &lt;/P&gt;&lt;P&gt;OPEN DATASET dsn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1a. ... FOR INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1b. ... FOR OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1c. ... FOR APPENDING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1d. ... FOR UPDATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2a. ... IN BINARY MODE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2b. ... IN TEXT MODE [ENCODING (DEFAULT|UTF-8|NON-UNICODE)] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2c. ... IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2d. ... IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... REPLACEMENT CHARACTER rc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. ... IGNORING CONVERSION ERRORS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. ... AT POSITION p &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ... TYPE c &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. ... MESSAGE m &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. ... FILTER f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For details see the section File Interface. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Opens the specified file. If you do not specify a directory, the system uses the directory defined in the profile parameter DIR_HOME. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In programs without active Unicode check, the file is opened for reading in binary mode if you do not use any additions for OPENDATASET. To ensure downward compatibility with Releases &amp;lt;= 4.6, file names containing blanks are truncated at the position of the first blank. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In programs with active Unicode check, you must specify the access type (such as ... FOR INPUT, ... FOR OUTPUT, and so on) and the mode (such as ... IN TEXT MODE, ... IN BINARY MODE, and so on). If the file is opened using ... IN TEXT MODE, you must still use the addition ... ENCODING. If the Unicode check is enabled, it is possible to use file names containing blanks. Applying OPEN DATASET to a file already opened - in the same internal mode - triggers an exception of the type CX_SY_FILE_OPEN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;The file was opened. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;The file could not be opened. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;dsn(20) TYPE C VALUE '/usr/test.dat', &lt;/P&gt;&lt;P&gt;rec(80) TYPE C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT. &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;&lt;/P&gt;&lt;P&gt;READ DATASET dsn INTO rec. &lt;/P&gt;&lt;P&gt;WHILE sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;WRITE / rec. READ DATASET dsn INTO rec. &lt;/P&gt;&lt;P&gt;ENDWHILE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET dsn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system opens the file test.dat in the directory usr of the application server and reads it line by line. &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;Notes &lt;/P&gt;&lt;P&gt;The system must be able to reach the file from the current application server. You cannot edit files from the current presentation server. If you need to do this, use the function modules GUI_DOWNLOAD and GUI_UPLOAD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The form of the file name depends on the underlying operating system. To make your programs portable to different operating systems, use the function module FILE_GET_NAME, which returns the system-dependent name for an abstract file name. You can define file names using the transaction FILE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system automatically performs an authorization check. If this check fails, a runtime error occurs. You can prevent this by checking the authorization in advance using the function module AUTHORITY_CHECK_DATASET. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Access rights to files: &lt;/P&gt;&lt;P&gt;When you create a file, it is created under the user name used to start the SAP System. This is not usually the name of the current user. To allow the system to create files, you must assign write authorization to the user name of the SAP System in the relevant directory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1a &lt;/P&gt;&lt;P&gt;... FOR INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR INPUT opens the file in read mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not exist, OPEN ... FOR INPUT fails with Return Code SY-SUBRC = 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If OPEN DATASET is not executed in a Unicode program and if the user has write authorization for the file, the file is opened in read and write mode. Otherwise, it is only opened in read mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1b &lt;/P&gt;&lt;P&gt;... FOR OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR OUTPUT opens the file in write mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file already exists, its existing content is deleted. If the file does not exist, the system creates it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1c &lt;/P&gt;&lt;P&gt;... FOR APPENDING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR APPENDING opens the file in append mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file already exists, its contents are retained, and the system moves to the end of the file. If the file does not exist, the system creates it. If the file was already open, the system moves to the end of the 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;Note &lt;/P&gt;&lt;P&gt;When you open a file using FOR APPENDING, READDATASET always returns Return Code SY-SUBRC = 4 which is used to display the end of the 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;Addition 1d &lt;/P&gt;&lt;P&gt;... FOR UPDATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR UPDATE opens the file in read and write mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not exist, OPEN ... FOR UPDATE fails with Return Code SY-SUBRC = 8. &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;Addition 2a &lt;/P&gt;&lt;P&gt;... IN BINARY MODE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written unchanged (as stored in the memory). (For details, see READ DATASET and TRANSFER.) &lt;/P&gt;&lt;P&gt;This file format is used if you do not specify a MODE addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2b &lt;/P&gt;&lt;P&gt;... IN TEXT MODE [ENCODING (DEFAULT|UTF-8|NON-UNICODE)] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written line by line. (For details, see READ DATASET and TRANSFER.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;on ENCODING (DEFAULT|UTF-8|NON-UNICODE) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition specifies the character representation in the file: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFAULT &lt;/P&gt;&lt;P&gt;Corresponds to UTF-8 in Unicode systems and to NON-UNICODE in non-Unicode systems. &lt;/P&gt;&lt;P&gt;UTF-8 &lt;/P&gt;&lt;P&gt;Characters are represented in the file in the format UTF-8. &lt;/P&gt;&lt;P&gt;NON-UNICODE &lt;/P&gt;&lt;P&gt;Characters are represented in the file in the code page defined by the text environment current at the time a READ or TRANSFER command is executed (see SET LOCALE LANGUAGE). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2c &lt;/P&gt;&lt;P&gt;... IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written in a form which is compatible to BINARY MODE in Releases &amp;lt;= 4.6. This addition is primarily used to convert a file into the code page format specified already when it is opened. At runtime, the system uses the format of the system code page of the application server. The system saves the file then again in the code page specified. This procedure is important if data is exchanged between systems using different code pages. For more information, see READ DATASET and TRANSFER. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2d &lt;/P&gt;&lt;P&gt;... IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written in a form which is compatible to BINARY MODE in Releases &amp;lt;= 4.6. This addition is primarily used to convert a file into the code page format specified already when it is opened. At runtime, the system uses the format of the system code page of the application server. The system saves the file then again in the code page specified. This procedure is important if data is exchanged between systems using different code pages. For more information, see READ DATASET and TRANSFER. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;on BIG ENDIAN, LITTLE ENDIAN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions specify the byte sequence in which to store numbers (ABAP types I, F, and INT2) in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions may only be used in combination with the additions IN LEGACY BINARY MODE and IN LEGACY TEXT MODE. If these are not specified, the system assumes that the byte sequence determined by the hardware of the application server is used in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the byte sequence specified differs from that determined by the hardware of the application server, READDATASET and TRANSFER make the corresponding conversions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions replace the language element TRANSLATE ... NUMBER FORMAT ... which must not be used in Unicode programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on CODE PAGE cp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition specifies the code page which is used to represent texts in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition may only be used in combination with the additions IN LEGACY BINARY MODE and IN LEGACY TEXT MODE. If this addition is not specified, the system uses the code page defined by the text environment current at the time a READ or TRANSFER command is executed (see SET LOCALE LANGUAGE). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition replaces the language element TRANSLATE ... CODE PAGE ... which must not be used in Unicode programs. &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;Addition 3 &lt;/P&gt;&lt;P&gt;... REPLACEMENT CHARACTER rc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Specifies the replacement character which is used when a character cannot be converted during a character set conversion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;This addition may only be used in combination with the additions IN TEXT MODE and IN LEGACY ... MODE. If the addition is not specified, "#" is used as the replacement character. &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;Addition 4 &lt;/P&gt;&lt;P&gt;... IGNORING CONVERSION ERRORS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;This addition ensures that no exception is triggered when an error occurs during character set conversion and a file is accessed in read or write mode. If you do not use this addition, the exception CX_SY_CONVERSION_CODEPAGE is triggered when a conversion error occurs. (For details see READ DATASET and TRANSFER.) &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;Addition 5 &lt;/P&gt;&lt;P&gt;... AT POSITION p &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Sets the read/write position in the file to p. p is interpreted as the byte offset from the beginning of the 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;Notes &lt;/P&gt;&lt;P&gt;You can use the command GETDATASET POSITION to access the current read/write position. This value can be used as the parameter p for the AT POSITION addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use the OPEN ... FOR OUTPUT AT POSITION ... variant, the file contents are destroyed if the file already existed. To prevent this from happening, use OPEN ... FOR UPDATE AT POSITION ... if you want to change an existing file at the position specified. &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;Addition 6 &lt;/P&gt;&lt;P&gt;... TYPE c &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;You can specify additional file attributes in the field c. The field contents are passed to the operating system without changes and without any checks for correctness. For more information on the correctness of the attributes specified, refer to the open system call documentation of the relevant operating system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the application server runs under Windows NT and the file was opened using IN TEXT MODE or IN LEGACY TEXTMODE, the TYPE addition is interpreted as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c = 'NT' &lt;/P&gt;&lt;P&gt;The end of the line is marked with "CRLF". &lt;/P&gt;&lt;P&gt;c = 'UNIX' &lt;/P&gt;&lt;P&gt;The end of the line is marked with "LF". &lt;/P&gt;&lt;P&gt;Other &lt;/P&gt;&lt;P&gt;The addition is ignored, and the end of the line is marked with the line end character possibly already used in the file (see the note at the end of this document). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Generating the OS/400 file test.dat with the properties specified under TYPE. The following example specifies the record length, the block size, and the record format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'test.dat' &lt;/P&gt;&lt;P&gt;TYPE 'lrecl=80, blksize=8000, recfm=FB' &lt;/P&gt;&lt;P&gt;FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. &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;Addition 7 &lt;/P&gt;&lt;P&gt;... MESSAGE m &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If an error occurs opening the file, the corresponding message of the operating system is stored in the field m. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: dsn(20) VALUE '/usr/test.dat', &lt;/P&gt;&lt;P&gt;msg(100). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT MESSAGE msg &lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &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;WRITE / msg. &lt;/P&gt;&lt;P&gt;STOP. &lt;/P&gt;&lt;P&gt;ENDIF. &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;Addition 8 &lt;/P&gt;&lt;P&gt;... FILTER f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you are working under UNIX or Windows NT, you can specify an operating system command in the field f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Under UNIX, the following &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA dsn(20) VALUE '/usr/test.dat'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR OUTPUT FILTER 'compress' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;opens the file dsn and writes the data to the file in compressed form using the UNIX command compress. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT FILTER 'uncompress' &lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reads the file again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_FILE_OPEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The file is already open (only in Unicode programs) &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_REOPEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_CODEPAGE_CONVERTER_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The required conversion is not supported (because you specified an invalid code page or a language with SET LOCALE LANGUAGE not supported during conversion). &lt;/P&gt;&lt;P&gt;Runtime Error: CONVT_CODEPAGE_INIT (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_CONVERSION_CODEPAGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Internal conversion error &lt;/P&gt;&lt;P&gt;Runtime Error: CONVT_CODEPAGE (catchable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_FILE_AUTHORITY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: No authorization to access a file &lt;/P&gt;&lt;P&gt;Runtime Error: OPEN_DATASET_NO_AUTHORITY (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Authorization to access this file missing for OPEN DATASET with addition FILTER. &lt;/P&gt;&lt;P&gt;Runtime Error: OPEN_PIPE_NO_AUTHORITY (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_PIPES_NOT_SUPPORTED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: OPEN DATASET with addition FILTER is not supported on the current operating system. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_NO_PIPE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_TOO_MANY_FILES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The maximum number of open files has been exceeded. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_TOO_MANY_FILES (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Non-Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: You attempted to open a pipe already open. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_PIPE_POSITION &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;Note &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End of line marking under Windows NT &lt;/P&gt;&lt;P&gt;Since under Windows NT the line end in text files can be marked both with " CRLF" and with "LF", text files are handled in a special way on this operating system when opened using FOR OUTPUT or FOR APPENDING: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the addition TYPE to specify the desired end of line marking. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not specify an end of line marking using the addition TYPE, the system searches the file (if it exists already) for end of line markings. The first marking found is used for future search operations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not already exist or if no marking is found, the format specified in the profile parameter "abap/NTfopen" is used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the profile parameter is not set, "CRLF" is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget ot reward if useful......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097413#M436837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T09:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097414#M436838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check these out for the same&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;A href="http://www.sapdevelopment.co.uk/file/file_uptabsap.htm" target="test_blank"&gt;http://www.sapdevelopment.co.uk/file/file_uptabsap.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET, is to open a file in application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can open a file in application server to READ or WRITE or APPEND data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below extract the documenation can easily help you understand the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basic form 1 &lt;/P&gt;&lt;P&gt;OPEN DATASET dsn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extras: &lt;/P&gt;&lt;P&gt;1a. ... FOR INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1b. ... FOR OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1c. ... FOR APPENDING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1d. ... FOR UPDATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2a. ... IN BINARY MODE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2b. ... IN TEXT MODE [ENCODING (DEFAULT|UTF-8|NON-UNICODE)] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2c. ... IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2d. ... IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ... REPLACEMENT CHARACTER rc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. ... IGNORING CONVERSION ERRORS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. ... AT POSITION p &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. ... TYPE c &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. ... MESSAGE m &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. ... FILTER f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. For details see the section File Interface. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Opens the specified file. If you do not specify a directory, the system uses the directory defined in the profile parameter DIR_HOME. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In programs without active Unicode check, the file is opened for reading in binary mode if you do not use any additions for OPENDATASET. To ensure downward compatibility with Releases &amp;lt;= 4.6, file names containing blanks are truncated at the position of the first blank. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In programs with active Unicode check, you must specify the access type (such as ... FOR INPUT, ... FOR OUTPUT, and so on) and the mode (such as ... IN TEXT MODE, ... IN BINARY MODE, and so on). If the file is opened using ... IN TEXT MODE, you must still use the addition ... ENCODING. If the Unicode check is enabled, it is possible to use file names containing blanks. Applying OPEN DATASET to a file already opened - in the same internal mode - triggers an exception of the type CX_SY_FILE_OPEN. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Return Code is set as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SY-SUBRC = 0: &lt;/P&gt;&lt;P&gt;The file was opened. &lt;/P&gt;&lt;P&gt;SY-SUBRC = 8: &lt;/P&gt;&lt;P&gt;The file could not be opened. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: &lt;/P&gt;&lt;P&gt;dsn(20) TYPE C VALUE '/usr/test.dat', &lt;/P&gt;&lt;P&gt;rec(80) TYPE C. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT. &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;&lt;/P&gt;&lt;P&gt;READ DATASET dsn INTO rec. &lt;/P&gt;&lt;P&gt;WHILE sy-subrc &amp;lt;&amp;gt; 0. &lt;/P&gt;&lt;P&gt;WRITE / rec. READ DATASET dsn INTO rec. &lt;/P&gt;&lt;P&gt;ENDWHILE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE DATASET dsn. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system opens the file test.dat in the directory usr of the application server and reads it line by line. &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;Notes &lt;/P&gt;&lt;P&gt;The system must be able to reach the file from the current application server. You cannot edit files from the current presentation server. If you need to do this, use the function modules GUI_DOWNLOAD and GUI_UPLOAD. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The form of the file name depends on the underlying operating system. To make your programs portable to different operating systems, use the function module FILE_GET_NAME, which returns the system-dependent name for an abstract file name. You can define file names using the transaction FILE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system automatically performs an authorization check. If this check fails, a runtime error occurs. You can prevent this by checking the authorization in advance using the function module AUTHORITY_CHECK_DATASET. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;Access rights to files: &lt;/P&gt;&lt;P&gt;When you create a file, it is created under the user name used to start the SAP System. This is not usually the name of the current user. To allow the system to create files, you must assign write authorization to the user name of the SAP System in the relevant directory. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1a &lt;/P&gt;&lt;P&gt;... FOR INPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR INPUT opens the file in read mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not exist, OPEN ... FOR INPUT fails with Return Code SY-SUBRC = 8. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If OPEN DATASET is not executed in a Unicode program and if the user has write authorization for the file, the file is opened in read and write mode. Otherwise, it is only opened in read mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1b &lt;/P&gt;&lt;P&gt;... FOR OUTPUT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR OUTPUT opens the file in write mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file already exists, its existing content is deleted. If the file does not exist, the system creates it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 1c &lt;/P&gt;&lt;P&gt;... FOR APPENDING &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR APPENDING opens the file in append mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file already exists, its contents are retained, and the system moves to the end of the file. If the file does not exist, the system creates it. If the file was already open, the system moves to the end of the 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;Note &lt;/P&gt;&lt;P&gt;When you open a file using FOR APPENDING, READDATASET always returns Return Code SY-SUBRC = 4 which is used to display the end of the 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;Addition 1d &lt;/P&gt;&lt;P&gt;... FOR UPDATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;OPEN ... FOR UPDATE opens the file in read and write mode. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not exist, OPEN ... FOR UPDATE fails with Return Code SY-SUBRC = 8. &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;Addition 2a &lt;/P&gt;&lt;P&gt;... IN BINARY MODE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written unchanged (as stored in the memory). (For details, see READ DATASET and TRANSFER.) &lt;/P&gt;&lt;P&gt;This file format is used if you do not specify a MODE addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2b &lt;/P&gt;&lt;P&gt;... IN TEXT MODE [ENCODING (DEFAULT|UTF-8|NON-UNICODE)] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written line by line. (For details, see READ DATASET and TRANSFER.) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;on ENCODING (DEFAULT|UTF-8|NON-UNICODE) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition specifies the character representation in the file: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEFAULT &lt;/P&gt;&lt;P&gt;Corresponds to UTF-8 in Unicode systems and to NON-UNICODE in non-Unicode systems. &lt;/P&gt;&lt;P&gt;UTF-8 &lt;/P&gt;&lt;P&gt;Characters are represented in the file in the format UTF-8. &lt;/P&gt;&lt;P&gt;NON-UNICODE &lt;/P&gt;&lt;P&gt;Characters are represented in the file in the code page defined by the text environment current at the time a READ or TRANSFER command is executed (see SET LOCALE LANGUAGE). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2c &lt;/P&gt;&lt;P&gt;... IN LEGACY BINARY MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written in a form which is compatible to BINARY MODE in Releases &amp;lt;= 4.6. This addition is primarily used to convert a file into the code page format specified already when it is opened. At runtime, the system uses the format of the system code page of the application server. The system saves the file then again in the code page specified. This procedure is important if data is exchanged between systems using different code pages. For more information, see READ DATASET and TRANSFER. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Addition 2d &lt;/P&gt;&lt;P&gt;... IN LEGACY TEXT MODE [(BIG|LITTLE) ENDIAN] [CODE PAGE cp] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Data is read or written in a form which is compatible to BINARY MODE in Releases &amp;lt;= 4.6. This addition is primarily used to convert a file into the code page format specified already when it is opened. At runtime, the system uses the format of the system code page of the application server. The system saves the file then again in the code page specified. This procedure is important if data is exchanged between systems using different code pages. For more information, see READ DATASET and TRANSFER. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes &lt;/P&gt;&lt;P&gt;on BIG ENDIAN, LITTLE ENDIAN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions specify the byte sequence in which to store numbers (ABAP types I, F, and INT2) in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions may only be used in combination with the additions IN LEGACY BINARY MODE and IN LEGACY TEXT MODE. If these are not specified, the system assumes that the byte sequence determined by the hardware of the application server is used in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the byte sequence specified differs from that determined by the hardware of the application server, READDATASET and TRANSFER make the corresponding conversions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These additions replace the language element TRANSLATE ... NUMBER FORMAT ... which must not be used in Unicode programs. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on CODE PAGE cp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition specifies the code page which is used to represent texts in the file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition may only be used in combination with the additions IN LEGACY BINARY MODE and IN LEGACY TEXT MODE. If this addition is not specified, the system uses the code page defined by the text environment current at the time a READ or TRANSFER command is executed (see SET LOCALE LANGUAGE). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This addition replaces the language element TRANSLATE ... CODE PAGE ... which must not be used in Unicode programs. &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;Addition 3 &lt;/P&gt;&lt;P&gt;... REPLACEMENT CHARACTER rc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Specifies the replacement character which is used when a character cannot be converted during a character set conversion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;This addition may only be used in combination with the additions IN TEXT MODE and IN LEGACY ... MODE. If the addition is not specified, "#" is used as the replacement character. &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;Addition 4 &lt;/P&gt;&lt;P&gt;... IGNORING CONVERSION ERRORS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;This addition ensures that no exception is triggered when an error occurs during character set conversion and a file is accessed in read or write mode. If you do not use this addition, the exception CX_SY_CONVERSION_CODEPAGE is triggered when a conversion error occurs. (For details see READ DATASET and TRANSFER.) &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;Addition 5 &lt;/P&gt;&lt;P&gt;... AT POSITION p &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;Sets the read/write position in the file to p. p is interpreted as the byte offset from the beginning of the 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;Notes &lt;/P&gt;&lt;P&gt;You can use the command GETDATASET POSITION to access the current read/write position. This value can be used as the parameter p for the AT POSITION addition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use the OPEN ... FOR OUTPUT AT POSITION ... variant, the file contents are destroyed if the file already existed. To prevent this from happening, use OPEN ... FOR UPDATE AT POSITION ... if you want to change an existing file at the position specified. &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;Addition 6 &lt;/P&gt;&lt;P&gt;... TYPE c &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;You can specify additional file attributes in the field c. The field contents are passed to the operating system without changes and without any checks for correctness. For more information on the correctness of the attributes specified, refer to the open system call documentation of the relevant operating system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note &lt;/P&gt;&lt;P&gt;If the application server runs under Windows NT and the file was opened using IN TEXT MODE or IN LEGACY TEXTMODE, the TYPE addition is interpreted as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c = 'NT' &lt;/P&gt;&lt;P&gt;The end of the line is marked with "CRLF". &lt;/P&gt;&lt;P&gt;c = 'UNIX' &lt;/P&gt;&lt;P&gt;The end of the line is marked with "LF". &lt;/P&gt;&lt;P&gt;Other &lt;/P&gt;&lt;P&gt;The addition is ignored, and the end of the line is marked with the line end character possibly already used in the file (see the note at the end of this document). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Generating the OS/400 file test.dat with the properties specified under TYPE. The following example specifies the record length, the block size, and the record format. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET 'test.dat' &lt;/P&gt;&lt;P&gt;TYPE 'lrecl=80, blksize=8000, recfm=FB' &lt;/P&gt;&lt;P&gt;FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. &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;Addition 7 &lt;/P&gt;&lt;P&gt;... MESSAGE m &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If an error occurs opening the file, the corresponding message of the operating system is stored in the field m. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;DATA: dsn(20) VALUE '/usr/test.dat', &lt;/P&gt;&lt;P&gt;msg(100). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT MESSAGE msg &lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &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;WRITE / msg. &lt;/P&gt;&lt;P&gt;STOP. &lt;/P&gt;&lt;P&gt;ENDIF. &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;Addition 8 &lt;/P&gt;&lt;P&gt;... FILTER f &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;If you are working under UNIX or Windows NT, you can specify an operating system command in the field f. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example &lt;/P&gt;&lt;P&gt;Under UNIX, the following &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA dsn(20) VALUE '/usr/test.dat'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR OUTPUT FILTER 'compress' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;opens the file dsn and writes the data to the file in compressed form using the UNIX command compress. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET dsn FOR INPUT FILTER 'uncompress' &lt;/P&gt;&lt;P&gt;IN TEXT MODE ENCODING DEFAULT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reads the file again. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exceptions &lt;/P&gt;&lt;P&gt;Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_FILE_OPEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The file is already open (only in Unicode programs) &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_REOPEN &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_CODEPAGE_CONVERTER_INIT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The required conversion is not supported (because you specified an invalid code page or a language with SET LOCALE LANGUAGE not supported during conversion). &lt;/P&gt;&lt;P&gt;Runtime Error: CONVT_CODEPAGE_INIT (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_CONVERSION_CODEPAGE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Internal conversion error &lt;/P&gt;&lt;P&gt;Runtime Error: CONVT_CODEPAGE (catchable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_FILE_AUTHORITY &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: No authorization to access a file &lt;/P&gt;&lt;P&gt;Runtime Error: OPEN_DATASET_NO_AUTHORITY (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: Authorization to access this file missing for OPEN DATASET with addition FILTER. &lt;/P&gt;&lt;P&gt;Runtime Error: OPEN_PIPE_NO_AUTHORITY (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_PIPES_NOT_SUPPORTED &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: OPEN DATASET with addition FILTER is not supported on the current operating system. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_NO_PIPE (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CX_SY_TOO_MANY_FILES &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: The maximum number of open files has been exceeded. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_TOO_MANY_FILES (catchable) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Non-Catchable Exceptions &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cause: You attempted to open a pipe already open. &lt;/P&gt;&lt;P&gt;Runtime Error: DATASET_PIPE_POSITION &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;Note &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End of line marking under Windows NT &lt;/P&gt;&lt;P&gt;Since under Windows NT the line end in text files can be marked both with " CRLF" and with "LF", text files are handled in a special way on this operating system when opened using FOR OUTPUT or FOR APPENDING: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the addition TYPE to specify the desired end of line marking. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not specify an end of line marking using the addition TYPE, the system searches the file (if it exists already) for end of line markings. The first marking found is used for future search operations. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file does not already exist or if no marking is found, the format specified in the profile parameter "abap/NTfopen" is used. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the profile parameter is not set, "CRLF" is used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget ot reward if useful......&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:04:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097414#M436838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T09:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097415#M436839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;        Use this FM...&lt;/P&gt;&lt;P&gt;        DOCFILE_SERVER_TO_CLIENT  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Reward points if useful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sekhar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097415#M436839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T09:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Application Server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097416#M436840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi kumar P,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try this which can help u,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: file2(200) type c default 'seshu'.&lt;/P&gt;&lt;P&gt;here seshu is the file name which is availabel in application server....&lt;/P&gt;&lt;P&gt;open dataset file2 for input in text mode encoding default.&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    refresh tab_map.&lt;/P&gt;&lt;P&gt;    read dataset file2 into g_tab_vf01.&lt;/P&gt;&lt;P&gt;tab_map is itab for bdcdata structure....&lt;/P&gt;&lt;P&gt;g_tab_vf01 is the itab to download records from file called seshu.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2007 09:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/application-server/m-p/2097416#M436840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-16T09:06:12Z</dc:date>
    </item>
  </channel>
</rss>

