Open dataset twice once for input and once for output in unicode system

Hi All,
In a program
I used a open dataset to read the data from the file.
OPEN DATASET cmp_file FOR INPUT IN TEXT MODE
      ENCODING NON-UNICODE.
Then i closed the file.
Again later in the program,
I used a open dataset to transfer the data.
OPEN DATASET cmp_file FOR OUTPUT IN TEXT MODE
      ENCODING NON-UNICODE.
But this time I get sy-subrc = 8.
Unable to open the file and subsequent TRANSFER is leading to the runtime error.
Note : I am using a unicode system
I could run the same program well in non-unicode system..
->
Is it that if a file contains data already
1.I need to delete the data and open it
or
2.I need to open in APPENDING mode manadatorily...
in case of UNICODE system..
Kindly suggest..

Hi,
IF you have write permission al S.O. Level you need to check your DATASET rigths using AUTHORITY_CHECK_DATASET, this validate your rigths with S_DATASET object.
Example
TYPE-POOLS SABC.
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING PROGRAM = 'ZDATASET'
ACTIVITY = SABC_ACT_READ
FILENAME = '/tmp/sapv01'
EXCEPTIONS NO_AUTHORITY = 1
ACTIVITY_UNKNOWN = 2.
See SABC type pool to know wich activities are aviable.
Hope this help.
Regards

