‎2009 Dec 29 12:43 PM
Hi All,
We have copied code page 1100 and created a new code page .
LATIN CAPITAL LETTER Z WITH CARON (Ž) U+017D has been added to the new segment.
We are writing file on the application server.
The abap statement used is
OPEN DATASET lv_string FOR OUTPUT IN LEGACY TEXT MODE CODE PAGE P_CODE MESSAGE lv_message.
The issue is that in quality system I am able to write data which contains Ž
but in production system it raises an exception cx_sy_conversion_codepage.
Please suggest what can be done to resolve it.
Best Regards
Shraddha
‎2009 Dec 29 1:10 PM
Hi ,
Try opening the dataset in TEXt mode encoding default.this normally works.
e.g. OPEN DATASET p_out FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
or
try to retreive the code page of the frontend system using FM NLS_GET_FRONTEND_CP and then do as follows
OPEN DATASET p_out FOR OUTPUT IN LEGACY TEXT MODE CODE PAGE gf_cp IGNORING CONVERSION ERRORS REPLACEMENT CHARACTER '#'.
or lastly
you catch the execption using try and end try.
eg.
DATA: g_oref TYPE REF TO cx_root.
TRY.
TRANSFER g_output TO p_out.
CATCH cx_sy_conversion_codepage INTO g_oref.
g_text = g_oref->get_text( ).
ENDTRY.
good luck.
cheers,
Amber
‎2009 Dec 29 1:18 PM
Hi,
Please refer to OSS note 1179254. and read http://www.sapnet.ru/abap_docu/ABAPREAD_DATASET.htm
Is all the content in character format and is it unicode format?