Open dataset (UNICODE) for english en polish characters

Hi,
I have a problem on my multi language project on where I need to manage English language and polish language.
I have a table (that we can call TABLE) I manage the translation on it. When I am connected in English I can see some squares instead some polishes characters. When I am connected in polish, I have the right characters. Any way I don’t think it’s a problem, cause if I copy/paste the square on Word, I find back the corrects characters.
My problem is after.
I have a structure with the collon name and an internal table with data.
I use the module function DDIF_TABL_GET on my table TABLE to have the collon name corresponding to the language wanted.
I am building a string with that and some carry return.
(Here in English I have again some square, but always the good character if I paste it on Words.)
Now I would like to put this string in a file using the good encoding.
I have tried lot of ‘opening dataset’ and lot of ‘encoding’.
I have a file on SAP (transaction FILE)
(Here in English I have again some square, but always the good character if I paste it on Words.)
If I download this file on my computer, I have wrong characters.
Could I have help?
My wrong code:
  OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
  TRANSFER u_contenu TO lv_filename.
  CLOSE DATASET lv_filename.

Hi,
   Use this
  OPEN DATASET File_path  FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
  WITH SMART LINEFEED
it will definitely work.
Regards,
Manesh. R

Similar Messages

  • OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE

    Hi There,
    I also have the similar issue. I am able to write the data into appliaction server in Chinese Characters using :OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING DEFAULT or OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING UTF-8. But when i save that file into my presentation server manually, all the chinese characters are showing as Junk.
    When i use OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE, giving runtime error and when i use OPEN DATASET datei FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE IGNORING CONVERSION ERRORS, No error but application server output itself showing as Junk characters.
    Could you please suggest me what you have done?
    Regards,
    Chaitanya A

    Hi,
       Use this
      OPEN DATASET File_path  FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
      WITH SMART LINEFEED
    it will definitely work.
    Regards,
    Manesh. R

  • OPEN DATASET FILENAME FOR OUTPUT.

    HI,
    While doing unicode enable inECC6.0 FOLLOWING ERROR IS COMING.hOW IT WILL BE RESOLVED.
    oPEN DATASET physname FOR OUTPUT.

    Hello,
    For opendataset u need to add the below coding.
    open dataset 'filename' for output in text mode encoding default. ( Based on ur filetype)
                                                            binary mode encoding default
    if it not a unicode system then non unicoding must be added.
    N.B
    In the Transfer stmt the data types apart from CNDT will result dump.
    So please ensure that all are of CNDT types.
    With Regards,
    Sumodh.P

  • Open Dataset - unicode system ECC 6.0,special characters

    Hi,
    we have upgraded our system from 46b to ecc 6.0 unicode. We face following problem in file download to application server(solaris) using open dataset.
    in output file hyphen(-) character is by special character â.
    eg. if data in table is  'BANGALORE - 560038' is displayed as 'Bangalore â 560034' in application server file. if we download the same file to windows it shows proper data.
    only when we open file in vi editor on application server , system shows this special character.
    Kindly help.
    Regards,
    Sidhesh S

    OPEN DATASET G_APFILE FOR INPUT IN TEXT MODE.in 4.6                                                                                                    
        OPEN DATASET G_APFILE IN LEGACY TEXT MODE FOR INPUT in ECC6.0
    regards
    Giridhar

  • Open dataset filename for output in text mode encoding default

    Hi,
    When I excute this command I get a sy-subrc = 0, but no file is created. This happens in an ECC 6.0 system. In 4.6C works ok.
    filename has the following structure '
    server\directory\filename'
    What am I doing wrong??
    Thank you very much for your your help.
    Regards.

    Hi,
    Can u tell what syntax u have written for open statement.
    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.
    Regards,
    Sruthi

  • Support for English and Spanish Characters

    I have created a database with character set WE8iso8859P1. Some of my tables that I imported from MS Access Database using ODBC contain English as well as Spanish characters. When I select the same from the database I just get ? for the non-English characters. What should I do to see the Spanish characters as well?

    In the timeline, next to the audio (on the left) is a small drop down box which lets you set the language for the track. You'll see 'En' in both of them at the moment, and you need to change the Spanish one to be for Spanish. You should then be able to complete the build.

  • 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

  • OPEN DATASET FOR INPUT IN TEXT MODE - linesize issue

    Hi,
    I faced a problem when opened ANSI file with CYRILLIC in ECC 6.0 Unicode system - the system cuts the line to 250 characters. Below is snip of code:
    REPORT  Z_TEST_01 LINE-SIZE 1023.
    DATA:
      file TYPE char40 VALUE 'ansi_file.txt',
      line TYPE char1024, len TYPE i.
    OPEN DATASET file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    WHILE sy-subrc = 0.
          READ DATASET file INTO line ACTUAL LENGTH len.
            WRITE: / len, line.
    ENDWHILE.
    CLOSE DATASET file.
    In this case, variable LEN always get value 250. File-content is correctly converted from ANSI and all CYRILLIC is displayed to the screen. I changed type for LINE - initialy the type was STRING, actially.
    Further, tried to open it in BINARY - like this:
    DATA:
      file TYPE char40 VALUE 'ansi_file.txt',
      line TYPE char1024, len TYPE i.
    FIELD-SYMBOLS <hex_container> TYPE x.
    OPEN DATASET file FOR INPUT IN BINARY MODE.
    ASSIGN line TO <hex_container> CASTING.
    DO.
      READ DATASET file INTO <hex_container>.
      IF sy-subrc = 0.
        WRITE: / line.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    CLOSE DATASET file.
    WRITE: / line.
    In this case I got bigger linesize (obviously 1024), but faced conversion issues - the file contains some CYRILLIC and it is messed. Played for few hours with conversions - using additions: IN LEGACY BINARY MODE... BIG/LITTLE ENDIAN, CODE PAGE... without success. So decided to ask...
    Well, I searched SDN for a similar issue, but didn't found, except this one:
    Re: OPEN DATASET STRING Problem
    Could someone points me what am I doing wrong? How can I read my ANSI file with line-size more than 250 chars? Actually, in my case line size may vary up to 1800 chars. Further, afrer conversion and some validation, I should save it back to the AS.
    Many thans in advance.
    Regards,
    Ivaylo Mutafchiev

    Sorry for the noise - it is not an issue anymore.

  • Open dataset in UTF8. Problems between Unicode and non Unicode

    Hello,
    I am currently testing the file transfer between unicode an non unicode systems.
    I transfered some japanese KNA1 data from non unicode system (Mandt,Name1, Name2,City) to a file with this option:
    set local language pi_langu.
      open dataset pe_file in text mode encoding utf-8 for output with byte-order mark.
    Now I want to read the file from a unicode system. The code looks like this:
    open dataset file in text mode encoding utf-8 for input skipping byte-order mark.
    The characters look fine but they are shifted. name1 is correct but now parts of the city characters are in name2....
    If I open the file in a non unicode system with the same coding the data is ok again!
    Is there a problem with spaces between unicode an non-unicode?!

    Hello again,
    after implementing and testing this method, we saw that the conversion is always taken place in the unicode system.
    For examble: we have a char(35) field in mdmp with several japanese signs..as soon as we transfer the data into the file and have a look at it the binary data the field is only 28 chars long. several spaces are missing...now if we open the file in our unicode system using the mentioned class the size is gaining to 35 characters
    on the other hand if we export data from unicode system using this method the size is shrinking from 35 chars to 28 so the mdmp system can interprete the data.
    as soon as all systems are on unicode this method is obselete/wrong because we don't want to cut off/add the spaces..it's not needed anymore..
    the better way would be to create a "real" UTF-8 file in our MDMP system. The question is, is there a method to add somehow the missing spaces in the mdmp system?
    so it works something like thtat:
          OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING UTF-8 WITH BYTE-ORDER MARK.
    "MDMP (with ECC 6.0 by the way)
    if charsize = 1.
    *add missing spaces to the structure
    *transfer strucutre to file
    *UNICODE
    else.
    *just transfer struc to file -> no conversion needed anymore
    endif.
    I thought mybe somehow this could work with the class CL_ABAP_CONV_OUT_CE. But until now I had no luck...
    Normally I would think that if I'am creating a UTF-8 file this work is done automatically on the transfer command

  • Open Dataset non-unicode & default

    Currently im using the open dataset with default then it hit a codepage error. I found out that the file contained characters that is not UTF-8 so when i changed the open dataset to non-unicode the codepage error goes away. Im wondering if there is any effect of changing from default to non-unicode.

    OPEN DATASET P_AFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT ignoring conversion errors.
    ADD ignoring conversion errors to ur prg
    and should be unicode.
    hope it will help you.
    Regards,
    sinagam.
    Edited by: Venkata Pavan Sinagam on Sep 23, 2011 5:50 PM

  • Japanies characters are converting to # in output file in open dataset

    Hi Experts,
    I am trying to transfer data from my internal table to application server. When i use
    Open Dataset e_file for output in text mode encoding NON-UNICODE ignoring convertion errors.
    All Japanies and chines characters(double byte characters) are converting to "#" in output file. I have used set locale language commend also.Still same problem is there.
    Could you please any one help me on this.
    Thanks
    Srinivas

    hi
    problem exporting text in hebrew
    Similar kind of problem has been solved here.. check that link first
    Use the class CL_ABAP_CONV_OUT_CE and use it to convert file from unicode to ascii.
    After that you should call OPEN DATASET IN LEGACY MODE and write the file.
    you have to find the Code Page format for japanese here..
    Is your system Unicode enables, if not please check whether you have japanese installed on your system.
    Run the program RSCINST in SE38 which throws a pop up if u work on a Unicode system and also shows what are the language packs currently installed on ur system.... if u dont have Japanese installed then u need to contact Basis People for installion of that language pack

  • 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

  • Problem writing file ANSI to UTF-8. OPEN DATASET FOR OUTPUT IN TEXT MODE

    Hello everybody,
    My report needs  to create a file in ANSI so I am using this sentence: * "OPEN DATASET p_dir_a FOR OUTPUT IN TEXT MODE ENCODING DEFAULT."*  almost all charters in the file are well generating excepting for this two: ( Á ) & ( Í ) because SAP assigns the same code to both characters ( Ã? ) = 'xC3'  which is not correct, the right code should be ( Á ) = 'xC1'  ( Í ) = 'xCD' respectively
    from this string = ( ÁÉÍÓÚáéíóúàèìòùÀÈÌÒÙ ) only those two characters are wrong converted.
    Also I tray to catch a conversion error with this sentence:
              TRY.
                TRANSFER <field> TO p_dir_a NO END OF LINE.
              CATCH cx_sy_conversion_codepage.
                MESSAGE 'error' type 'I'.
            ENDTRY.
    but never enters in it.
    Does anyone know where I can configure SAP to SET this value correctly?
    Thanks for your help.

    was a server problem, not SAP

  • BDC for transaction AC02, error opening dataset returning 0.

    Here is the code.
    Help me ASAP..             
    <unreadable code removed by moderator>
    Moderator message: please do some own research before posting, only posts text with less than 5000 characters, check formatting before posting, do not use terms like "ASAP".
    Edited by: Thomas Zloch on Jan 13, 2012

      open dataset                                                       *
    FORM OPEN_DATASET USING P_DATASET.
      OPEN DATASET P_DATASET
                   FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF SY-SUBRC <> 0.
        WRITE: / TEXT-E00, SY-SUBRC.
        STOP.
      ENDIF.
    ENDFORM.
      create batchinput session                                          *
      (not for call transaction using...)                                *
    FORM OPEN_GROUP.
      IF SESSION = 'X'.
        SKIP.
        WRITE: /(20) 'Create group'(I01), GROUP.
        SKIP.
      open batchinput group
        CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = GROUP
                        USER     = USER
                        KEEP     = KEEP
                        HOLDDATE = HOLDDATE.
        WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
                (12) 'returncode:'(I05),
                     SY-SUBRC.
      ENDIF.
    ENDFORM.
    I'm using these performs because they appeared automatically when the recording became a program.

  • 'Open Dataset' command - add ASCII code in a unicode system

    Hi,
    I use following comand in order to save a file on an application server. 
    open dataset <path> for output in text mode encoding default.
    Is it possible to convert file to ASCII code instead of the system setting unicode and to ignore conversion errors? If yes, please tell me how.
    Thanks!

    problem exporting text in hebrew
    Similar kind of problem has been solved here.. check that link first
    Use the class CL_ABAP_CONV_OUT_CE and use it to convert file from unicode to ascii.

Maybe you are looking for