Download Arabic text using GUI_DOWNLOAD

Hi Experts,
I am using GUI_DOWNLOAD to download the contents of an internal table to a local text (.txt) file. The internal table contain Arabic characters also. The Arabic characters appear as # in the downloaded text file.
Please help to resolve this issue.
Points will be rewarded for helful answers.

Hi ,
Try File type as  'DAT' , i guess it will solve your problem , Let me know if its not solved.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = 'C:/TEST.XLS'
FILETYPE = 'DAT'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB "internal table
Regards,
Saravana.S

Similar Messages

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • Data missing while downloading the data using GUI_DOWNLOAD

    Hi experts,
    I'm uploading the Production Order data through excel and in the transaction level it's happening fine.
    After running the BDC I'm fetching the Production Order Number(AUFNR) and it's Status from the respective tables and downloading the data along with the Production Order Number(AUFNR) and it's Status using GUI_DOWNLOAD.  (Version is 4.6 C)
    After downloading some of the Production Order Numbers(AUFNR) and it's Status are missing in the Excel Log sheet . But it's very much there in the  SAP tables and also in the transaction screen level.
      CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
                bin_filesize            = v_bin_filesize
                filename                = v_name
                filetype                = 'ASC'
                write_field_separator   = 'X'
           TABLES
                data_tab                = it_final
           EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                OTHERS                  = 22.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Kindly give me your suggestions regarding this.
    Thanks in advance.
    Jessi

    Hi,
    I am not sure why it is not coming .
    But try by uncomment the bin_filesize.
    Because generally the size(bin_filesize) specification is for binary files .
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    *bin_filesize = v_bin_filesize "Comment This
    filename = v_name
    filetype = 'ASC'
    write_field_separator = 'X'
    TABLES
    data_tab = it_final.
    Regards,
    Raghava Channooru

  • Download to excel using GUI_DOWNLOAD : Date format

    Hi Gurus,
    I am downloading the data from an internal table to excel file using FM gui_download. The date field in my internal table is in the format MM-DD-YYYY (stored as Char 10 field). But when it downloads to excel, the date format changes to MM/DD/YYYY. I want to keep original format of MM-DD-YYYY in excel.
    Please help, sure points for helpful answers.
    should i use FM gui_download only, or is there some Other useful FM.
    Regards,
    Abhishek

    Hi,
    Check the code below:
    v_date = sy-datum.
    IF v_date CA '/'.
      REPLACE '/' WITH '-' INTO v_date.
    ENDIF.
    Regards
    Kannaiah

  • Arabic Text problem in Excel

    Hi All,
    I am downloading my data using GUI_DOWNLOAD FM into Excel ,
    Here the issue is in excel the Arabic text is displayed as # ,
    I have gone through the scn and worked on some suggestions given like to add code page
    tab delimiter etc... but could get the desired output..
    can anyone suggest me the way to get the Arabic text correct in Excel.
    Thanks,
    Pavan

    Hi Pavan,
    Could you please describe shortly about how ,where is the data being retrieved to the program?
    whether you are performing any conversions?
    what kind of encoding used ?
    it would help me to understand and give you the useful inputs to achieve the desired output
    Regards,
    Prakash

  • Help:displaying Arabic characters using XSL

    How do I display static Arabic characters using XSL in a HTML page, from within a JSP?
    I need to display a HTML page wherein static Arabic characters have to be shown. I use the following XSL document with static Arabic characters inside:
    <?xml version = '1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <HTML>
    <HEAD/>
    <xsl:apply-templates/>
    </HTML>
    </xsl:template>
    <!-- document xsl:template -->
    <xsl:template match="booklist">
    <BODY BGCOLOR="#CCFFFF">
    <H1>^GFcI cSGZOI
    </H1>
    <P> This will illustrate the transformation of XML file containing list of books to a HTML table form
    </P>
    <xsl:apply-templates/>
    </BODY>
    </xsl:template>
    <xsl:template match="booklist/book">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="booklist/book/title">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="booklist/book/author">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="booklist/book/publisher"/>
    <xsl:template match="booklist/book/price"> Price: $
    <xsl:apply-templates/>
    </xsl:template>
    </xsl:stylesheet>
    When I try to read the XSL document using an IO stream, like this,
    InputStream is = getClass().getResourceAsStream("myXSLDocument.xsl");
    XSLStylesheet stylesheet = new XSLStylesheet(inputStream, null);
    from within a JSP, I get a null pointer exception as shown below:
    java.lang.NullPointerException:
    at oracle.xml.parser.v2.XSLStylesheet.<init>(XSLStylesheet.java:175)
    at mip.portlets._cardvalidaterportlet._cardentry._jspService(_cardentry.java:143)
    at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java)
    at oracle.jsp.JspServlet.internalService(JspServlet.java, Compiled Code)
    at oracle.jsp.JspServlet.service(JspServlet.java)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at oracle.portal.provider.v1.http.JspRenderer.renderBody(JspRenderer.java:133)
    at oracle.portal.provider.v1.RenderManager.render(RenderManager.java:164)
    at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(ServletProviderResponse.java:510)
    at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(HttpProvider.java:647)
    at oracle.portal.provider.v1.http.HttpProvider.service(HttpProvider.java:383)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java, Compiled Code)
    at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
    at java.lang.Thread.run(Thread.java:479)
    I have no problems parsing the same XSL containing static Arabic text using Transviewer beans' XSLTransformPanelSample class. This means that my XSL has no errors in it.
    null

    You need to use the correct and the same character encoding (charset) thorough the complete process.
    Whenever you get question marks, then it means that the charset used does not recognize the bytes (which on its turn are apparently encoded by a different charset).
    This is an important read, read it from top to bottom, preferably twice: [http://www.joelonsoftware.com/articles/Unicode.html].

  • Arabic text turns into #####

    Hello all,
    I have checked a thread having this problem but the solution is not given so I had to open a new thread.
    I have an arabic smartform and at the preview level all is ok and arabic text is appearing very well, but when printed, the text turns to ####### on the printted paper. I tried to print some arabic text using MS Word editor to check that the printter supports arabic and arabic was printed correctly which means that the problem is within SAP, in particular, printter setting.
    so can you please help in how to setup the printter setting in SAP to allow printing arabic?
    Thanks in advance.

    Here comes the solution.. given by SAP note 776507 ..
    Please have look on sap note 776507  .
    Summary
    Symptom
    Documents printed via SAPscript or SmartForms do not print with correct
    special characters, e.g. ### prints instead of
    Japanese or Russian characters. What to do?
    Other terms
    SAPscript, SmartForms, printing, device types, OTF
    Reason and Prerequisites
    Help required to choose proper fonts in a SAPscript or SmartForm

  • Arabic Printing using Smartforms

    Hi Gurus,
    I am trying to print arabic text using smartforms. I have set MS Word as the text editor. Arabic text is coming up correctly in the editor (Arabic font, Right-to-Left). I  created a Arabic smartstyle using A_TRAD font (I also tried other arabic fonts available). Now when I try to print it on HP LasetJet printer, the arabic text is coming up as single characters rather than words and lines. Different Arabic characters are not joined together to form words, they are all single characters separate from each other. Whereas arabic text is coming up correctly in the MS Word editor. Any help would be highly appreciated!!
    [email protected]

    Hi There.. Greetings...
    I am having the same problem of printing Arabic text in the smartform. The arabic Text is printing in opposite direction as well.
    what is the solution for this?
    Please help me.
    Looking forward to hearing from u.
    Kind regards,
    shekher

  • Excel Header Format using GUI_DOWNLOAD

    Hi Experts,
    I need to download the excel file with the below shown header format.
    I can able to download as excel using GUI_DOWNLOAD. But I don't know how to bring the first row of the above pasted image.
    Please advice any way to download the file with the above header format.
    Thanks,
    Srini

    Here is some sample code of someone who has done this... i know lazy of me just to paste a link but I think it is the code that will fit your requirement.
    http://scn.sap.com/message/6048823#6048823

  • Problems with displaying dynamic Arabic text

    We have a problem with a navigation system we are building
    which has to be able to display dynamic Arabic text. We are pulling
    in the Arabic text using XML. The problem we are having is that the
    character are not displaying joined up where they should be (for
    instance in the middle of words). Arabic characters have different
    shaping according to the position they take up within a word. What
    we are producing is apparently unreadable. Has anyone come accross
    this problem before? Is it solveable?

    Hi:
    Is there any possible chance that Adobe would do something to asist us Fl8 users with international character support.
    Everyone has some work-around, except Abode, and they are all usually related to XML.
    My setup is PHP (CMS supporting many languages) -> MySQL -> PHP -> Flash8 (Dynamic Text Fields) and the olpart that does not work is when I inject an extended character into the string - Flash stops displaying anything from that character on.
    If Adobe has or did have some component / solution or anything other than the usual System.useCodePage = true (which never seems to actually work), please let me know.
    Best Regards,

  • TLF and arabic text

    Hello,
    I'm using AS3 with CS3 to do some design involving working with dynamic text field for arabic text.
    This staetemnt works just fine:
    var strValidate_txt.text = "خُرُوجْ"; // a dynamic text field - result  OK
    however when I try to build the string characyter by character:
    var strValidate_txt.text = "";
    strValidate_txt.appendText("خ");
    strValidate_txt.appendText("ر");
    strValidate_txt.appendText("و");
    strValidate_txt.appendText("ج");
    the resuslt is a string with dissjointed characters وجرخ
    I couldn't find a way to fix this in Flash CS3.  I'm wondering if upgrading the Flash CS4 with the new TFL will solve me this issue?
    still need to convince my boss to pay for the upgrade!
    Thanks for help

    Hi,
    I'm working on Flash with Arabic language since 2 years in FAO (http://www.imarkgroup.com) to develop eLearning apps in Flash/Actionscript...before the TLF also.
    The new TLF is the best choice, you can test your arabic text using the demo app http://labs.adobe.com/technologies/textlayout/demos/
    I suggest you to wait for the release of new Flash Builder 4 with the official version of TLF. Now the TLF is a BetaVersion.

  • Problem while downloading data to text file using GUI_DOWNLOAD FM

    Hi,
    When we download the data using the GUI_DOWNLOAD FM into the text file tab delimeted(table is built dynamically),
    Its coming in this format as shown below
    Field1  Fileld2  Field3
    1     2      3
    However I want it in this way
    Field1  Fileld2  Field3
    1          2         3
    Could someone please let me know how to achieve this?

    Do something like this:
    concatenate field1 field2 field3 into lv_outx "(data of sufficient length, type c)
    separated by gc_tab.  "Horizontal tab constant created as note above
    condense lv_outx no-gaps.  "squeeze out extraneous spaces but beware if you have text with spaces...drop the no-gaps.
    append lv_outx to my_internal_table.  "table with a single field type char, sufficient length
    open dataset  datasetname...
    loop at my_internal_table into ls_internaltabstructure.
      transfer internaltabstructure-outx to datasetName [length if needed].
    endloop.

  • Downloading two different text files using gui_download

    Hi Folks,
    I have two internal tables.itab1 and itab2.Generally in  most cases I have to download only the data in itab1 as a text file using Gui_download.In some cases if a particular condition is satisfied I need to download both itab1 and itab2 data as two different text files using gui_download.To achieve this I had called the gui_download twice as I have to pass two different internal tables.
    But I am getting only itab1 textfile and not itab2 textfile.
    In the selection screen I am giving the path as c:\..
    Kindly let me know where I am going wrong.
    K.Kiran.

    Hi
    You keep the both files in a ITAB and in the loop of that Itab use GUI_DOWNLOAD to download the two files
    data: begin of itab,
              file like rlgrap-filename,
            end of itab.
    In initialization event
    put the two files into this ITAB.
    loop at itab
    call function gui_download.
    endloop.
    check like this
    Regards
    Anji

  • How to download a text file using classes

    Hi Guys
    I want to download a text file using classes.
    Any idea how to do it ?
    Thanks
    Sameer

    HI sameer,
       It is no different from using a Function module.
    example:
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                  = w_fpath
        append                    = SPACE
          write_field_separator     = 'X'
        CHANGING
          data_tab                  = it_download
        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
    Regards,
    ravi

  • Headings not downloaded using GUI_DOWNLOAD, used DBF as a file type

    Hello,
                 I have used the function module to download the data into an excel file using GUI_DOWNLOAD FM.
    I have given the file type as 'DBF', because if I give DAT type then the data for the amount not downloading properly.
    and preceeding zero's are not dowloaded properly. Hence used DBF.
    But when I use DBF file type , the header texts are not downloaded properly.
    CALL FUNCTION GUI_DOWNLOAD
        EXPORTING
          filename                       = lw_file
         filetype                        = DBF
       TABLES
          data_tab                      = t_output
        fieldnames                      = t_head
    fill the header texts for all the fields
    TYPES: BEGIN OF ty_head,
                   name(24),
      END OF ty_head.
    data:  wa_head TYPE ty_head,
           t_output TYPE STANDARD TABLE OF ty_output,
    wa_head-name = text-t01.
      condense wa_head-name.
      APPEND wa_head TO t_head.
        CLEAR wa_head.
      wa_head-name = text-t02.
      APPEND wa_head TO t_head.
      CLEAR wa_head.
      wa_head-name = text-t03.
      APPEND wa_head TO t_head.
      CLEAR wa_head.
    This is the code I have used...but the text is not displaying fully in the file.
    If I use DAT, then data will be wrong in some cases.(like zeros.amount in decimals).
    Thanks,
    AV

    HI,
    I suggest prepare the data in the internal table t_output as per your requirement first so as to avoid the data anomaly & then you can happily used DAT.
    Regards
    Abhii...

Maybe you are looking for

  • Photoshop Elements continues to crash upon opening - please help

    I continue to get the message that the program must close down two seconds after I open it.  I held down shift when I clicked on organizer and the management screen came up.  I repaired, I optimized and the program continues to show down after two se

  • Problems inserting huge ammount of lines in a table

    Dear all: I have a process that reads data from one table (table A), makes some calculations and writes the modified data into another table (table B). For each line on table A the process will write from 1 to 4 lines in table B. The calculation is V

  • Updating Native Applications

    I know that the update framework is not supposed to work with native applications, but is it possible to update a native Adobe AIR application using a .air file? This is based on the assumption that .air files are basically archive files and that the

  • Diminished resolution using DVI Adapter

    Had to buy a Mini DisplayPort to DVI Adapter for my new MacBook Pro. My previous MacBook Pro had a DVI port. As soon as I started using the Apple Cinema Display (Aluminum version), I can see the the resolution is lower/diminished. Why should this be?

  • All about EA4500

    Hello I want to buy EA4500. I have got a lot of questions. 1. Does it have download manager with torrent and http support? 2. Does it have VPN function, VPN Server for Remote income connections and VPN client for LANtoLAN connect? 3. Does it have VLA