Help me.about "open dataset"

we using ecc4.6,using "open dataset" down or uplod data to SAP or others system previously,
but now,we using ecc6.0.
   the problem is : 'utf-8' we down txt(Encoding:UTF-8),But we have a system using VB develop,
this system (VB) can not read 'utf-8' using right way,the system(VB) can read 'GB2312'
I wants to direct down 'GB2312' to system(VB),
  who can help me? thank you very much!!!
i try CL_ABAP_CONV_IN_CE  but failed
             for example: data:INSTR(20).
                   data:outstr type xstring.
                   data:conv TYPE REF TO cl_abap_conv_out_ce.
                   conv = cl_abap_conv_out_ce=>create(
                                                                           encoding = 'UTF-8'
                                                                           endian = 'L' ).
                   conv->convert( EXPORTING data = INSTR
                                                                IMPORTING buffer = OUTSTR ).
i try  translate_codepage_out but failed~~~

do like this
open dataset v_file for input in binary mode.
read dataset v_file into gv_xstr.
close dataset v_file.
if sy-subrc ne 0.
write: 'Error in opening file'.
endif.
gv_bom = gv_xstr.
  try.
      call method cl_abap_conv_x2x_ce=>create
        exporting
          in_encoding  = '4103'                   "l_encoding_in
          replacement  = '#'
          ignore_cerr  = 'X'                      "igncerr
          out_encoding = '4110'                   "l_encoding_out "UTF-8
          input        = gv_xstr
        receiving
          conv         = l_conv.
    catch cx_parameter_invalid_type.
      message x000(00).
    catch cx_parameter_invalid_range .
      message x000(00).
    catch cx_sy_codepage_converter_init .
      l_text = 'Error creating converter object for codepage pair: &1 &2'(001).
     replace '&1' with cpin into l_text.
     replace '&2' with cpout into l_text.
      write :/ l_text.
      exit.
  endtry.

