Skip to Content
avatar image
Former Member

Exporting Arabic text to Excel from WebDynpro ABAP not working


I am using a WD Table UI element and toolbar button to export data to excel. When exporting Arabic text, the cells of excel displays garbage value. Please find the below snippet of the code used to export Arabic text to excel. The below code works perfectly when exporting English text. Kindly suggest if there are any option to achieve the same. Also attached table screenshot FYR..

Also note: The Export to Excel works fine even with Arabic text when using WD ALV Table. But I need this functionality  onclick of webdynpro table toolbar button.

CONCATENATE l_xls  <fs_result_item>  cl_abap_char_utilities=>horizontal_tab INTO l_xls.

* fill the file content

   lh_conv_out = cl_abap_conv_out_ce=>create( encoding  = '4103' ).



       data      = l_xls


       buffer = l_xls_x ).

   l_filename = wd_assist->if_wd_component_assistance~get_text( '012' ).

   CALL METHOD cl_wd_runtime_services=>attach_file_to_response


       i_filename      = l_filename

       i_content       = l_xls_x

*     i_mime_type     = 'application/'

       i_mime_type     = 'APPLICATION/MSEXCEL; charset=UTF-16LE'

       i_in_new_window = abap_false

       i_inplace       = abap_true.

Any suggestions?

Kind Regards,


File.JPG (27.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Oct 28, 2015 at 09:16 PM

    Instead of table UI element , create an ALV ( SALV_WD_Table)and export functionality comes by default .

    Which would handle all the functionality you need with out you having to do anything.

    Check for examples in google.


    Add comment
    10|10000 characters needed characters exceeded