Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error cx_sy_conversion _codepage

Former Member
0 Likes
563

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

2 REPLIES 2
Read only

Former Member
0 Likes
432

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

Read only

Former Member
0 Likes
432

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?