Similar Messages

  • Audio Line-in input and BT Headset output not working

    Hi,
    I'm trying to run the Line-in into my MBPro and route the output to my Logitech H800 BT Headphones at the same time (a pass through), but can't get it to work.
    I have tried to run the line-in to the Internal Speakers and can not get this to work either.
    Steps to taken:
    1. Go to the Sound window by selecting the Sound icon from System Preferences.
    Next, I route the Line-in by:
    2. Selecting the Input button from Sound Effects, Output, Input buttons.
    3. Select "Line In" from the Select a device for sound input list.
    4. Select "Sound Input" from the Use audio port for drop down list
    5. you should see activity on the Input Level.
    6. Next, select the Ouput button from Sound Effects, Output, Input buttons.
    7. Select "H800 Logitech Headset Stereo (or Internal Speakers) from the Select a device for sound output list.
    8. Verify that "Sound Input" from the Use audio port for drop down list is still selected.
    9. Also, verify that the Mute checkbox is not selected in either the Input or Output window.
    10. NO SOUND :-(
    11. If I pull up a radio station in a webbrowser, I can listen to it without issue. So, I think audio out is set correctly.
    12. If I install Audacity: 1) It shows the audio input and output to be set as above (Built-in Input/H800 Headset). 2) If I record and then playback, it records the audio going in the Line-In and plays back accross the H800. 3) Also looked for a Monitor function in Audacity but could find one to test simulataneous I/O. 
    Any idaes welcome ?

    ahh sry, thats how the line in works on my Mac Pro, I guess the Macbook is different. This is a program I use in conjunction with another called 'soundflower' to route my audio to all the places it needs to go:
    http://www.macupdate.com/app/mac/11333/linein
    If you need to run multiple instances, you can open up terminal and type
    open -n /Applications/[PUT PROGRAM NAME HERE].app/
    It will open up another instance every time you run that script.

  • How to enforce the encoding when opening a data set for output

    Hi,
    Just would like to know if there are any means to enforce the encoding of the dataset opened for output. What I means is that if I use the following statement to craete a dataset for output
    open dataset A for output in text mode encoding UTF-8 message MMMM.
    It seems that if the content of the output dataset contains only English (or single byte) characters, the output dataset will be in ANSI encoding irregard of the option 'encoding UTF-8' specified in the open statement.
    However, if the content contains some Asian (or double bytes) characters, the output dataset will be in UTF-8 encoding.
    I would like to know if there are any means to enfore the encoding of the output dataset in both cases to be UTF-8 as I've specified in the open statement.
    Thanks in advance,
    Francis

    You can do that by using an add-on such as:
    * NewTabURL - https://addons.mozilla.org/firefox/addon/newtaburl
    * New Tab Homepage - https://addons.mozilla.org/firefox/addon/new-tab-homepage
    Another way of opening the home page in a new tab is to middle click on the home button in the navigation toolbar.

  • How do I use one audio jack as input and one as output?

    On my MacBook Pro, if I get a USB-headphone connector (to add another audio port), will I be able to set one audio port as input and the other as output? To use the port coming out of the USB jack as a headphone jack, and plug a mic/output device into the computer's port?
    I'm thinking about buying a "Sabrent USB External Stereo Sound Adapter". I have a preamp that is NOT an interface, and I want to be able to monitor what I'm doing so I can multitrack. But my MacBook only having one audio 1/8 inch jack makes it so I have to choose either input OR output...I'm hoping if I add an extra port via USB I'll be able to have one of each.
    Thank you!

    Roger Wilmut1 wrote:
    nategm wrote:
    On my MacBook Pro, if I get a USB-headphone connector (to add another audio port), will I be able to set one audio port as input and the other as output?
    Yes, either way round. In System Preferences>Sound you can set the input and output ports separately.
    Roger, the System setting have -Nothing- to do with the question being asked. Do you use Logic Pro audio software? If you did you would know Logic has it's own audio settings that run independently from the System audio. There's also the fact that Maverick has problems with "some" older USB 2.0 audio hardware. Basically, this is not a slam-dunk, that's why I suggested asking someone if they've used this combination before. Although... the USB audio device is cheap ($10) it might be worth it to try. Still.............**
    ** I question the wisdom of using cheap audio hardware on a computer that cost $1000+, software that costs $200 and then using the internal audio chip ($2) and an external monitoring device that costs $10. Defeats the whole purpose of using professional audio software.

  • Regenerate decision tree for transfering to unicode system.

    Hello,
    We upgraded the system to a unicode system and we're getting runtime errors using PB infotypes (pb20/pb30) for the
    generated forums in the decision tree.
    The error thrown is unicode compatability, If I make a "false" change in a certain decision tree for a field, the form is regenerated and It works.
    The problem is , that I have over 200 fields for decision trees, and I need them all regenerated.
    Someone gave me report "RPUMKG00" as a solution (activation type 1), but It does not regenerate the forms in a unicode mode.
    does anybody have any ideas?
    thanks.

    Hello,
    We upgraded the system to a unicode system and we're getting runtime errors using PB infotypes (pb20/pb30) for the
    generated forums in the decision tree.
    The error thrown is unicode compatability, If I make a "false" change in a certain decision tree for a field, the form is regenerated and It works.
    The problem is , that I have over 200 fields for decision trees, and I need them all regenerated.
    Someone gave me report "RPUMKG00" as a solution (activation type 1), but It does not regenerate the forms in a unicode mode.
    does anybody have any ideas?
    thanks.

  • TS3798 Using the iphone 4s i am using safari to try to open a web address for a security cam system and it says server not found.  Using wifi at home....what does this mean??

    Iphone4S - trying to connect to a webpage via safari and it says cannot find server.  Help.

    I have noticed this. One time it crashed when using a video app such as VLC, and another time when changing desktops between an app playing a video and say Skype or Google Chrome (I can't be sure which).
    Here's some more information about my Mac if it helps:
    Operating System: OS X 10.9.2 (Mavericks) 13C64
    Model: Apple Late 2013 Retina MacBook Pro 15"
    Processor: 2.3 GHz Intel Core i7
    Memory: 16GB 1600MHz DDR3
    Graphics: Intel Iris Pro 1024MB
    I've noticed that my case is similar to some people's in this thread.

  • OPEN DATASET in ECC6.0

    Hi Guys,
    We are upgrading from 4.6c to ECC 6.0 and a lot of our programs are giving unicode compliance error on the OPEN DATASET statement. Even though we are moving to a unicode system, the systems we talk to are not unicode compliant yet so we donot want to read/write files in unicode format yet. After a lot of research I am still consfused between the following 2 statements. Which one should we use?
    OPEN DATASET O_DSN FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
    OR
    OPEN DATASET O_DSN FOR OUTPUT IN LEGACY TEXT MODE.
    Does anyone know if they are any different or both serve the same purpose?
    We basically want to retain the same functionality as was in 4.6c when it comes to read/write files...
    Please suggest
    Thanks,
    Sanket

    IN LEGACY BINARY MODE [CODE PAGE cp]
    Data is read or written in a form which is compatible to BINARY MODE in Releases <= 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.
    IN LEGACY TEXT MODE [CODE PAGE cp]
    Data is read or written in a form which is compatible to BINARY MODE in Releases <= 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, check the below link.
    [http://www.s001.org/ABAP-Hlp/abapopen_dataset.htm|http://www.s001.org/ABAP-Hlp/abapopen_dataset.htm]
    Hope this helps.
    Thanks,
    Balaji

  • Open Dataset for input in BINARY MODE not working after ECC 6.0 upgrade

    Hi All,
    Our requirement is to download an XML file from the application server and there is a customized program to download these files.
    This program uses the statement,  Open dataset ...for input in BINARY MODE
    and it works perfect for 4.7. There were no issues. But, after the upgrade to ECC 6.0 this does not work.
    When the data is read in ECC 6.0 , it is shown in some special characters and it could not be opened with XML editor and the file is not completely downloaded. I read through the forum and tried the following statement as well,
    Open dataset....for input in LEGACY BINARY MODE.
    After this statement, there were no special characters, but there is a blank space introduced before every character.
    Example : TEST(actual)
                      T E S T (After the legacy binary mode)
    Could you please let me know if there is any solution to rectify this problem. Appreciate your help.
    Thanks a million.
    Edited by: Manikd on May 12, 2011 3:52 PM

    But this program was already using BINARY MODE and after upgrade this is not working. I know, it may work in TEXT MODE. However, I cannot change the whole program to TEXT mode now.

  • Ole objects,background and open dataset

    Hi,
    I want to read ms access files on background using ole objects. Is it possible to apply open dataset operation for mdb files? As known, text files can be get into application server using open dataset. But I need to get mdb file to application server.
    On the other way I can simulate my problem as, is it possible to read excel files(for example) using <b>ole object</b> in background? If I can get an aswer, maybe I can simulate it as reading mdb files.
    Thanks.

    OPEN DATASET is meant for the flat text files, you won't be able to open an mdb file with it. Once I've tried using OLE objects to obtain the file modification date and, even though it worked great in foreground, it didn't work in the background mode.
    This thread on reading MS Access files in SAP might be helpful:
    Re: download table from ms-access

  • What is difference between GUI_download and Open dataset

    Dear All,
    I know there are 2 options for downloading SAP data.
    1)  GUI_DOWNLOAD Functional Module.
    2)  OPEN DATASET DSET FOR OUTPUT IN TEXT MODE.
    What is the difference ??
    When I should use ?? What are the deciding factors ??
    Regards
    venkat

    Hi All,
    Thank You very Much for quick replies.
    1) GUI_DOWNLOAD is used to download data into your local PC. can be run only in frontend.
    2) OPEN DATASET is used for downloading into Application Server
    Thank You one and all.
    Closing Thread, Alloting Points.

  • External mic inputs and speaker outputs for CP-7937G Conf Phone

    Has any tried to connect the Polycom® SoundStation IP Multi-Interface to the Cisco Conference Station CP-7937G Phone, it appears to be the only way to get eextra mic inputs and line level outputs for enhancing conference call?  See attached Quick Start Guide.

    Here's where I am on interfacing external mikes, PCs, speakers, etc. with the Cisco 7937. It seems this I/O port is quite a mystery to both Cisco and the manufacturer (Polycom). There are virtually no technical specs for it anywhere on line. So, I bought a variety of cables and connectors and tried exploring. I could never get anything but input into the 7937 to work. I could never get any output from it despite the output symbol next to the port. Here are the input test results:
    3 pole 2.5mm to dual stereo 3.5mm breakout cable didn't work at all
    4 pole 2.5mm to stereo 3.5mm for input worked only on one pole (red connection). Half volume?
    3 pole 2.5mm to stereo 3.5mm for input works only on white connector (louder?)
    3 pole 2.5mm to mono 3.5mm for input, works (louder?)
    2 pole 2.5mm to stereo 3.5mm for input, works
    2 pole 2.5mm to mono 3.5mm for input ,works, and is simplest.
    So, if you want to feed an external audio source into the Cisco 7937, almost any type of 2.5mm male connector cable at the 7937 will work
    I could never find any mention of successful use online, and could not find an output signal myself, so I suspect the 7937 was just mislabeled.

  • Err with scheduling an abap program using open dataset

    issue: have an abap program which uses "open dataset ... for input ..." to read the file. 
    - with manual ly running it, receive the following message "dataset_not_open".  
    - with scheduling it, receive same message
    attempting to run an abap program as part of a process chain (ie scheduling a background job) in BI.
    the abap performs the following fxns:
    1) read a file on the server
    2) removes delimiter, renames it
    3) rewrites the file onto the server
    initially used ws_upload for reading and ws_download for writing the file. 
    - both fxns worked fine if it is run manually --> but failed as a  background (part of process chain)
    - note 7925 states can't use ws_upload, download for background jobs
    -so switched to "open dataset"
    Any suggestions as to why the "open dataset" does not work is greatly appreciated it.
    B.A.

    Thank you for all responses. here is more info about the err message:
    sy-subrc = 8
    'invalid argument'
    I looked up the invalid argument in note 99155 --> due to "The destination file is no longer available during repeated file access. "   So, the following steps were taken:
    - file was regenerated and
    - file was placed on the server to be read
    have the following code:
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE encoding default
                          MESSAGE D_MSG_TEXT.
    also have tried the following:
       OPEN DATASET d1 for input in text mode encoding default.
       open dataset d1 for output in text mode encoding NON-UNICODE..
       open dataset d1 for output in text mode  encoding utf-8.
    none had worked.  system --> status shows no unicode.
    THanks again for any suggestions.

  • BSP - open dataset

    Hello folks,
    I would like to know how to open a file in BSP using "open dataset... for input..." command ? Examples will be very useful. I want to read the file and then use it and write in a report.
    Please advise.
    Ol Pom.

    in BSP its same like how do you write in ABAP Reports..there is no difference..
    YOu can write the code in <b>OnInitialization</b> event.
    Let me know if you need more detail..
    <i>* Reward each useful answer</i>
    Raja T

  • OPEN dataset statement

    Hi folks,
    I have a file stored on the network shared drive. Can I read the file using open dataset statement. This file is not stored on the application server.
    I have read that the open dataset statement works for only with the files stored in the application server.
    thanks
    sankar

    Hi
    Go thru this code, it will help you,.
    See the use of open dataset statement here.
    Pls reward if help.
    Refer this:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *                     &----
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • OPEN DATASET Big/Little Endian

    Thread opened on behalf of colleague:
    SOURCE
    I want to create a file on a system that is Big Endian with codepage 4102.
    TARGET
    I want to read this file in a system that is Little Endian with codepage
    4103.
    What is the exact 'open dataset' syntax on the SOURCE and TARGET?
    The file on the little endian system is not being read correctly. It shortdumps with CONVT_CODEPAGE.
    Thanks.

    Hi Wang,
    Check thie following link:
    http://www.s001.org/ABAP-Hlp/abapopen_dataset.htm
    Hope this helps you.
    Regards,
    Chandra Sekhar

