<?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: open data set and close data set in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705477#M309059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi chaitanya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you asked, how to find the created file. you must consider that the file is written on the abap-application-server. there may be more then one application-server in the sap-system. if you want to access to the file by your workstation, your network-admin must first define a shared folder, to which both the sap-server and your pc can access. or ask your admin to setup a ftp-server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as a workaround you can have a look to parts of the file-system on the application-server by transaction AL11. you can download files to your workstation with by transaction CG3Y, and upload by CG3Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;torsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2006 15:18:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-07T15:18:35Z</dc:date>
    <item>
      <title>open data set and close data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705473#M309055</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;i have some doubt in open/read/close data set&lt;/P&gt;&lt;P&gt;how to transfer data from internal table to sequential file, how we find sequential file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks and regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;chaitanya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 10:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705473#M309055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T10:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: open data set and close data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705474#M309056</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;&lt;/P&gt;&lt;P&gt;Open Dataset is used to read or write on to application server ... other than that i am not sure that there exists any way to do the same ... here is a short description for that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FILE HANDLING IN SAP&lt;/P&gt;&lt;P&gt;Introduction&lt;/P&gt;&lt;P&gt;&amp;#149; Files on application server are sequential files.&lt;/P&gt;&lt;P&gt;&amp;#149; Files on presentation server / workstation are local files. &lt;/P&gt;&lt;P&gt;&amp;#149; A sequential file is also called a dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Handling of Sequential file&lt;/P&gt;&lt;P&gt;Three steps are involved in sequential file handling&lt;/P&gt;&lt;P&gt;&amp;#149; OPEN&lt;/P&gt;&lt;P&gt;&amp;#149; PROCESS&lt;/P&gt;&lt;P&gt;&amp;#149; CLOSE&lt;/P&gt;&lt;P&gt;Here processing of file can be READING a file or WRITING on to a file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN FILE&lt;/P&gt;&lt;P&gt;Before data can be processed, a file needs to be opened.&lt;/P&gt;&lt;P&gt;After processing file is closed.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;OPEN DATASET &amp;lt;file name&amp;gt; FOR {OUTPUT/INPUT/APPENDING}&lt;/P&gt;&lt;P&gt;IN {TEXT/BINARY} MODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This statement returns SY_SUBRC as 0 for successful opening of file or 8, if unsuccessful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTPUT: Opens the file for writing. If the dataset already exists, this will place the cursor at the start of the dataset, the old contents get deleted at the end of the program or when the CLOSE DATASET is encountered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INPUT: Opens a file for READ and places the cursor at the beginning of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR APPENDING: Opens the file for writing and places the cursor at the end of file. If the file does not exist, it is generated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINARY MODE: The READ or TRANSFER will be character wise. Each time &amp;#145;n&amp;#146;&amp;#146; characters are READ or transferred. The next READ or TRANSFER will start from the next character position and not on the next line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN TEXT MODE: The READ or TRANSFER will start at the beginning of a new line each time. If for READ, the destination is shorter than the source, it gets truncated. If destination is longer, then it is padded with spaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Defaults: If nothing is mentioned, then defaults are FOR INPUT and in BINARY MODE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS FILE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Processing a file involves READing the file or Writing on to file TRANSFER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRANSFER Statement&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;TRANSFER &amp;lt;field&amp;gt; TO &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;&amp;lt;Field&amp;gt; can also be a field string / work area / DDIC structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each transfer statement writes a statement to the dataset. In binary mode, it writes the length of the field to the dataset. In text mode, it writes one line to the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the file is not already open, TRANSFER tries to OPEN file FOR OUTPUT (IN BINARY MODE) or using the last OPEN DATASET statement for this file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF FILE HANDLING, TRANSFER IS THE ONLY STATEMENT WHICH DOES NOT RETURN SY-SUBRC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ Statement&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;READ DATASET &amp;lt;file name&amp;gt; INTO &amp;lt;field&amp;gt;. &lt;/P&gt;&lt;P&gt;&amp;lt;Field&amp;gt; can also be a field string / work area / DDIC structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each READ will get one record from the dataset. In binary mode it reads the length of the field and in text mode it reads each line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLOSE FILE: &lt;/P&gt;&lt;P&gt;The program will close all sequential files, which are open at the end of the program. However, it is a good programming practice to explicitly close all the datasets that were opened.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;CLOSE DATASET &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;SY-SUBRC will be set to 0 or 8 depending on whether the CLOSE is successful or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FILE:&lt;/P&gt;&lt;P&gt;A dataset can be deleted.&lt;/P&gt;&lt;P&gt;Syntax:&lt;/P&gt;&lt;P&gt;DELETE DATASET &amp;lt;file name&amp;gt;.&lt;/P&gt;&lt;P&gt;SY-SUBRC will be set to 0 or 8 depending on whether the DELETE is successful or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pseudo logic for processing the sequential files:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For reading:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open dataset for input in a particular mode.&lt;/P&gt;&lt;P&gt;Start DO loop.&lt;/P&gt;&lt;P&gt;Read dataset into a field.&lt;/P&gt;&lt;P&gt;If READ is not successful.&lt;/P&gt;&lt;P&gt;Exit the loop.&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;Do relevant processing for that record.&lt;/P&gt;&lt;P&gt;End the do loop.&lt;/P&gt;&lt;P&gt;Close the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For writing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open dataset for output / Appending in a particular mode.&lt;/P&gt;&lt;P&gt;Populate the field that is to be transferred.&lt;/P&gt;&lt;P&gt;TRANSFER the filed to a dataset.&lt;/P&gt;&lt;P&gt;Close the dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;i&amp;gt;chk a sampel&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: p_file like rlgrap-filename obligatory
