Chinese char disorder from SAP download into Excel

Hi all,
I used t_code PA30 to input one person name and the name is '燊'. But when I use customizing report to display and download the person information into Excel,
the display is ordinary and the person name is disorder in the downloaded excel.
the '燊' changed the interrogation mark.
But I use the customizing report to download the other information, that is ordinary.
I don't know the reason, and I hope everybody help me to resolve the error.
Thanks
Ma Chao

Hi,
1. WS_DOWNLOAD is obsolete. use fm GUI_DOWNLOAD
For search and replace a character in string please check this code , may this will be useful to you
DATA : find(33) TYPE c VALUE 'xx_aa_yy_zz_xx_yy_yyb_yy_yybyy_1',
len LIKE sy-fdpos.
len = 1.
WRITE:/ find.
WHILE sy-subrc = 0.
SEARCH find FOR 'yy_' STARTING AT len.
CHECK sy-subrc = 0.
len = len + sy-fdpos + 1.
REPLACE '_' WITH '*' INTO find+len(1).
ENDWHILE.
WRITE:/ find.
aRs

Similar Messages

  • Extracting a Report from SAP Spool into a Useful Excel 2010 Format

    Hi All,
    Extracting a Report from SAP Spool into a Useful Excel 2010 Format.  I'm currently running the following report in SAP  and would like the
    ability to set this report up as a recurring report running weekly and
    subsequently access this report in a useable Excel 2010 format without
    much data manipulation.  Can you please assist me.  Below, I've tried to
    provide an example of what I'm encountering.   Thanks, beforehand for
    your assistance.
    Here goes:
    Step one: Run 62 Report in SAP S_P99_41000062- Material List Price and
    Inventory
    Step 2. Select stored Variant "Weekly KPI", ok. Enter the enter  the
    desired company code and period I want thre report to run for and update
    the currency, if necessary. Having input my desired criteria, I believe
    I can either execute immediately, run in the background, preset to run
    at date in the future. For this example let's just execute, immediately.
    This is where the difference originates. Given, I run this report
    immediately, I'm able to simply extract the result to Excel via the list
    selection noted in the tool bar below.  The result is a data friendly
    excel 2007  report is automatically generated.
    Export to Excel via list:
    Select save and Excel 2007 opens automatically:
    That said, the method outlined above works perfectly fine if you want
    the report immediately.  Now let go back and run the exact same report
    with exceptoin of running it in the background and having to retrieve it
    from the Spool (SP01) uisng my user ID.  Given the report generated in
    the background,  I would now access the report via the spool and make
    the following selections:
    SP01 + execute to see my report
    I would hit the sunglasses to see the actual report, then want to
    extract this report to Excel by selecting the export option.
    I would at this point select spreadsheet and be given an option to save
    the spreadsheet to local file. However, upon trying to open the
    spreadsheet I will receive an error messageindicating that the format is
    different than that which the file I am currently trying to open it
    with.  I'm currently running Excel 2010 on my computer.  The currency
    format and other issues arrise with this extract.  Please help. 
    Thanks,
    Chowadary.

    Update to Latest GUI.
    Use   List -> Export -> Spreadsheet  to get the output to excel.
    I remember in ALV max length allowed is 1023 characters and the max no of columns supported is 90. Issue occurs when row size of exported data gets more than 1023 character. (This includes if Long/Medium Header Text used ) If it exceed 1023 character the columns splits and moves to next row.
    Check your fieldcatog for header lengths.
    -Satya

  • Tools to Auto load bulk data from SAP BW into Essbase?

    Does any one know what is the most efficient way to retrieve a large amount of data from SAP BW into Essbase on a regular basis? We currenly export data from BW into several Excel files, which has the limitation of 64k row in a batch, we then load the excel files into essbase usng rules files. And it's a manual process. Do you know if there is a better tool/approach that we can use to do the data retrieve and load into essbase in one batch without need of human interference? Thanks for your good ideas!

    you can use HAL to do the extraction and loading data from SAP. did you try this?

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

  • Downloading into excel file , the is alignment is out

    The  reports when downloading into excel file is not what we usually getting. The alignment is out.

    Hi Basavaraj,
    When you are creating dynamic internal table(itab1) and fields of internal table, at the same time in the same way  create one more internal table(itab2) resrict this up to 10 columns.
    now
    DATA : num type i,
           FNAME(255) TYPE C
               VALUE '/data/sapdata/filename'.
    CONSTANTS : C_COMMA TYPE C VALUE ','.
    DATA : BEGIN OF I_DISPLAY OCCURS 0,
            REC(400),
           END OF I_DISPLAY.
    loop at itab1
    num = num + 1.
      if num le 100.
       move-corresponding fields to itab2
      else.
        exit.
      endif.
    endloop.
      Give column headings
            itab2-col1 =  'name1'
            itab2-col2 =  'name2'
            itab2-col3 =  'name3'
            itab2-col4 =  'name4'
            itab2-col5 =  'name5'
            itab2-col6 =  'name6'
            itab2-col7 =  'name7'
            itab2-col8 =  'name8'
            itab2-col9 =  'name9'
            itab2-col10 =  'name10'
          INSERT itab2 INDEX 1.
          CLEAR itab2.
    loop itab2.
       CONCATENATE
            itab2-col1
            itab2-col2
            itab2-col3
            itab2-col4
            itab2-col5
            itab2-col6
            itab2-col7
            itab2-col8
            itab2-col9
            itab2-col10
               into I_DISPLAY-REC SEPARATED BY C_COMMA.
         APPEND I_DISPLAY.
         CLEAR I_DISPLAY.
      ENDLOOP.
    OPEN DATASET FNAME FOR OUTPUT IN TEXT MODE.
          LOOP AT I_DISPLAY.
            TRANSFER I_DISPLAY TO  FNAME.
          ENDLOOP.
        CLOSE DATASET FNAME.
    endloop.

  • Download from SAP system to Excel sheet

    Hi,
    I have a list of materials, would like to download it from SAP system to an Excel sheet.
    Kindly let me to know the procdure to do it.
    Thanks
    NDS

    Hi,
    Please execute T code MM60 or the required T code to get the list of materials and Go to sap menu Bar ->setting->list->save->local to spreedsheet and save it your desk top to create an Excel file.
    Regards
    Ram

  • How to download Data from Database directly into excel

    I have a requirement to download very large quantity of data from database into Excel file.
    But condition is excel file should have only 65,536 rows in a single spread sheet(that's the limit i suppose),if i have more data points(rows) than it should be stored into different spreadsheet.......this continues so there can be many spread sheets in a single excel file.
    Data size can be 1 GB or more.
    Also specific naming conventions need to be followed for giving name to excel as well as different spread sheets in it.
    Please see if someone could help me out.

    Thanks for ur reply,
    But my requirement is to call "download to excel" method,in a java program on click by user for downloading an excel sheet on his machine.
    This is be done as part of a web application which is to be made (so can't open the excel first)

  • Download into excel sheet

    Hi All,
    In a ALV report, i would like to donwload the final internal table into an excel sheet.
    The requirement is that the data should be filled from 8th row of excel sheet.
    I am using GUI_DOWNLOAD and it makes the data to dump from first line of excel sheet itself.
    How to incorprate the logic for these requirements?
    Your help will be sincerely appreciated.
    Thanks in Advance,
    Pavan
    Edited by: Pavan Sanganal on Dec 16, 2008 10:51 AM

    Hello Pavan,
    I think you have written a separate sub-routine for this. Use another internal table IT_XLS which has a similar structure as the int. table for ALV display (IT_ALV, say).
    Now try this piece of code:
    DO 8 TIMES.
      APPEND WA_XLS TO IT_XLS. "Populate 8 blank rows in the table
    ENDDO.
    LOOP AT IT_ALV INTO WA_ALV.
      WA_XLS = WA_ALV.
      APPEND WA_XLS TO IT_XLS.
      CLEAR WA_XLS.
    ENDLOOP.
    Use GUI_DOWNLOAD to download IT_XLS. Can you please tell what do you want to populate in these 8 blank rows?
    BR,
    Suhas

  • Internal table to be downloaded into excel is empty

    Hi everybody,
    I created a page where I'm displaying in a table all the records. OnInitialization, I set my RFC needed to get the data from the Prod.Server and so far is displaying fine the data when I test it.
    Now, I want to download that table into excel so I created a buttom in the Layout and in the same page OnInputProcessing I'm checking the event (IF event_id = CL_HTMLB_MANAGER=>EVENT_ID) to check if the new button was trigered. Next, I copied the solution given by Thomas in the weblogs "BSP Download to Excel in Unicode Format" but when I check my table already displayed and needed by the function 'SCMS_STRING_TO_XSTRING', now is empty.
    I set the Automatic Page Attribute for my table ON but still is empty.
    Do I have to set something else to retain or get my table OnInputProcessing?
    Thanks in advance for your quick answer.
    Juan

    Thanks everybody for your quick answers.
    You are all rights, when I set my page Stateful it solve my problem and I'm getting my table with Data.
    Now, I'm having a second problem.
    As I told you before, I only have one page where in OnInitialization I'm displaying a table, that's fine. I include a button to download the table into excel and I copied the Thomas code into the same page OnInputProcessing Event. I test it in debug mode and it's going fine thrue all the statements: executing the Funtion 'SCMS_STRING_TO_XSTRING' and executing the following statements response->set_header_field and so on..
    The problem is when getting the last statement:
    response->set_data( data = l_xstring
    length = l_len ).
    navigation->response_complete( ).
    My current page becomes blank with no dialog to download the file.
    Here is my code from OnInputProcessing event, sorry for the long message.
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    DATA: WA LIKE LINE OF ZIMSLOC.
    DATA: UNRESTQ(17) TYPE C,
          KLABS(17) TYPE C.
    data: name(60) type C,
          l_string type STRING,
          l_xstring type XSTRING,
          l_len type I,
          APP_TYPE(60) type C.
    DATA: response TYPE REF TO if_http_response.
    create object response type cl_http_response exporting add_c_msg = 1.
    constants: crlf type string value cl_abap_char_utilities=>cr_lf,
               tab type string value cl_abap_char_utilities=>horizontal_tab.
    Optional: test that this is an event from HTMLB library.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
    See if download is triggered from button
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
        DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
        button_event ?= event.
      ENDIF.
      CASE event->id.
        WHEN 'download'.
          LOOP AT zimsloc INTO WA.
            UNRESTQ = WA-UNRESTRICTEDQ.
            KLABS = WA-KLABS.
            CONCATENATE l_string
            WA-WERKS tab
            WA-MATNR tab
            WA-CHARG tab
            WA-LICHA tab
            WA-MAKTX tab
            KLABS tab
            UNRESTQ tab
            WA-SOBKZ tab
            WA-SONUM tab
            WA-MEINS tab
            crlf
            INTO l_string SEPARATED BY SPACE.
          ENDLOOP.
          APP_TYPE = 'APPLICATION/MSEXCEL; charset=utf-16le'.
          call function 'SCMS_STRING_TO_XSTRING'
            EXPORTING
              text     = l_string
              MIMETYPE = APP_TYPE
            IMPORTING
              BUFFER   = l_xstring.
    Add the Byte Order Mark - UTF-16 Little Endian
          concatenate  cl_abap_char_utilities=>byte_order_mark_little
                       l_xstring
                       into l_xstring in byte mode.
          response->set_header_field( name = 'content-type'
          value = 'APPLICATION/MSEXCEL; charset=utf-16le' ).
    some Browsers have caching problems when loading Excel format
          response->delete_header_field( name =
          if_http_header_fields=>cache_control ).
          response->delete_header_field( name =
          if_http_header_fields=>expires ).
          response->delete_header_field( name =
          if_http_header_fields=>pragma ).
    start Excel viewer either in the Browser or as a separate window
          response->set_header_field( name = 'content-disposition' value =
    'attachment; filename=webforms.xls' ).
    finally display Excel format in Browser
          l_len = xstrlen( l_xstring ).
          response->set_data( data = l_xstring
          length = l_len ).
          navigation->response_complete( ).
        WHEN others.
      ENDCASE.
    ENDIF.
    Thanks againg for your help.
    Juan

  • Download into excel

    Hi all,
    is there any function module which i can download the excel sheet into internal table.
    I have requirement like this way.
    i have two records in excel file like
    a   b   c   10 100
    a   b   c   20 100
    I have to copy into internal table these values as it is and then I want to do calculations based on 10 & 20.
    I am trying to do it with Field symbols but not able to do so.
       LOOP AT INTERN1.
         IF   KZHEADER = 'X'
          AND INTERN1-ROW = 1.
            CONTINUE.
         ENDIF.
         TIND = INTERN1-COL.
         CONCATENATE 'DATA_TAB-VALUE_' TIND INTO ZWFELD.
         ASSIGN (ZWFELD) TO <fs1>.
         <fs1> = INTERN1-VALUE.
         AT END OF ROW.
           APPEND DATA_TAB.
           CLEAR DATA_TAB.
         ENDAT.
       ENDLOOP.
    Any suggetions are really appreciatable.
    shylesh

    Hi,
    FM : 'SXPG_COMMAND_EXECUTE'
    For full program code check the following link:
    http://www.sap-img.com/abap/download-in-background-in-excel-format.htm
    Regards,
    Bhaskar

  • Function module to download into excel sheet in crm

    Hi,
            Needed the Function module to download the data from internal table into the excel sheet in the CRM
    <b></b>

    use
    FM :- GUI_DOWNLOAD
    Example Code.
    lv_file_name = 'c:abcd.xls'
    *----Load Detail Report Data to Excel File
        CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            filename                = lv_file_name
            filetype                = 'DAT'
            write_field_separator   = 'X'
            codepage                = '4103'
          TABLES
            data_tab                = lt_det_report
          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
            OTHERS                  = 22.
      ENDIF.
      IF sy-subrc <> 0.
    *   202 : Error Occurred while writing data to the file.
        MESSAGE e202(zusm_gen) .
        EXIT.
      ELSE.
        WRITE :/ text-042 , lv_file_name.
      ENDIF.
    :- lt_det_report---> is table for storing data .
                         it can be any type
    <b>Please Reward Points & Mark Helpful Answers</b>
    To mark Helpful Answers ;click radio Button next to the post.
    RadioButtons
    <b>o</b> Helpful Answer
    <b>o</b> Very helpful Answer
    <b>o</b> Problem Solved.
    Click any of the above button next to the post; as per the anwers
    <b>To close the thread; Click Probelm solved Radio Button next to the post , which u feel is best possible answers</b>

  • ChartView and FilterView are overlapping whenever I download into Excel

    Hi,
    I have a report with chart view as well as filterview resides at the bottom of the chart.
    Whenever am trying to download the report into Excel the Filterview is over lapping on the Chart View.
    Can you guys please suggest how can i overcome this.
    Thanks in advance,
    Pramod

    This an extract from Oracle metalink..
    This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
    Applies to:
    Answers, Interactive Dashboard - Version: 10.1.3.4.1 [1900] - Release: 10g
    Information in this document applies to any platform.
    Symptoms
    When downloading reports that have multiple charts into Excel, the charts appear overlapping. The downloaded report(excel file) looks different from what it displayed in a dashboard.
    Cause
    There is a defect around downloading a request to excel that has multiple views on the report
    This is as per a number of bugs already raised around this issue:
    Bug 8825314: TABLE VIEW OVERLAPPED WITH CHART VIEW IN THE EXCEL SHEET
    Bug 8478529: DOWNLOADED EXCEL SHEET HAS VIEWS THAT OVERLAP EACH OTHER
    Bug 7700214: DOWNLOADING TO EXCEL OVERLAPS THE CHART WITH THE TABLE VIEW
    Bug 7501223: DOWNLOADING TO EXCEL OVERLAPS THE CHART WITH THE PIVOT TABLE
    Solution
    The following bugs already raised to address this issue:
    Bug 8825314: TABLE VIEW OVERLAPPED WITH CHART VIEW IN THE EXCEL SHEET
    Bug 8478529: DOWNLOADED EXCEL SHEET HAS VIEWS THAT OVERLAP EACH OTHER
    Bug 7700214: DOWNLOADING TO EXCEL OVERLAPS THE CHART WITH THE TABLE VIEW
    Bug 7501223: DOWNLOADING TO EXCEL OVERLAPS THE CHART WITH THE PIVOT TABLE
    Workaround at this stage would be to use download to html/powerpoint.
    Hope this helps!
    Regards..

  • Store data from a table into excel sheet and email

    Hi all,
    I am just wondering, i m not sure where to start. I want to insert data from a table into an excel spread sheet.
    I'm working on a stored procedure with 3 input parameters:
    1. the actual query
    2. userid
    3. the column headers (comma separated) - these will be in the same order as the outer select statement in the query itself. I will use the column headers for the respective columns in Excel worksheet.
    When the proc is executed, the excel is populated. If the record count is > 65536, then I need to create multiple worksheets in the same excel file.
    How can i do that? Can any body please help with this..?

    We are doing like this ( Not sure whether it is the best method available)
    --Get the output of the query (Since the number of columns is not fixed you would have to use dbms_sql package)
    --loop through the output and write into a file, for example test.csv, using UTL_FILE package
    --load the file into a blob variable(we are doing it by loading it into a table)
    --For mailing You can use the below package
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    Mailing code we are using is given below:
    CREATE OR REPLACE procedure xls_mail(
        p_sender     varchar2, -- sender, example: 'Me <[email protected]>'
        p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
        p_subject    varchar2, -- subject
         p_text           varchar2, -- text
         p_filename      varchar2, -- name of xls file
         p_blob           blob         -- xls file
    ) is
      conn      utl_smtp.connection;
      i number;
      len number;
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => p_sender,
        recipients => p_recipients,
        subject    => p_subject,
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'application/xls',
        inline       => TRUE,
        filename     => p_filename,
        transfer_enc => 'base64');
        -- split the Base64 encoded attachment into multiple lines
       i   := 1;
       len := DBMS_LOB.getLength(p_blob);
       WHILE (i < len) LOOP
          IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
          ELSE
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, (len - i)+1,  i)));
          END IF;
          UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
          i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
       END LOOP;
      demo_mail.end_attachment(conn => conn);
      demo_mail.attach_text(
        conn      => conn,
        data      => p_text,
        mime_type => 'text/html');
      demo_mail.end_mail( conn => conn );
    END;

  • How to updata data from SAP EP into SAP R/3 ?

    Hi,
    How to create the material from SAP CE 7.1 into SAP R/3. Is BAPI  the only way for this or there is some other solution.
    Also, please explain how to use BAPI in this scenario.
    Regards,
    Yogita.

    Please look into the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/19/4554426dd13555e10000000a1550b0/frameset.htm
    Thanks,
    Raju Bonagiri

  • WUO-712 : Webutil Error while downloading into Excel

    Hello Everyone,
    I have installed oracle Application server 10g (10.1.2.0.2) with webutill.
    But while downloading data into Excel sheet it's through an error WUO-712 randomly due to which some of the data is missed out.
    We have installed webutil 10.5 with forms and reports 10g.
    Please suggest some solution for the same.
    Please revert for the same ASAP.
    Thanks in advance
    Regards,
    Ajinkya
    Edited by: Ajinkya on Nov 3, 2009 10:45 PM

    Please reply for this thread.......:)

Maybe you are looking for

  • Error Message: itunes.exe corrupt file

    Error Message: itunes.exe corrupt file \ipod_control\itunes\temp run chkdsk utility Itunes gives me this message, then acts normal downloads latest podcasts and videos but when I turn on the ipod video it hasn't been updated at all. Also from the sta

  • How to do multiple deletion from UCM admin UI

    I use UCM admin UI (referring http://ucmhost:port/cs). However, to delete documents, I have to click the "Info" icon beside document and then delete each revision shows on the infor page. is there any easier way to do deletion? such as select multipl

  • Password Vault for Windows 7?

    Hello, I have installed Windows 7 RTM on my laptop.  I've downloaded all the Lenovo ThinkVantage packs and utilities that I think I need, but the password vault does not appear to be installed or working.  I did install the Fingerprint Reader driver,

  • Anyone who plays Eternity Warriors 2, why does the game crash right after I complete a level, Could anyone help me out please?

    I use a iPod 4th generation with IOS 6 and I am not Jailbroken.

  • Payment advice mailing

    hi to all, help me in this issue, how to use this bte SAMPLE_PROCESS_00002040 for sending mails to vendors how to activate this bte and change the code. thanks in advance kiran reddy Message was edited by:         kiran reddy