Maybe you are looking for

  • When using Zoom on the iPad, is there a way to keep the keyboard the regular size?

    I'm trying the iPad 2, and being visually impaired, I need to use Zoom with it, but having it zoom in on the keyboard makes it very frustrating because typing takes a very long time. This is really what's going to make or break me buying an iPad. The

  • CL_GUI_FRONTEND_SERVICES= FILE_OPEN_DIALOG

    Hi Experts, I have a customized program with BDC. first My program will convert a .dbf file into .xls file. My second program executes the .xls file. The .xls file that I get from my first program will be transferred into a textbox in my second progr

  • Pop ups showing up with FF6

    Since updating to 6, I have annoying popups even when followed your directions, disabled pop ups , there are no exceptions in the window. The pop ups come as new windows and show that they are coming from firefox as it shows in the upper left corner.

  • Problems with Log and Capture

    hi, i have been trying to capture my tapes in Final Cut Pro but i keep getting this message: "capture encountered a problem reading the data on your source tape" i am capturing the tape on a simple cannon camcorder but the tape was originally filmed

  • LIMS data of inspection type 89 to be uploaded in SAP QM

    How to upload the LIMS data into SAP. These data are for for different material. And each material have different batch. A lot of batch is their. Inspection type is 89. How to upload the data batch wise????