‎2019 Mar 01 3:39 PM
Hi all,
i am downloading different lanaguages vendor data by using class cl_bcs into excel sheet . but excel sheet shows
different format data which not actually. if i am download Chinese vendor data... its not showing in chinese language its showing in different format. can any one help me on this.
iam using below FM's for string to xstring and xsting to binary.
'HR_KR_STRING_TO_XSTRING' SPAN
'SCMS_XSTRING_TO_BINARY'
iam folling below code
https://www.sapnuts.com/tutorials/Sending-email-with-attachment-in-SAP-ABAP/singlepage.html
‎2019 Mar 01 4:03 PM
If your Excel file is CSV format, then add the Byte Order Mark (BOM) for UTF-16LE :
TRY.
l_xstring = cl_bcs_convert=>string_to_xstring(
EXPORTING
iv_string = l_string
iv_codepage = '4103' " UTF-16LE
iv_add_bom = abap_true ).
CATCH cx_bcs.
" handle the error
ENDTRY.UTF-16LE is correctly handled by Microsoft Excel historically (better than UTF-8 and UTF-16BE).
‎2019 Mar 04 10:32 AM
thanks Roosi,
String_to_solix method working for my scanario.
‎2019 Mar 03 11:01 AM
Use the below code,
TRY.
cl_bcs_convert=>string_to_solix(
EXPORTING
iv_string = l_line
iv_codepage = '4103' "suitable for MS Excel, leave empty
iv_add_bom = 'X' "for other doc types
IMPORTING
et_solix = gt_binary_content
ev_size = gv_size ).
CATCH cx_bcs.
MESSAGE e445(so).
ENDTRY.
‎2019 Mar 04 10:31 AM
Thanks Solomon,
its working for me.. thanks lot.