on 08-07-2013 6:24 AM
Hi All,
Can anyone tell me the exact procedure to download the Japanese characters into excel in ABAP WEBDYNPRO. Highly appreciate your feedback.
I have got the answer, we need to pass MIME TYPE 'APPLICATION/MSEXCEL; charset=utf-16le' and add 'FFFE' in starting of hexadecimal output that we get after processing function module SCMS_STRING_TO_XSTRING
code is as below:
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = text
mimetype = lv_mimetype
* encoding = lv_encoding
IMPORTING
buffer = lv_report_xstr
EXCEPTIONS
failed = 1
OTHERS = 2.
IF sy-subrc = 0.
CONCATENATE cl_abap_char_utilities=>byte_order_mark_little
lv_report_xstr
INTO lv_report_xstr IN BYTE MODE.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi katrice,
Thanks for your response, though i had already read the link that you have provided before posting my question on SCN.
In the link, they have discussed a temporary solution where user has to go to three manual steps to see the japanese characters.
Also, in SAP ABAP(not webdynpro) Its easily possible by passing encoding 4103 and file type ASC to FM GUI_DOWNLOAD.
I need this solution in webdynpro ABAP. I have tried passing different encoding but with no success. Any help or suggestion will be highly appreciated.
Anyways thanks once again Katrice.
PS: My code is pasted below
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
text = lv_report_str
encoding = lv_encode
IMPORTING
buffer = lv_report_xstr.
cl_wd_runtime_services=>attach_file_to_response( i_filename = lv_filename
i_content = lv_report_xstr
i_mime_type = 'EXCEL' ).
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.