ā2009 Sep 17 3:46 AM
I need to transfer SAP table data to external Oracle database, but our SAP system codepage is unicode, our external Oracel database codepage is 8300.
Sometimes user Keyed string is not codepage 8300, when I transfer these data to external Oracle databaseļ¼All String will be change to '?'.
So I want to get these data and convert to 8300 coagepage string,
example : 'Machine ć - 100' change to 'Machine ? - 100'
Are there any ways to convert?
Best regards,
Eric
ā2009 Sep 17 4:02 AM
Hi
Below is the syntax
TRANSLATE l_line FROM CODE PAGE '1500' TO CODE PAGE '1101'.
But this will not workin ECC6 .
Regards
Vinay
Edited by: vinay kolla on Sep 17, 2009 5:03 AM
ā2009 Sep 17 4:11 AM
ā2009 Sep 18 1:46 AM
Hi Vinay,
Our system is ECC 6.0.
I have to refer to document and tried to write some convert program as bellow, but result is not correct.
-
REPORT CONVERT_4110_TO_8300.
DATA : S4110(10) TYPE C.
DATA : LEN TYPE I.
DATA : S8300 TYPE STRING.
DATA : CVTI_8300 TYPE REF TO CL_ABAP_CONV_IN_CE.
FIELD-SYMBOLS : <VALUE> TYPE X.
S4110 = 'AćB'.
ASSIGN S4110 TO <VALUE> CASTING.
CVTI_8300 = CL_ABAP_CONV_IN_CE=>CREATE( ENCODING = '8300' INPUT = <VALUE> replacement = '*' IGNORE_CERR = 'X' ).
CALL METHOD CVTI_8300->READ
IMPORTING
DATA = S8300
LEN = LEN
EXCEPTIONS OTHERS = 1.
WRITE S8300.
-
result : #A0K#B# # # # # # # (I want to change 'AćB' to 'A*B')
How should I change the code to convert 'AćB' to 'A*B'?
Is there any function like ćFUNCTION 'GUI_DOWNLOAD' parameter 'REPLACEMENT'ć or ćOPEN DATASET ... IGNORING CONVERSION ERRORS REPLACEMENT CHARACTER "rc"ć, the statement can replacement conversoin error character to user assign character (REPLACEMENT parameter).