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

Similar Messages

  • File transfer Open dataset CSV file Problem

    Hi Experts,
    I have an issue in transferring Korean characters to a .CSV file using open dataset.
    data : c_file(200) TYPE c value '
    INTERFACES\In\test8.CSV'.
    I have tried
    open dataset  c_file for output LEGACY TEXT MODE CODE PAGE '4103'.
    open dataset  c_file for output    in TEXT MODE ENCODING NON-UNICODE.
    open dataset  c_file for output    in TEXT MODE ENCODING Default.
    Nothing is working.
    But to download to the presentation server the below code is working. How can the same be achieved for uploading the file to application server.
    CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                = 'D:/test123.xls'
            filetype                = 'ASC'
            write_field_separator   = 'X'
            dat_mode                = 'X'
            codepage                = '4103'
            write_bom               = 'X'
          CHANGING
            data_tab                = t_tab
          EXCEPTIONS
            file_write_error        = 1
            no_batch                = 2
            gui_refuse_filetransfer = 3
            invalid_type            = 4
            no_authority            = 5
            unknown_error           = 6
            header_not_allowed      = 7
            separator_not_allowed   = 8
            filesize_not_allowed    = 9
            header_too_long         = 10
            dp_error_create         = 11
            dp_error_send           = 12
            dp_error_write          = 13
            unknown_dp_error        = 14
            access_denied           = 15
            dp_out_of_memory        = 16
            disk_full               = 17
            dp_timeout              = 18
            file_not_found          = 19
            dataprovider_exception  = 20
            control_flush_error     = 21
            not_supported_by_gui    = 22
            error_no_gui            = 23
            OTHERS                  = 24.

    Hi,
    I would recommend to use OPEN DATASET ... ENCODING UTF-8 ...
    If your excel version is unable to open this format, you can convert from 4110 to 4103 with report RSCP_CONVERT_FILE.
    Please also have a look at
    File upload: Special character
    Best regards,
    Nils Buerckel

  • How to open a pdf file using OPEN DATASET

    Im trying to convert a pdf into binary format. So im trying to read the contents of the pdf into a XSTRING. Using the FM 'SCMS_XSTRING_TO_BINARY' i can convert the XSTRING to binary format.
    How to open a pdf file using OPEN DATASET and transfer its contents in a XSTRING variable.
    What i've tried is....
    DATA: f_name type string value 'C:\rep_output_pdf.pdf',
          x1 type xstring,
          LT_DATA TYPE STANDARD TABLE OF X255.
    OPEN DATASET f_name FOR input IN BINARY MODE.
    READ DATASET f_name INTO x1.
    CLOSE DATASET f_name.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          BUFFER     = x1
        TABLES
          BINARY_TAB = LT_DATA.
    Im getting a short dump .
    Short text: The file is not open.
    Plz help me out.

    Hello Rajesh,
    You are trying to do use OPEN DATASET with a local file. NOT POSSIBLE
    You have to have the file in the app server to use OPEN DATASET.
    BR,
    Suhas

  • Problem in accessing application server file using open dataset

    Hi All,
    I am trying to access application server file using open dataset command, its working fine for normal path which imention. But when i am giving path of XI server file, its not working. How to access XI server file using open dataset. Please let me know.
    Thanks in advance.
    Regards,
    Vishal

    Hi Vishal,
    You need to verify if the location where you are trying to save the file is in the same server of SAP. In case that the location is in other server you need to map that directy into the same server of SAP.
    You need to point always to a location in the same server of SAP, in order that the open dataset could work.
    Regards,
    Eric

  • Download file using open dataset

    Hi all,
    I download a .CSV file to sap server using open dataset. I have a column which stores a number with length upto 30 char. I get the output in this format '2.34234E+25' for '23423423423423400000000000' in that particular column.
    Please send your suggestions to solve this issue.
    Rajesh.

    Do you want to use the csv file in Excel or in another application.
    If you display the CSV file created by open dataset using Notepad, you will probably see the 30 digit number.  This is fine for many applications, but not Excel!
    Excel cannot store a 30 digit number internally.  Try entering a 30 digit number into an Excel cell and see what happens - it is converted to scientific format with only 14 decimal places.
    If you need to see the number in Excel, you need to have it displayed as Text and not a number.  There are a few options:
    1. Put a character at the start of the field
    2. Don't use CSV, but use OLE to start Excel and put the data in the cell with text format (complicated I know).
    3. Save as a file with a .txt extension, open in Excel, and in the Text import wizard (step 3)  specify that the column data format is Text
    Michael

  • Problem with file in open dataset

    Hi experts ,
    i m  getting output in a standard way . all the fields are displaying in one column .
    this is my code .
      DATA: L_DATA LIKE RLGRAP-FILENAME VALUE '/usr/sap/dev/sys/global/substanc' .
      OPEN DATASET L_DATA FOR OUTPUT IN TEXT MODE ENCODING DEFAULT  .
      IF SY-SUBRC <> 0.
        MESSAGE E208(00) WITH 'Error Opening File'.
      ENDIF.
      LOOP AT I_DOWNLOAD INTO I_WA.
        TRANSFER I_WA-WERKS TO L_DATA.
        TRANSFER I_WA-MATNR TO L_DATA .
        TRANSFER I_WA-MAKTX TO L_DATA.
        TRANSFER I_WA-MEINS TO L_DATA.
        TRANSFER I_WA-PQTY TO L_DATA.
        TRANSFER I_WA-FKLMG1 TO L_DATA.
        TRANSFER I_WA-DQTY TO L_DATA.
        TRANSFER I_WA-DOFORCAST TO L_DATA.
        TRANSFER I_WA-DUFORCAST TO L_DATA.
        TRANSFER I_WA-WAQTY TO L_DATA.
        TRANSFER I_WA-OFORCAST TO L_DATA.
        TRANSFER I_WA-UFORCAST TO L_DATA.
      ENDLOOP.
      CLOSE DATASET L_DATA.
      IF SY-SUBRC <> 0.
        MESSAGE E208(00) WITH 'Error Closing File'.
      ENDIF.
    Thanks,
    Ashish Gupta
    Moderator Message: Basic and Duplicate Post.
    Edited by: kishan P on Dec 10, 2010 3:05 PM

    Hi Sravan,
    Thanks for replay .
    I did the same but  i was getting error message .
    "I_WA" cannot be a table, a reference, a string, or contain any of
    these objects. any of these objects
    This is my internal table and work area definition.
    DATA : I_DOWNLOAD TYPE TABLE OF TY_DOWNLOAD WITH HEADER LINE,
           I_WA TYPE TY_DOWNLOAD.
    Thanks ,
    Ashish Gupta

  • Unicode file formats ( open dataset)

    Hi,
    We are sending Unicode file with encoding as UTF-8( open dataset) containing Greek character to Legacy system. Legacy system( Sql server) is not able to understand this file format. As a workaround legacy side team coverts the file to Unicode UCS-2 using notepad ( by selecting encoding option as Unicode) and then uploading it to SQL server..
    Is there anyway to convert the UTF-8 file to other Unicode file format ( say UCS-2 )within SAP or generate the desired file format.

    Hi Martin,
    Thanks for the help!!!
    I tried  to convert the file format from UTF-8 to UCS-2  using the methods of the class mentioned but it didn't fulfill my requirement.  I have Greek character in UTF-8 format and when I convert it to any other other format then Greek character are displayed as #.
    Problem is legacy SQL server don't support UTF-8 format.  I tried open data set with binary mode & also legacy text mode with all available code pages but result were not fruitful.
    ( Program RSCP_CONVERT_FILE to convert code page - I used target code page as all possible UTF* , UCD* & Greek code page but no luck ).
    I am just wondering whether SAP can convert UTF-8 to UCS-2 or not. Other option I am thinking is to have the file converted by Unix script  that is application server external command which can be executed via FTP.

  • Create an Excel File Using OPEN DATASET Command

    Hey, everyone.
    How can I create an Excel file by using OPEN DATASET command ??
    The file is created but the columns are no seperated like thay should.
    I need to seperate the internal table's fields with a comma - How can I do it ?
    Here's my code:
    OPEN DATASET filename1 FOR OUTPUT IN TEXT MODE.
    IF SY-SUBRC = 0.
       LOOP AT gt_vend_info into gwa_vend_info.
         TRANSFER gwa_vend_info TO filename1.
         IF SY-SUBRC <> 0.
           EXIT.
         ENDIF.
       ENDLOOP.
    ENDIF.
    Thanks in advance.

    Hi Beki,
    REPORT  ZTESTAA.
    TYPE-POOLS:TRUXS.
    DATA: BEGIN OF ITAB OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          END OF ITAB.
    DATA:
    ITAB1 TYPE TRUXS_T_TEXT_DATA.
    SELECT  VBELN
            POSNR
         UP TO 10 ROWS
         FROM VBAP
         INTO TABLE ITAB.
    CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
      EXPORTING
        I_FIELD_SEPERATOR    = ';'
      TABLES
        I_TAB_SAP_DATA       = ITAB
      CHANGING
        I_TAB_CONVERTED_DATA = ITAB1
      EXCEPTIONS
        CONVERSION_FAILED    = 1
        OTHERS               = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO         WITH SY-MSGV1
    SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    OPEN DATASET filename1 FOR OUTPUT IN TEXT MODE.
    IF SY-SUBRC = 0.
    LOOP AT gt_vend_info into gwa_vend_info.
    TRANSFER gwa_vend_info TO filename1.
    IF SY-SUBRC <> 0.
    EXIT.
    ENDIF.
    ENDLOOP.
    ENDIF.
    the above code give CSV format file, all fields will be separated by ';'
    Regards
    vijay

  • Create Tab-delimited text file with OPEN DATASET

    Hi everyone,
    My problem goes like this: the text file that I am writing using OPEN DATASET needs to be tab-delimited.  Originally the file was to be delimited using the pipe ( '|' ) character.
    I read in one of the threads that to put in tab delimiters you need to use something like this:
    DATA v_tab TYPE x value '09'.
    CONCATENATE  wa-field1 wa-field2
      INTO wa_output SEPARATED BY v_tab.
    I also encountered the same problem, the error that I can't concatenate the v_tab with the other fields.
    What, therefore, is the correct way to declare the fields to be used?
    Thanks.

    Try this. It worked for me:
    class cl_abap_char_utilities definition load.
    constants:
        tab  type c value cl_abap_char_utilities=>horizontal_tab.

  • Problem in file format OPEN DATASET

    Hi all,
       i am upgrading the systemm 4.7 to ECC6.0
      In one of the programs OPEN dataset statement is being used to download the file to unix server, but when i run the same program in ECC6.0 version an try to opn in notepad the same file it is coming in single line (i.e end of line delimiter is being ignored.)
    Hence I tried using WITH WINDOWS LINEFEED addition
    it is displayed correctlyin notepad but when i see thru
    transaction AL11 character'#' is displayed after every end of line also when i take a printout now one extra new line is added
    the delimiter which i have used here is
    C type c value CL_ABAP_CHAR_UTILITIES=>CR_LF
    Can anyone suggest a better method to solve the problem?

    DATA L_MSG1 TYPE STRING.
    CONSTANTS: C_TAB1 TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    *-- Open Dataset
        OPEN DATASET p_aosvr FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        IF sy-subrc EQ 0.
          DO.
    *-- Read Dataset and Populate Input file data to Internal Table
            READ DATASET unix_filename INTO L_MSG1.
            IF sy-subrc EQ 0.
              SPLIT L_MSG1 AT C_TAB1 INTO it_final-field1
                        it_final-field2
                        it_final-field3
                        it_final-field4
                        it_final-filed5.
              APPEND it_final.
              CLEAR  it_final.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
        ELSE.
          MESSAGE e000 WITH 'Error while uploading data'(013).
        ENDIF.
    *-- Close Dataset
        CLOSE DATASET p_aosvr.

  • Russian Characters are not displaying in CSV file.

    Hi,
    I have got an issue with Russian data. while opening the .xls file the russian data is dispalying, but when I save it as .csv file the russian data is converted into some junk characters. Can anybody please respond me how I can get the russian data in .csv file.
    Thanks and regards
    KK

    CSV is an ASCII text file format - it does not understand Unicode. What are you trying to achieve ?
    http://www.officekb.com/Uwe/Forum.aspx/ms-excel/160469/Unicode-in-CSV-files
    Pl do not post duplicate threads - Character set for Russian data
    Srini

  • Non ASCII characters are converted to '?' or ASCII characters

    Non ASCII symbols like æ ø in the xml file have been converted to ? or other ascii characters.
    What could be the reason behind this.

    Mayil wrote:
    This file we are loading through the Flex application in the front end.
    Through java class file we are making changes to this city.xml file and adding and deleting this information in the city.xml.
    Now suddenly, i dont know what happen.. 'ø' in the city name has replaced with the '?'
    If we try to chaange this to 'ø' also, it again changes to '?'.
    I dont know how to rectify this error.I would suggest you start by finding out when it happens. Does it happen as soon as you change the XML through this mysterious "java class file"? Or does it happen when Flex reads it? And is the underlying file actually changing, or are you just seeing those question marks after Flex handles the file?
    In short a much better problem description is necessary.

  • Junk characters are displayed in report output

    Hi Gurus,
    We are facing an issue while generating a report developed in Oracle 10g, while fetching the data in one column the report is displaying junk characters although while running the query on the database the value is coming correct for the same column. We are writing the report data on the AIX and with the help of WEBUTIL the reports gets transferred on the client machine which is having windows XP as operating system. Although we have many reports running on the same concepts but only in this particular report the issue is coming.
    Our AS Version is 10.1.2.3.0
    OS Version is AIX 5.3
    Please provide some solution.
    Thanks in advance.
    Regards,
    Pradip

    Hi Roberto,
    Thanks for your reply.
    As per your suggestion , I had checked with both DB & AS both are same i.e.
    In DB it displays the value AMERICAN and for AS it displays NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
    Please give some idea. Sometimes this report gives the right output and sometimes gives output having one column with junk character of CSV file.
    Regards,
    Pradip

  • Shell Script -french characters are converting to junk in PLSQL

    Hi All,
    I have plsql package. I have included few french word in it for validation purpose.
    When i compile this package from SQL Developr it is compiling properly.
    but when i run shell script from putty and try to comppile this package the package is errorring out.
    The reason for error out is it is converting few french characters into some junk characters. is there any setting for this.?
    Thanks
    Bharat

    Bharat wrote:
    Hi All,
    I have plsql package. I have included few french word in it for validation purpose.
    When i compile this package from SQL Developr it is compiling properly.
    but when i run shell script from putty and try to comppile this package the package is errorring out.
    The reason for error out is it is converting few french characters into some junk characters. is there any setting for this.?
    Thanks
    BharatYour problems are in the are called globalization ( was called NLS)
    This can cause many problems, and is it extremely common for systems/applications/databases not be set up properly.
    Your script in SQLDeveloper is probably being held in the UTF8 characterset .... though I emphasize probably, and your file is probably saved as such.
    The oracle database, in whatever characterset that is in, let us call it CHARSET-DB, has however probably determined your sqlplus client is running a different characterset CHARSET-CLI and will perform a conversion from CHARSET-CLI to CHARSET-DB.
    Obviously if the Oracle Database has been led to falsely identify CHARSET-CLI then unwanted conversions can take place, however usually most (all?) charactersets are the same for most/all of 7-bit ASCII characters, so it is only things outside this that get affected. e.g. £, é, ó and lots of others.
    From a linux viewpoint the locale command and "LC*" variables may exert influence. However from an Oracle Client perspective the NLS_LANG variable is more effective.
    I suspect setting your NLS_LANG to UTF8 (e.g. NLS_LANG=AMERICAN_AMERICA.UTF8 ) and locale to US.UTF-8 or similar is likely to solve your issue.
    See below for a good document from OTN and a more specialist forum for this problem ( though there are some you use this forum who may be able to help you as well)
    http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html
    {forum:id=50}

  • SWF movies are not animated when the file's opened directly.

    Firstly, although I've been using Flash on and off for years (since CS3) I don't use it very often so I apologise if my issue seems simplistic!
    Basically, I used Flash CS3 for a few years to create basic animations for clients, involving simple scrolling text, without any problems.  Recently I upgraded to the CS4 Master Suite and then CS5 Master Suite within a couple of days of each other and I now need to use Flash to make a change to an old animation.  When I opened the CS3 file it appears as expected and I made the changes to the text (changing a word or two within a line of type).
    When I right clicked on the type relevant frames within the timeline I noticed that there is now more than one version of tween available, and that classic tween was already selected (I think I better buy a new teach yourself Flash CS5 book!)
    Anyway, that was allI needed to do so I initially pressed return and the text scrolled across the stage as expected.  But when I clicked on CONTROL / TEST MOVIE / TEST (or cmd+Return on my Mac) the SWF file that appears is static and the text does not scroll at all.  If I publish the movie using Actionscript 3 or 2 the resulting SWF file is also totally static.  But if I drop the SWF file into the relevant website folder and view it through Dreamweaver's browser view facility it works perfectly and scrolls just as expected.  Equally, opening it using the Opera browser works too.
    I've tried altering the CS3 file and testing the movie in Flash CS4 and Flash CS5 but the same thing happens.  It's a bit time wasting and inefficient wanting to test an animation as a SWF file by double clicking on it and only being shown a static image.  Is this a well known problem as I couldn't find any mention of it during my search?
    Thanks for reading and I'd really appreciate help resolving this issue.

    Update:
    I downloaded the newest Flash Player and double clicked the problematic swf file again.  I was a bit surprised to see Flash CS5 start up and display the floating test window with the problematic static animation as before.  I closed Flash CS5, right clicked on the swf file and chose "Open With Flash Player".  The animation opened in the new Flash Player and was working fine.
    So it appears that only Flash CS5 and CS4 are having the issue playing the test movie that was created in the very same program?

Maybe you are looking for