default '/usr/sap/upload.xls'.

types: begin of t_data,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
matnr like vbap-matnr,
werks like vbap-werks,
megne like vbap-zmeng,
end of t_data.
data: it_data type standard table of t_data,
wa_data type t_data.

open dataset p_file for output in text mode encoding default.
if sy-subrc ne 0.
write:/ 'Unable to open file:', p_file.
else.
do.
read dataset p_file into wa_data.
if sy-subrc ne 0.
exit.
else.
append wa_data to it_data.
endif.
enddo.
close dataset p_file.
endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;And if you want to write on the file.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*--- open UNIX file
open dataset unixfile for output in text mode message w_msg.
if sy-subrc ne 0.
write: / 'Cannot open for writing:', unixfile, w_msg.
exit.
endif.
*--- write UNIX file
loop at it_file.
transfer it_file to unixfile.
endloop.
*--- close UNIX file
close dataset unixfile.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds&lt;/P&gt;&lt;P&gt;Anver&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 11:00:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705474#M309056</guid>
      <dc:creator>anversha_s</dc:creator>
      <dc:date>2006-11-07T11:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: open data set and close data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705475#M309057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Open Dataset&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  catch system-exceptions DATASET_CANT_OPEN = 8.&lt;/P&gt;&lt;P&gt;    open dataset UNIX_FILE for output in text mode encoding default.&lt;/P&gt;&lt;P&gt;  endcatch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write to Dataset&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at IT_STR into IS_STR.&lt;/P&gt;&lt;P&gt;    catch system-exceptions DATASET_NOT_OPEN = 0  .&lt;/P&gt;&lt;P&gt;      transfer IS_STR-STR to UNIX_FILE.&lt;/P&gt;&lt;P&gt;    endcatch.&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if SY-SUBRC eq 0.&lt;/P&gt;&lt;P&gt;    message S138(ZSM) with 'Data Downloaded to Unix File'.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Close Dataset&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  close dataset UNIX_FILE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;- Gopi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 11:06:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705475#M309057</guid>
      <dc:creator>gopi_narendra</dc:creator>
      <dc:date>2006-11-07T11:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: open data set and close data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705476#M309058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaitanya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer Sample Code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;constants:   c_split         TYPE c&lt;/P&gt;&lt;P&gt;                           VALUE cl_abap_char_utilities=&amp;gt;horizontal_tab,&lt;/P&gt;&lt;P&gt;           c_path          TYPE char100&lt;/P&gt;&lt;P&gt;                           VALUE '/local/data/interface/A28/DM/OUT'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Selection Screen&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS : rb_pc    RADIOBUTTON GROUP r1 DEFAULT 'X'&lt;/P&gt;&lt;P&gt;                                USER-COMMAND ucomm,    "For Presentation&lt;/P&gt;&lt;P&gt;             p_f1     LIKE rlgrap-filename&lt;/P&gt;&lt;P&gt;                                      MODIF ID rb1,    "Input File&lt;/P&gt;&lt;P&gt;             rb_srv   RADIOBUTTON GROUP r1,             "For Application&lt;/P&gt;&lt;P&gt;             p_f2     LIKE rlgrap-filename&lt;/P&gt;&lt;P&gt;                                     MODIF ID rb2,     "Input File&lt;/P&gt;&lt;P&gt;             p_direct TYPE char128 MODIF ID abc DEFAULT c_path.&lt;/P&gt;&lt;P&gt;                                                       "File directory&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Browse Presentation Server&lt;/P&gt;&lt;P&gt;  PERFORM f1000_browse_presentation_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_f2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Browse Application Server&lt;/P&gt;&lt;P&gt;  PERFORM f1001_browse_appl_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;    IF rb_pc = 'X' AND screen-group1 = 'RB2'.&lt;/P&gt;&lt;P&gt;      screen-input = '0'.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ELSEIF rb_srv = 'X' AND screen-group1 = 'RB1'.&lt;/P&gt;&lt;P&gt;      screen-input = '0'.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF screen-group1 = 'ABC'.&lt;/P&gt;&lt;P&gt;      screen-input = '0'.&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  f1000_browse_presentation_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;      Pick up the filepath for the file in the presentation server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1000_browse_presentation_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CONSTANTS: lcl_path TYPE char20 VALUE 'C:'.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'WS_FILENAME_GET'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      def_path         = lcl_path&lt;/P&gt;&lt;P&gt;      mask             = c_mask  "',&lt;STRONG&gt;.&lt;/STRONG&gt;,&lt;STRONG&gt;.&lt;/STRONG&gt;.'&lt;/P&gt;&lt;P&gt;      mode             = c_mode&lt;/P&gt;&lt;P&gt;      title            = text-006&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      filename         = p_f1&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      inv_winsys       = 1&lt;/P&gt;&lt;P&gt;      no_batch         = 2&lt;/P&gt;&lt;P&gt;      selection_cancel = 3&lt;/P&gt;&lt;P&gt;      selection_error  = 4&lt;/P&gt;&lt;P&gt;      OTHERS           = 5.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    flg_pre = c_x.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f1000_browse_presentation_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  f1001_browse_appl_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;   Pick up the file path for the file in the application server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1001_browse_appl_file .&lt;/P&gt;&lt;P&gt;  DATA:  lcl_directory  TYPE char128.&lt;/P&gt;&lt;P&gt;  lcl_directory  = p_direct.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      directory        = lcl_directory&lt;/P&gt;&lt;P&gt;      filemask         = c_mask&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      serverfile       = p_f2&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      canceled_by_user = 1&lt;/P&gt;&lt;P&gt;      OTHERS           = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   MESSAGE e000(zmm) WITH text-039.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   flg_app = 'X'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f1001_browse_appl_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  f1003_pre_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;    Upload the file from the presentation server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1003_pre_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: lcl_filename TYPE string.&lt;/P&gt;&lt;P&gt;  lcl_filename = p_f1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF p_f1 IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'GUI_UPLOAD'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        filename                = lcl_filename&lt;/P&gt;&lt;P&gt;        filetype                = 'ASC'&lt;/P&gt;&lt;P&gt;        has_field_separator     = 'X'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        data_tab                = i_input&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        file_open_error         = 1&lt;/P&gt;&lt;P&gt;        file_read_error         = 2&lt;/P&gt;&lt;P&gt;        no_batch                = 3&lt;/P&gt;&lt;P&gt;        gui_refuse_filetransfer = 4&lt;/P&gt;&lt;P&gt;        invalid_type            = 5&lt;/P&gt;&lt;P&gt;        no_authority            = 6&lt;/P&gt;&lt;P&gt;        unknown_error           = 7&lt;/P&gt;&lt;P&gt;        bad_data_format         = 8&lt;/P&gt;&lt;P&gt;        header_not_allowed      = 9&lt;/P&gt;&lt;P&gt;        separator_not_allowed   = 10&lt;/P&gt;&lt;P&gt;        header_too_long         = 11&lt;/P&gt;&lt;P&gt;        unknown_dp_error        = 12&lt;/P&gt;&lt;P&gt;        access_denied           = 13&lt;/P&gt;&lt;P&gt;        dp_out_of_memory        = 14&lt;/P&gt;&lt;P&gt;        disk_full               = 15&lt;/P&gt;&lt;P&gt;        dp_timeout              = 16&lt;/P&gt;&lt;P&gt;        OTHERS                  = 17.&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;&lt;/P&gt;&lt;P&gt;      MESSAGE s000 WITH text-031.&lt;/P&gt;&lt;P&gt;      EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   PERFORM populate_error_log USING space&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                                    text-023.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f1003_pre_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Form  f1004_app_file&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;     upload the file from the application server&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1004_app_file .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH: i_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  OPEN DATASET p_f2 IN TEXT MODE ENCODING DEFAULT FOR INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    DO.&lt;/P&gt;&lt;P&gt;      READ DATASET p_f2 INTO  wa_input_rec.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Split The CSV record into Work Area&lt;/P&gt;&lt;P&gt;        PERFORM f0025_record_split.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Populate internal table.&lt;/P&gt;&lt;P&gt;        APPEND wa_input TO i_input.&lt;/P&gt;&lt;P&gt;        CLEAR wa_input.&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;          MESSAGE s000 WITH text-030.&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;      ELSE.&lt;/P&gt;&lt;P&gt;        EXIT.&lt;/P&gt;&lt;P&gt;&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;ENDFORM. " f1004_app_file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&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;Move the assembly layer file into the work area&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f0025_record_split .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR wa_input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SPLIT wa_input_rec AT c_split INTO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    wa_input-legacykey&lt;/P&gt;&lt;P&gt;    wa_input-bu_partner&lt;/P&gt;&lt;P&gt;    wa_input-anlage.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;ENDFORM.                    " f0025_record_split&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if this helps.&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 11:07:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705476#M309058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T11:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: open data set and close data set</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705477#M309059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi chaitanya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you asked, how to find the created file. you must consider that the file is written on the abap-application-server. there may be more then one application-server in the sap-system. if you want to access to the file by your workstation, your network-admin must first define a shared folder, to which both the sap-server and your pc can access. or ask your admin to setup a ftp-server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as a workaround you can have a look to parts of the file-system on the application-server by transaction AL11. you can download files to your workstation with by transaction CG3Y, and upload by CG3Z.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;torsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 15:18:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/open-data-set-and-close-data-set/m-p/1705477#M309059</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-07T15:18:35Z</dc:date>
    </item>
  </channel>
</rss>

