Download internal table to presentation server in UTF-8 format

Hello everyone.
We are trying to use function module GUI_DOWNLOAD to download data from internal table to a text file (filetype ASCII). The defualt encoding for the text file is ANSI but we need to download it with the encoding UTF-8.
We have already used codepage 4110 but that did not solve the problem.
We are using SAP ECC 5.0 system.
Can anyone please provide us with a solution? We need to solve this as early as possible.

Hi Saurav.
Try this
1.Go to SAP GUI Logon
2. Change your icon logon on Tabstrib "Code Page" at "Upload/Download"  to encod whatever language
do you want.
Hope it helps.
Sayan.

Similar Messages

  • Downloading an internal table to presentation server from WebUI

    Hi All,
    We have a requirement to download an internal table as a CSV file from CRM 7.0 WebUI to the presentation server. The file path is fixed, so the user need not choose the download location. The data to be downloaded is not part of any view on the WebUI and is being collected through code from several context nodes.
    We have looked at CL_BSP_UTILITY, which is not solving our purpose, as the prepared data stream gets over written by CRM 7.0 framework during execution.
    Any suggestions on how we can achieve the functionality?
    Regards,
    Mugdha

    Hi,
         If you need to provide download window via the browser, check out this wiki - [http://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=187336093&version=6] . If you want to directly write to the presentation server, you have th efollowing ways. If you submit a report in background, you have the option of using CL_GUI_FRONTEND_SERVICES. Otherwise you can check out using a combination of javascript and activex objects ( [http://www.codingforums.com/showthread.php?t=136906] ).
    Regards,
    Arun Prakash

  • Download internal tables

    hi all,
      i have created one report program that containing 3 output internal tables so i download all the internal tables to presentation server.For this one i created one selection screen which containing 2 parameters one is the internal table name  and the next one is presentation server file path,both are parameters.so i call this selection-screen 3 times repeatedly and i have to give those paramenters.This is my actual requirement.I declared those 2 parameters like this
    p_tabnam(20) type c,
    p_flname like rlgrap-filename.
      But the problem is in funtion module "GUI_DOWNLOAD" i passed the value of p_flname parameter to filename and p_tabnam to data_tab.But it gives syntax error i.e. p_tabname is not an internal table data_tab should be the structure of internal table.How can i solve this problem can anybody help me.Give me any solution for this problem.
    Regards,
    Bujji.

    Hi,
    See this code.
    parameters: p_tabnam(20),
    p_flname like rlgrap-filename.
    field-symbols <FS> type standard table.
    data: filename type <b>string</b>.
    start-of-selection.
      ASSIGN <b>(p_tabnam)</b> TO <FS>.
      filename = p_flname.
      call function 'GUI_DOWNLOAD'
           EXPORTING
                FILENAME = filename
           TABLES
                DATA_TAB = <FS>
           EXCEPTIONS
                other    = 9.
    The filename should be of type string.
    Svetlin
    P.S. If you find an answer useful, please assign reward points.

  • Sending data from final internal table  to application server in xml format

    hi to all ,
    can anyone send details about send data from final internal table to application server in xml format.right now i am able to download data to presentation server in xml format . love to here soon from all the abap gigs.

    welcome to SDN.
    are you using call transformation to convert itab to XML? the XML string is in which format?
    convert it to xstring and then use the following code to store it in application server.
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
    TRANSFER XML_content TO FNAME.
    CLOSE DATASET FNAME.
    where fname is the path to the file name.
    Regards
    Raja

  • Download the file in Presentation server with TAB Delimited

    Hi,
    I have to download the data of the finla internal table in presentation servr.
    The oup put file should be TAB Delimited. I can do the same with using LOOP.
    Is there any class or FM to do the same so that the out put file can be TAB Delimited.
    Sandeep

    HI,
    you can use the fm
    GUI_DOWNLOAD
    in that if you see the
    WRITE_FIELD_SEPARATOR - the import parameter, you can use this
    so that the fille will be downloaded with tab delimited.
    Regards,
    Venkatesh

  • How to download internal table data to .xlsx file ?

    Hello All,
    I am using SAP ECC 6.0. I need to download internal table data to .xlsx file.
    I tried GUI_DOWNLOAD, all the data are getting transferred to the .xlsx file, but while opening I am getting the below error.
    Excel cannot open the file "download.xlsx" because file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
    Though Microsoft office 2007 is installed in my system.
    Please help <removed by moderator>.
    Edited by: Thomas Zloch on Oct 24, 2011 10:55 AM

    Hi,
    Please find the below code to download data into excel file.
      DATA: ld_filename TYPE string,
            ld_path TYPE string,
            ld_fullpath TYPE string,
            ld_result TYPE i.
    Display save dialog window
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
         window_title      = ' '
          DEFAULT_EXTENSION = 'XLS'
          default_file_name = 'accountsdata'
          INITIAL_DIRECTORY = 'c:\temp\'
        CHANGING
          filename          = ld_filename
          path              = ld_path
          fullpath          = ld_fullpath
          user_action       = ld_result.
    Check user did not cancel request
      CHECK ld_result EQ '0'.
      CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
            filename         = ld_fullpath
            filetype         = 'ASC'
          APPEND           = 'X'
            write_field_separator = 'X'
          CONFIRM_OVERWRITE = 'X'
       TABLES
            data_tab         = it_datatab[]     "need to declare and populate
       EXCEPTIONS
            file_open_error  = 1
            file_write_error = 2
            OTHERS           = 3.
    Thanks and Regards
    Chitra

  • Download internal table to excel with header

    Hi All,
    I have a requirement to download internal table contents to excel with field headings. I tried searching in forums before posting but didn't got much help.
    I have used GUI_DOWNLOAD, WS_DOWNLOAD and EXCEL_OLE_STANDARD_DAT.
    But unable to download the header in excel..along with data...
    EXCEL_OLE_STANDARD_DAT is getting field header in excel but not downloading automatically , need to save manually which is not the requirement.
    The data is huge with around 151 columns....I got 2 internal tables.
    One for the data and the other with field names.
    Many Thanks,
    Ravi K

    Hi Ravi,
    You need to have 2 different internal tables for achieving the needful. One internal table would be having your data and another would store your table field names i.e., declare a structure of length 100 characters,
    TYPES : BEGIN OF GTY_FIELDNAMES,
                    TITLE(100),
                  END   OF GTY_FIELDNAMES.
    DATA: GIT_FIELDNAMES TYPE STANDARD TABLE OF GTY_FIELDNAMES,
                GWA_FIELDNAMES TYPE GTY_FIELDNAMES.
    DATA : GD_FILENAME TYPE STRING,
                GD_PATH     TYPE STRING,
                GD_FULLPATH TYPE STRING,
                GD_RESULT   TYPE I.
    Now have a subroutine where by you append your headings into the internal table i.e.,GIT_FIELDNAMES
       CLEAR GWA_FIELDNAMES.
       GWA_FIELDNAMES-TITLE = 'Material Number'.
       APPEND GWA_FIELDNAMES TO GIT_FIELDNAMES.
       CLEAR GWA_FIELDNAMES.
       GWA_FIELDNAMES-TITLE = 'Material Description'.
       APPEND GWA_FIELDNAMES TO GIT_FIELDNAMES.
    Once you are done with it you can call up the save dialog
    * Display save dialog window
       CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
         EXPORTING
           WINDOW_TITLE           = 'Save File As...'
           DEFAULT_EXTENSION  = 'XLS'
           DEFAULT_FILE_NAME  = 'SalesPlan'
           INITIAL_DIRECTORY      = 'C:\'
         CHANGING
           FILENAME                      = GD_FILENAME
           PATH                               = GD_PATH
           FULLPATH                      = GD_FULLPATH
           USER_ACTION               = GD_RESULT.
    * Check user did not cancel request
       CHECK GD_RESULT EQ '0'.
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
           FILENAME              = GD_FULLPATH
           FILETYPE                = 'ASC'
    *     APPEND                = 'X'
           WRITE_FIELD_SEPARATOR = 'X'
    *     CONFIRM_OVERWRITE     = 'X'
         TABLES
           DATA_TAB                 = GIT_FINAL                  " Internal table having data
           FIELDNAMES            = GIT_FIELDNAMES     " Internal table having headings
         EXCEPTIONS
           FILE_OPEN_ERROR       = 1                         "#EC ARGCHECKED
           FILE_WRITE_ERROR      = 2
           OTHERS                           = 3.
    Hope this gets sorted your problem.
    Thanks & Regards,
    Varun Kumar Sahu

  • Download internal table data to Excel in background

    Hi all ,
      Can anyone tell that how i can download internal table data
    into Excel sheet  in Backgroud Mode .
    I used both fun mod  ws and gui download but these are not working in background mod .
    Please help  issue is urgent .
    Answer is rewarded  by point .
    With Regards ,
    Nilesh Jain

    hi,
    you have to use  function module 'SAP_CONVERT_TO_XLS_FORMAT'.
    DATA:
    ITAB1 TYPE TRUXS_T_TEXT_DATA.
    CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
    EXPORTING
      I_FIELD_SEPERATOR          = ';'
      I_LINE_HEADER              =
       i_filename                 = filename
      I_APPL_KEEP                = ' '
    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.
    try this one.
    reward points if useful,
    thanks & regards,
    rajee.

  • Problem in uploading the file of internal table into appliaction server

    i want to send the data of internal table to application server through selection screen and in selection screen and in selection screen parameter it should show the path of application server and through that path internal table data should go to application server , if possible give the code

    Hi,
    form download_file_appl_server.
      open dataset p_dlf2 for output
              in text mode encoding default .
      if sy-subrc ne 0.
        message:i005 with text-415 text-407.
      endif.
      loop at i_final into wa_final.
        transfer wa_final to p_dlf2.
      endloop.
      close dataset p_dlf2.
    endform.                    " OPENDATA_CLOSE
    where p_dlf2 is the seelction screen parameter which give the application server file path
    You can use this code for ur purpose.
    Reward if useful.
    Regards
    Shibin

  • Export internal table to application server

    hello all!
    i would like to export the contents of an internal table to the appliation server. i tried via OPEN DATASET, but my itab contains not only character type data.
    i do not want to copy all content into a parallel structure with all character type colums
    do you know a way to export an internal table on application server, in a way that it is readable by ms excel?
    thanks!

    Hi Matthias, i think that the only solution is using a parallel structure with all character type colums.  Also use 'SAP_CONVERT_TO_CSV_FORMAT' to convert the internal table to csv format in order to be readable by ms excel.
    Regards,
    Andrez

  • CAN WE DOWNLOAD A REPORT TO PRESENTATION SERVER IN BACKGROUND

    Hi
    1. Can we download a report into presentation server in background mode and it should be saved in excel. If so plz let me know how to do.
    2. When i look into spool SP01 the report is not in proper format because the report output width is more than 255 characters and now how should i solve the problem to make it in correct format. Can we do this or not?. If so how
    Thanks in advance.

    Hi
    when i wrote the
    REPORT z_mm_rep_000047
                           LINE-SIZE 500
                           LINE-COUNT 65
                           MESSAGE-ID zca.
    it is automatically increasing the width in the print settings when i increased to 500 from 255 but stil its not working.

  • How to download internal table data into xml file?

    Hi,
    Experts,
    I have downloaded internal table data into XLS format using GUI_DOWNLOAD Function module, But i didn't Know how to download internal table data into XML format please post some ideas/inputs on this issue.
    Thank you,
    Shabeer ahmed.

    check this
    data : gd_repid type sy-repid.
    GD_REPID = SY-REPID.
    DATA : L_DOM TYPE REF TO IF_IXML_ELEMENT,
           M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
           G_IXML TYPE REF TO IF_IXML,
           W_STRING TYPE XSTRING,
           W_SIZE TYPE I,
           W_RESULT TYPE I,
           W_LINE TYPE STRING,
           IT_XML TYPE DCXMLLINES,
           S_XML LIKE LINE OF IT_XML,
           W_RC LIKE SY-SUBRC.
    DATA: XML TYPE DCXMLLINES.
    DATA: RC TYPE SY-SUBRC,
          BEGIN OF XML_TAB OCCURS 0,
          D LIKE LINE OF XML,
          END OF XML_TAB.
    data : l_element           type ref to if_ixml_element,
           xml_ns_prefix_sf     type string,
           xml_ns_uri_sf        type string.
    CLASS CL_IXML DEFINITION LOAD.
    G_IXML = CL_IXML=>CREATE( ).
    CHECK NOT G_IXML IS INITIAL.
    M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
    CHECK NOT M_DOCUMENT IS INITIAL.
    CALL FUNCTION 'SDIXML_DATA_TO_DOM'
    EXPORTING
       NAME = 'REPAIRDATA'
       DATAOBJECT = IT_FINAL_LAST1[]
    IMPORTING
       DATA_AS_DOM = L_DOM
    CHANGING
       DOCUMENT = M_DOCUMENT
    EXCEPTIONS
       ILLEGAL_NAME = 1
       OTHERS = 2.
    CHECK NOT L_DOM IS INITIAL.
    W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
    *Start of code for Header
    * namespace
    t_mnr = sy-datum+4(2).
    CALL FUNCTION 'IDWT_READ_MONTH_TEXT'
      EXPORTING
        LANGU         = 'E'
        MONTH         = t_mnr
    IMPORTING
       T247          = wa_t247
    concatenate sy-datum+6(2)
                wa_t247-ktx
                sy-datum(4) into t_var1.
    concatenate sy-uzeit(2)
                sy-uzeit+2(2)
                sy-uzeit+4(2) into t_var2.
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    l_element  = m_document->get_root_element( ).
    xml_ns_prefix_sf = 'TIMESTAMP'.
    concatenate t_var1 t_var2 into xml_ns_uri_sf separated by space.
    clear : t_var1,
            t_var2,
            t_mnr,
            wa_t247.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'FILECREATOR'.
    xml_ns_uri_sf    =   'SAP'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMGROUP'.
    xml_ns_uri_sf    = '1'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    clear : xml_ns_prefix_sf,
            xml_ns_uri_sf.
    xml_ns_prefix_sf  = 'CLAIMTYPES'.
    xml_ns_uri_sf    = 'W'.
    l_element->set_attribute( name  = xml_ns_prefix_sf
                              namespace = ' '
                              value = xml_ns_uri_sf ).
    *End of Code for Header
    CALL FUNCTION 'SDIXML_DOM_TO_XML'
    EXPORTING
      DOCUMENT = M_DOCUMENT
    IMPORTING
      XML_AS_STRING = W_STRING
      SIZE = W_SIZE
    TABLES
      XML_AS_TABLE = IT_XML
    EXCEPTIONS
      NO_DOCUMENT = 1
      OTHERS = 2.
    LOOP AT IT_XML INTO XML_TAB-D.
    APPEND XML_TAB.
    ENDLOOP.
    *Start of Code for File name
    concatenate p_file
                '\R'
                '000_119481'
                sy-datum+6(2) sy-datum+4(2) sy-datum+2(2)
                sy-uzeit(2)   sy-uzeit+2(2) sy-uzeit(2) '.xml' into p_file.
    *End of Code for File name
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE = W_SIZE
      FILENAME = p_file
      FILETYPE = 'BIN'
    TABLES
      DATA_TAB = XML_TAB
    EXCEPTIONS
      OTHERS = 10.
    IF SY-SUBRC  = 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Download the file in presentation server while the program runs in backgrou

    Hi,
    Usually we will never download the file in presentation server while the job is scheduled in back ground.
    But now i need to do that. I need to download the data in excel file and the same program is scheduling in background.
    Can any one suggest how can we do this?
    Thanks in Advance,
    Ravi

    Hi,
    There is an alternative provided by SAP. The program RFCEXEC has to be installed locally on the PC.
    In SAP R/3 we have to define a destination link to your local PC to the RFCEXEC program. And in the ABAP program we have to invoke the connection by calling the FM  RFC_REMOTE_FILE.
    I haven’t tried this before but a detailed documentation is available in this link.
    http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
    Reward if useful
    Regards
    Shiva

  • Debugging ECC6: how to see the fields name when download internal table?

    When we debug a reprot in ECC6 and save to a local file an internal table, the fields are not appearing only the data,
    Is there a way to download also the table fields name?

    From the new debugger switch to the classic debugger using menu path Debugger->Switch to Classic Debugger. Form the classic debugger you can download internal table data with column name(s).
    Regards,
    Joy.

  • How to download data to the presentation server in background?

    Hi,
    I would like to download data to the presentation server in background.
    Currently, the report uses FM GUI_DOWNLOAD to download in foreground.
    However, this FM does not work in the background.
    But please let me know how to download to the presentation server in background.
    Thanks and regards,
    Anishur

    Moderator message - FAQ - Please search before asking - post locked
    Rob

Maybe you are looking for

  • Wait (ms) - NI KnowledgeBase article example

    I am reading http://digital.ni.com/public.nsf/allkb/12B2EA9AD5B265AD86256257004DD8E2 which is suppose to explain the difference between the Wait (ms) function and the Wait Until Next ms function. I am having a hard time understanding the example give

  • Problem in executing the Query

    Hi Experts, I hava query on FIAR_C03, while i am executing that query it is showing one error message and immediately it is disconnecting BW server. that error message is Abort Characterstic 0clr_doc_no is not available in the infoprovider in details

  • No Device Menu in I-Tunes

    Hi, Not sure if this is something really simple but I appear to have lost my device menu in I-Tunes. My ATV works however it is not connected to I-Tunes and I cannot reconnect using the password on screen in the Source menu because I have no device m

  • CS4 Download

    Hi, where can I download a copy of CS4 Design Standard mac eddition? I have a existing licence but have lost the install dics.

  • Gnome Compiz Autostart

    I followed the tutorial from the wiki to start compiz at login. I created the compiz.desktop file at /usr/share/applications and changed the gconf var. When I reboot or re-login there are no windows borders and compiz is not even running. It works fi