Similar Messages

  • Need help fast about opening file

    hello i have this 2 classes to open file and display it .the open method works fine but when ever i try to open different file it adds the new data and display both . the problem is it not suppose to add the new data to the old list it should only show the new data only ...can any one help thx
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RoomGUI extends JFrame
       private RoomSortedList list;
         // Menu items:
       private JMenuItem mOpen;
       private JMenuItem mSaveAs;
       private JMenuItem mExit;
         // Displayed regions of the window:
         private JTextField messageField;
         private JTextArea textArea;
          * Constructor for RoomGUI object to set up
          * GUI window with menu.
         public RoomGUI()
              list=new RoomSortedList();     
         // Components to display on window:
              messageField = new JTextField();
              messageField.setEditable(false);
              textArea = new JTextArea();
              textArea.setEditable(false); 
                        // Arrnge components on window:
              Container contentPane = getContentPane();
              contentPane.add(messageField, BorderLayout.SOUTH);
              JPanel centerPanel = new JPanel();
              contentPane.add(centerPanel, BorderLayout.CENTER);
              centerPanel.setLayout(new GridLayout(1,1));
              centerPanel.add(new JScrollPane(textArea));
    //  Create menu items for the "File" menu:
          mOpen = new JMenuItem ("Open");
          mSaveAs = new JMenuItem ("SaveAs");
          mExit = new JMenuItem ("Exit");
          //  Create "File" menu:
          JMenu fileMenu = new JMenu ("File", /*tearoff =*/ false);
          fileMenu.add(mOpen);
          fileMenu.add(mSaveAs);
          fileMenu.add(mExit);
          // Create menu bar:
          JMenuBar mainMenuBar = new JMenuBar();
          mainMenuBar.add(fileMenu);
          // Put menu bar on this window:
          setJMenuBar(mainMenuBar);
         mOpen.addActionListener( new FileOpener(textArea,list) );
         mSaveAs.addActionListener( new FileSaver(list) );
          mExit.addActionListener(new Quitter());
              // Routine necessities with JFrame windows:
              setSize(500, 400);
              setLocation(200, 100);
              setTitle("Project 4");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setVisible(true);
         } // constructorfile opener
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FileOpener implements ActionListener
         private RoomSortedList list;
         private JTextArea textArea=new JTextArea();
              private int returnvalue;
              private String filename;
              private JTextField messageField;
         public FileOpener(JTextArea ta,RoomSortedList ls)
              this.textArea=ta;
              this.list=ls;
         public void actionPerformed(ActionEvent e)
              list =new RoomSortedList();
              messageField = new JTextField();
              JFileChooser filechooser = new JFileChooser();
             // if a file is selected returnvalue = 0
             // else if cancel button is pressed
             // returnvalue = 1
             returnvalue = filechooser.showOpenDialog(null);
             //if open is selected then return filename
             if (returnvalue == filechooser.APPROVE_OPTION){
                filename = filechooser.getSelectedFile().toString();
                // now read the rooms from the file with the name filename
                // invoke the readfile method
                readFile(filename);
                messageField.setText(filename);
             }//if
             // if cancel is selected then close the filechooser
             else if (returnvalue == filechooser.CANCEL_OPTION)
                filechooser.cancelSelection();
       * Reads room data from a text file.Check if each lines are in valid room
       * format, and values. Catches exception errors for any invalid lines or
       * values thrown by ParseRoom or Room constructors.
       * Valid lines are appended to an sorted linked list. 
       * @param filename     name of file containing
       private void readFile(String filename)
           JFrame errorD=new JFrame();
          String str=null;
          Room r=null;
          int linenum=0;
          TextFileInput Obj=null;
          try
             Obj = new TextFileInput(filename);
          catch (RuntimeException rte)
             System.out.println(rte.getMessage());
          while (true)
             str = Obj.readLine();
             linenum++;
             if (str==null) break; // to stop reading lines at the end of file
             try
                r = RoomTextFormat.parseRoom(str);
             catch (RoomTextFormatException rtf)
                JOptionPane.showMessageDialog(errorD, "Error reading line # " +
                   linenum + ": " + str + "\n" + rtf.getMessage() + "\n"+
                   "This line of text has been excluded from the list.",
                   "Text Format Error", JOptionPane.ERROR_MESSAGE);
                continue;
             catch (IllegalRoomException ire)
                JOptionPane.showMessageDialog(errorD, "Error reading line # " +
                   linenum + ": " + str + "\n" + ire.getMessage() + "\n" +
                   "This line of text has been excluded from the list.",
                   "Room Instantiation Error", JOptionPane.ERROR_MESSAGE);
                continue;
             list.insert (r);
             textArea.setText("");
                RoomListIterator MyIterator = list.beginIterating();
                int c=1;
                while (MyIterator.hasNext())
                   Room m = MyIterator.next();
                   textArea.append(c + ": " + m + "\n");
                   c++;
                }//while
          }// while (true)
       } // readFile()
    }

    i apologize again.thx anyway . heres the code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class RoomGUI extends JFrame
         private RoomSortedList list;
         // Menu items:
         private JMenuItem mOpen;\
         // Displayed regions of the window:
         private JTextField messageField;
         private JTextArea textArea;
          * Constructor for RoomGUI object to set up
          * GUI window with menu.
         public RoomGUI()
              list=new RoomSortedList();     
              // Components to display on window:
              messageField = new JTextField();
              messageField.setEditable(false);
              textArea = new JTextArea();
              textArea.setEditable(false); 
              // Arrnge components on window:
              Container contentPane = getContentPane();
              contentPane.add(messageField, BorderLayout.SOUTH);
              JPanel centerPanel = new JPanel();
              contentPane.add(centerPanel, BorderLayout.CENTER);
              centerPanel.setLayout(new GridLayout(1,1));
              centerPanel.add(new JScrollPane(textArea));
                  //Create menu items for the "File" menu:
              mOpen = new JMenuItem ("Open");
              //  Create "File" menu:
              JMenu fileMenu = new JMenu ("File", /*tearoff =*/ false);
              fileMenu.add(mOpen);
              // Create menu bar:
              JMenuBar mainMenuBar = new JMenuBar();
              mainMenuBar.add(fileMenu);
              // Put menu bar on this window:
              setJMenuBar(mainMenuBar);
              mOpen.addActionListener( new FileOpener(textArea,list) );
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              setVisible(true);
         } // constructor
    } // class RoomGUIopen file
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FileOpener implements ActionListener
         private RoomSortedList list;
         private JTextArea textArea=new JTextArea();
              private int returnvalue;
              private String filename;
              private JTextField messageField;
         public FileOpener(JTextArea ta,RoomSortedList ls)
              this.textArea=ta;
              this.list=ls;
         public void actionPerformed(ActionEvent e)
              list =new RoomSortedList();
              messageField = new JTextField();
              JFileChooser filechooser = new JFileChooser();
             // if a file is selected returnvalue = 0
             // else if cancel button is pressed
             // returnvalue = 1
             returnvalue = filechooser.showOpenDialog(null);
             //if open is selected then return filename
             if (returnvalue == filechooser.APPROVE_OPTION){
                filename = filechooser.getSelectedFile().toString();
                readFile(filename);
                messageField.setText(filename);
             }//if
             // if cancel is selected then close the filechooser
             else if (returnvalue == filechooser.CANCEL_OPTION)
                filechooser.cancelSelection();
       private void readFile(String filename)
          String str=null;
          TextFileInput Obj=null;
             Obj = new TextFileInput(filename);
          while (true)
             str = Obj.readLine(); // 
             if (str==null) break; // to stop reading lines at the end of file
             list.insert (str);
             textArea.setText("");
                RoomListIterator MyIterator = list.beginIterating();
                int c=1;
                while (MyIterator.hasNext())
                   Room m = MyIterator.next();
                   textArea.append(c + ": " + m + "\n");
                   c++;
                }//while
          }// while (true)
       } // readFile()
    }

  • My iphoto9 has not been able to open for over 10 days!!  I can't load my Christmas pics, etc.  I know the pics are still there because I can access them through a round about way.  Can anyone help me to OPEN iPHOTO!?

    My iphoto9 has not been able to open for over 10 days!!  I can't load my Christmas pics, etc.  I know the pics are still there because I can access them through a round about way.  Can anyone help me to OPEN iPHOTO!?

    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store or have a Recent Mac you can find it in your Purchases List.

  • Getting 'Invalid argument' error while uisng OPEN DATASET. Help!

    Hi Experts,
       I am trying to read a file from a shared server location using OPEN DATASET as shown below.
    OPEN DATASET file_name FOR INPUT IN TEXT MODE ENCODING UTF-8 MESSAGE msg.
    The file_name i gave is '
    CNSGN-PRE-DM.COM\FUNCTIONAL\INVENTORY.CSV'.
    The program compiles perfectly. But when I run the program I am getting 'Invalid argument' error. I have checked the authorization to the server, file name, file availability and everything is fine.
    Strangely this code was working fine a week ago.
    What could be the problem? Kindly help me!
    Thanks
    Gopal

    Hi Chndrasekhar,
            You mean to say the we cannot use OPEN DATASET for reading file in shared server location. For example a shared folder in my PC.
    Is there something wrong in the file name path I have given? It started with '//'. Do I have to start the file path wih 'file://..'?
    Thanks
    Gopal

  • Plz help me about my Iphone  5s battary life is so bad without using in the night keep on after 6 hours  morning when i open battary  % lose 60 percentage  with out using

    Plz help me about my Iphone  5s battary life is so bad without using in the night keep on after 6 hours  morning when i open battary  % lose 60 percentage  with out using plz help me..

    Maximize iPhone Battery (iOS7):
    1) Turn off Airdrop: Control Center >AirDrop > Off
    2) Limit background app refresh. Turn it off for applications such as Google/Facebook.Settings > General > Background App Refresh
    3) Turn off automatic updates: Settings > iTunes & App Store >  Updates and Apps (off)
    4) Unneccessary Location Services: Settings > Privacy > Location Services > System Services > Off (uncheck as needed)
    5) Turn off Paralax: Settings > General > Accessibility > Reduce Motion
    6) Siri, and her 'raise to speak.' Turn it off: Settings > General > Siri > Raise to Speak
    7) Exclude items from Spotlight search as needed: Settings > General > Spotlight Search
    8) Remove unneccessary notifications: Settings > Notification Center > None (per app basis)
    9) Make sure auto-brightness is on, or reduce the brightness to 25% or less if desired.Settings > Wallpapers & Brightness
    10) Use Still backgrounds only: Settings > Wallpapers & Brightness> Choose Wallpaper
    11) Fetch email instead of "Push":  Settings > Mail, Contacts, Calendar > Fetch New Data >Push(off) & Fetch every 15 minutes
    12) Disable LTE if needed: Settings > Cellular > Enable 4G/LTE (OFF)
    13) Reduce Autolock: Settings > General > Auto-Lock > 1 Minute
    14) Disable Vibrations with Ring: Settings > Sounds > Vibrate on Ring (off)
    15) Close Applications regularly: Double Tap Home Button > Swipe up on App to close

  • Help!about the open dateset

    hi,
    I want to upload data to sap server in txt format, now i want use the program as follows:
          open dataset file for output IN text MODE encoding default.
              loop at itab.
                   TRANSFER itab TO file.
               endloop.
             close dataset file.
    in this way ,the text is no separated by separator. How separated by separator(, or tab),can somebody tell me ,ths.
                                                           sophia

    Hi Sophia,
                   This is kiran kumar.G(working in SAP).i have develop a small code for u for ur problem.U have to copy the below code and execute it.And trace my code ok.Then ur problem will be solved.
    If u r satisfy with my answer give me REWARD POINTS.
                HAVE A NICE DAY..
    CODE:
    Internal Table
    DATA: BEGIN OF itab OCCURS 0,
           text(50),
          END OF itab.
    Append data to Internal Table
    itab-text = 'DEMO BDC FIRST LINE'.
    APPEND itab.
    itab-text = 'DEMO BDC SECOND LINE'.
    APPEND itab.
    OPEN THE DATASET
    OPEN DATASET 'ZBDCDEMO' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    Transfer the data to APPSERVER
    LOOP AT itab.
      TRANSFER itab TO 'ZBDCDEMO'.
    ENDLOOP.
    Close the Dataset
    CLOSE DATASET 'ZBDCDEMO'.

  • Not able to open Dataset when adding Encoding Default

    Hi Experts,
    I have an urgent requirement . I wanted to make one programs Unicode Complaint
    I had to change the statement
      open dataset gv_string in text mode  for output.
    to
      open dataset gv_string in text mode encoding default for output.
    But after this change the sy-subrc is becoming 8 and not able to open the .Can any one please help
    Thanks
    Arshad

    HI,
    Maybe there is no authorization for you to write the file onto the app.server.
    Check with basis about your authorizations.
    Or could be the directory does not exist.
    Regards,
    Subramanian
    Edited by: Subramanian PL on Jun 27, 2008 1:24 AM

  • Open Dataset x AS

    Hi everyone,
    I question about the application server and return sy-subrc from OPEN DATASET.
    If i use the SAP Server as Unix, my subrc is 0 and my file is save with successful.
    But when we try to save in non-SAP Application Server or anyone shared computer the sy-subrc is 0,
    but the file is not generate.
    Help description:
    sy-subrc Description
    0 File was opened.
    8 Operating system could not open file.
    We've supposed that our problem is not a authority problem.
    regards and thank you in advance,
    Alexandre

    hi check this..
      OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        MESSAGE e043 WITH 'Error During Opening The File'(014).
      ELSE .
        LOOP AT it_zfvendxref INTO wa_zfvendxref .
          wa_final-zboise_lifnr     = wa_zfvendxref-zboise_lifnr .
          wa_final-zaltkn           = wa_zfvendxref-zaltkn.
         TRANSFER wa_final TO p_file .
        ENDLOOP.
        IF sy-subrc = 0.
          MESSAGE s043 WITH 'Data downloaded succesfully'(014).
        ENDIF.
      ENDIF .
      CLOSE DATASET p_file.
    regards,
    venkat

  • Maximum length of field in OPEN DATASET

    Hello,
    I try to import a file from server (for test purposes downloaded on the server directory with transaction CG3Z in ASC) with an unknown length of lines.
    Here is my coding for the import into ABAP:
    OPEN DATASET p_pa_snam FOR INPUT IN TEXT MODE .
      IF sy-subrc NE 0.
      ELSE.
        DO.
          READ DATASET p_pa_snam INTO g_file.
          IF sy-subrc NE 0.
            EXIT.
          ENDIF.
          IF NOT g_file IS INITIAL.
            SPLIT g_file AT p_pa_sep INTO
              wa_textfile_a-textid
              wa_textfile_a-langu
              wa_textfile_a-textname
              wa_textfile_a-textobj
              wa_textfile_a-text.
            APPEND wa_textfile_a TO zs_textfile_a.
            CLEAR wa_textfile_a.
          ENDIF.
        ENDDO.
    So you see that I move the lines from the file to  g_file which is of type STRING.
    In the import wa_textfile_a the field text is of type STRING too to receive the rest after splitting at the separator into the other fields.
    I would expect that this element  g_file is a long one which could store my lines from the loaded file,
    which could have possibly a length of 5000 digits and more.
    Currently I stuck in this step with a length of 217 (!!!) digits in g_file, when importing longer lines (in test I had a line of more than 600 digits.
    Is there any idea, what is wrong here or can anyone from you tell me about limitations?
    Your help is really appreciated!
    Best regards
    Dirk

    Hello Micky,
    you are right!
    I checked it by using CG3Y!
    Ok, so we will move the file to the server via another solution!
    Oh, in my thread above there is a mistyping, 257 instead of 217!
    The last digit maybe is from wrong counting! But I won´t count that again!
    Best regards
    Dirk
    Edited by: Dirk Meinhard on Mar 24, 2009 3:23 PM

  • Bad data added in Open Dataset for output in Binary mode

    Hello,
    I am getting random bad data being added to the end of the file that is created on the file server when I run the Open Dataset for output in Binary mode.  This data sometimes looks like information about the Unix file server.  If I do the Open Dataset in Text mode, it does not add the extra bad data.
    ** transfer file to Unix File server
           DATA: LIN TYPE P.
                                                                                    OPEN DATASET P_APPFIL FOR OUTPUT IN BINARY MODE.
                                                                                    DESCRIBE TABLE XML_TAB LINES LIN.
                                                                                    IF LIN EQ 0.
             EXIT.
           ELSE.
             LOOP AT XML_TAB.
               TRANSFER XML_TAB TO P_APPFIL.
             ENDLOOP.
           ENDIF.
                                                                                    CLOSE DATASET P_APPFIL.
    Running the program 2 times with the same variant will give different results.
    For example, the data in file should end with </cPedigreeXML> but it added data as shown below:
    </cPedigreeXML>8        ˜        I   X-UNKNOWN                                                 9            œ        I   X-UNKNOWN                                                10   
                C   X-UNKNOWN   
    Then, when the program was run again with the same selections, it did not add the erroneous data at the end.
    This is a real problem because the bad data that gets added causes the file to error in the application.  Any help would be greatly appreciated.
    Thanks,
    Bob

    Hi Bob,
          Use CLEAR statement after TRANSFER statement and check once.
         IF LIN EQ 0.
             EXIT.
           ELSE.
             LOOP AT XML_TAB.
               TRANSFER XML_TAB TO P_APPFIL.
               <b>CLEAR XML_TAB.</b>
             ENDLOOP.
           ENDIF.
    Thanks,
    Vinay

  • OPEN DATASET...  in a Unicode system

    I'm discussing with a developer @ SAP about the correct use of OPEN DATASET in a Unicode system. I'm not sure I'm correct with my opinion so maybe someone could shed a light on it.
    The source of discussion is the (SAP standard) program RSQUEU01. This program is used to download data from the TemSE; in our case we use it to produce a file that is to be sent to auditors (component FI-AIS).
    Our system is a little endian Unicode system (codpage 4103). If we download the created data using that program we get a dump with "CONVT_CODEPAGE" because a character could not be converted from 4103 to 1100.
    The proposed correction by the developer is changing
    OPEN DATASET EXP_FILENAME FOR OUTPUT IN legacy BINARY MODE.
    to
    OPEN DATASET exp_filename                              
    FOR OUTPUT IN LEGACY BINARY MODE                     
    IGNORING CONVERSION ERRORS.
    I think, that correction is wrong. Since we have 12 languages in the system including some Asian the output might get corrupted.
    When I asked him about that I was told use an application server with a "correct codepage" then - I'm not sure what that means since I can't connect an ASCII application server to a Unicode system.
    I guess the statement should be
    OPEN DATASET EXP_FILENAME FOR OUTPUT IN BINARY MODE ENCODING DEFAULT.
    This makes sure that no data is cut (like doublebyte) and makes sure, the appropriate codepage (LE/BE) is used.
    Are my assumptions right?
    Markus
    (OSS 323320/2010)

    Hi Markus,
    Let's first clarify the difference ways for writing files:
    <ul style="list-style:circle!important;">
    <li>BINARY MODE: Means that we essentially dump a sequence of bytes, which isn't necessarily related to any code page (and characters). I.e. if I'd want to save for example an executable program, the individual bytes have no meaning when interpreted as characters (unless we look at strings stored in the program). Note that legacy binary mode actually allows you to specify a code page though, but in general the recommendation is not to use the legacy option.</li>
    <li>TEXT MODE: Here we have text information that has to be interpreted using a specific code page; thus usually the additional parameter ENCODING should be given, which specifies which code page is used.</li>
    </ul>
    Now, let's clear up a small typo in Ajay's response:
    Yes you are right if you want to have all double byte characters too then you need to use ENCODING DEFAULT which would use 4103 in Unicode system.
    That is incorrect. In a Unicode system [encoding default|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_ENCODING.htm] corresponds to UTF-8, not UTF-16.
    Back to your problem. Your suggestion doesn't work, because you cannot specify encoding default for a binary output (the legacy binary mode allows you to specify a code page, but that's misleading and I wouldn't use any legacy mode). So when you try to use the syntax you proposed, you'd get a syntax error.
    Generally the recommendation is for Unicode enabled applications to use UTF-8 files with byte order mark, i.e. something like
    open dataset EXP_FILE in text mode encoding utf-8 with byte-order mark.
    However, the real question is what your external audit application expects and it sounds as if it's not Unicode enabled...
    Enough blabber, here's what I'd do: Since you're having issues with a audit-related standard SAP program I'd post the question in forum - other people must have run into that problem. Also, I checked OSS, but couldn't make much sense out of the few notes I've found (and nothing seemed relevant). Check what the expected input format is in the external audit system; possibly post a message to OSS.
    Cheers, harald

  • Open dataset and close dataset

    Hi
    I need to write log file in fileshare.
    I am using the following FM to create the file.
    Z_FILE_OPEN_OUT_UNICODE'
    I have following qns
    1. do i need to use open dataset and close dataset stmts, even I create the files with the FM?

    Hi,
    you can fill in the name of the FM in transaction SE37, then click 'Display' and look at the source code and the 'Tables' tab.
    It's a custom build FM, so you might have to look at the import parameters it needs... ( Tab 'Import' and 'Tables' ).
    To answer your question, as the name of the FM suggests it will write the file for you, so no open/close dataset. Please doublecheck tab 'Source code' and you might find these statements there...
    hope that helps,
    Rolf

  • OPEN Dataset - Peculiar problem

    Hello experts!
    I am facing a peculiar problem with ABAP keyword OPEN DATASET.
    I have a directory to which I am adding new files using OPEN DATASET FOR OUTPUT.. this works perfectly fine in the Consolidation system. But the same thing does'nt work in the Production system! It return SY-SUBRC = 8
    After reading several other posts on SDN and other forums, the following causes were touted.
    1) Path incorrect 
    2) No Authorization
    But upon checking, neither of the wo are possible because the path is maintained properly and the authorizations at OS level are given (R/W) to this folder. Moreover, the user has S_DATASET auth object!!
    Then I read somewhere else that having multiple Application Servers could be a possible cause and that running the code as a background job would be afix.. Is it so?
    Even if it is, the application is in ABAP Web Dynpro and is launched from the portal.. hence launching it as a background job is not an option... Any solutions?????
    Any help on this would be appreciated...
    Thanks in advance, Amith

    Hi,
    Yes this is true that if we are having the multiple application server then this kind of error occures if your specified directory is not mapped on the alll the avaiable sAP application servers.
    I guess when ever you are running your application then system will pick the appkication server based on the present load. Hence if your directory is not mapped in that application server then you wil get this kind of issues,
    so i guess check with you basis team that spctified path is avaiable in all the application server.

  • OPEN DATASET FOR OUTPUT IN LEGACY TEXT MODE not working!

    Hi All,
    I need your expertise to help me with my problem.
    The program passed through the code OPEN DATASET ... FOR OUTPUT IN LEGACY TEXT MODE. Then it gave an error message "Error Accessing File /home/sap/sample.txt".
    I would like to know what are the causes of this error. Please explain to me further why the program gives an error message specified above because I'm not familiar in OPEN DATASET.
    Please reply asap since the issue need to be resolved immediately.
    Thanks in advance,
    Carina

    Hi Carmey,
    The Problem will u need toi get Open Dataset Authorisation from ur Basis Team from the Specified Path.
    Regards,
    Morris Bond.
    Reward Points if Helpful.

  • Open dataset input error

    Hi guys
    i am trying to open more than 100 files  using open dataset input but i am getting below error
      program is abending reading after 50files..
    Program failing in  open data set error  can u help me please?
    143
    144 * Each file is getting into an internal table
    >>>   OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    146   IF sy-subrc <> 0.
    147     CONTINUE.
    148   ELSE.
    149     DO.
    150       READ DATASET w_file INTO s700_delta.
    What command I should give here
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_TOO_MANY_FILES', was not
         caught and
        therefore caused a runtime error.
        The reason for the exception is:
        The maximum number of open files (100) has been exceeded.
    please let me know what should makes changes to avoid this abend?

    Standard programming problem, should be rather trivial to find with a quick search. Basically there's always a limit of how many open file handles you can have at a time.
    Please try to consult the ABAP help next time before posting (or search on SCN). A quick check for [open dataset|http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET.htm] would've told you the following:
    You can open up to 100 files per internal session. The actual maximum number of simultaneously open files may be less, depending on the platform.
    Most likely you actually don't want to have all those files open at the same time and you simply forgot to use a [close dataset|http://help.sap.com/abapdocu_70/en/ABAPCLOSE_DATASET.htm] after reading each file.

Maybe you are looking for