2007 Oct 26 7:14 PM
Please Look at a UNICODE issue.
Problem at hand is :
Translate the Danish and Norweigan special characters. These are the *
special characters used by Denmark and Norway that SAP does not *
translate via ASC_TO_EBC to what is needed on the target system. *
SAP, ASCII, ASC_TO_EBC, Need,
æ, E6 , 9C, C0,
ø , F8, 70, 6A,
å , E5, 47, D0 ,
Æ C6, 9E , 7B ,
Ø, D8, 80, 7C ,
Å , C5, 67, 5B ,
Ä , C4, 4A, 63 ,
ä , E4, C0, 43 ,
Ö, D6, E0 , EC,
ö , F6, 6A, CC,
Ü, DC, 5A, FC,
ü, FC, D0, A1,
*----
*
FORM DANISH_NORWEGIAN_SPECIAL_CHARS.
DATA SPC(24) TYPE X
VALUE '9CC0706A47D09E7B807C675B4A63C043E0EC6ACC5AFCD0A1'.
TRANSLATE TEXT_STRING USING: ASC_TO_EBC, SPC.
ENDFORM.
Can anyone please let me know how can I convert this code to be Unicode compliant.
Please Help.
Please Look at a UNICODE issue.
Problem at hand is :
Translate the Danish and Norweigan special characters. These are the *
special characters used by Denmark and Norway that SAP does not *
translate via ASC_TO_EBC to what is needed on the target system. *
SAP, ASCII, ASC_TO_EBC, Need,
æ, E6 , 9C, C0,
ø , F8, 70, 6A,
å , E5, 47, D0 ,
Æ C6, 9E , 7B ,
Ø, D8, 80, 7C ,
Å , C5, 67, 5B ,
Ä , C4, 4A, 63 ,
ä , E4, C0, 43 ,
Ö, D6, E0 , EC,
ö , F6, 6A, CC,
Ü, DC, 5A, FC,
ü, FC, D0, A1,
*----
*
FORM DANISH_NORWEGIAN_SPECIAL_CHARS.
DATA SPC(24) TYPE X
VALUE '9CC0706A47D09E7B807C675B4A63C043E0EC6ACC5AFCD0A1'.
TRANSLATE TEXT_STRING USING: ASC_TO_EBC, SPC.
ENDFORM.
Can anyone please let me know how can I convert this code to be Unicode compliant.
Please Help.
2007 Oct 26 7:33 PM
Hi,
In the Unicode context, TRANSLATE... CODEPAGE/NUMBER FORMAT is not allowed.
This is used to translate a string from one code page (1100) to another before transferring to an output file. Instead of using the TRANSLATE statement for this, use the LEGACY TEXT MODE CODE PAGE 'xxxx'
a®
2007 Oct 27 7:14 AM
Hi a®s,
yes, the TRANSLATE statement is not allowed in Unicode statement. But some how I need to make changes to the program, so that the effect will be same.
Here translation of text using ASC_TO_EBC is ok, it can be used with existing code page.
But the statement "TRANSLATE TEXT_STRING USING SPC." is different, where SPC is of type X and has the value
'9CC0706A47D09E7B807C675B4A63C043E0EC6ACC5AFCD0A1'
where after translation '9C' is replaced with 'C0', '70' is replaced with '6A', '47' with 'D0', '9E' with '7B' and so on. This is specific to this requirement. you can not find it in any Code page. But some how this process of translation has to be made Unicode compliant.
If anybody could solve this issue, I would be thankful, and of course, will be rewarded..!!!
2013 Apr 04 9:52 PM
Hi
For translation of text using ASC_TO_EBC structure that has fields that contain type X value ,we can directly convert the hexadecimal structure to character string by declaring a type stringand using call method.
CALL METHOD CL_ABAP_CONTAINER_UTILITIES=>FILL_CONTAINER_C
EXPORTING
IM_VALUE = ASC_TO_EBC
IMPORTING
EX_CONTAINER = LF_STRING
then use the string in place of .ASC_TO_EBC in Translate statement .
Hope it will helpful .
Regards
Divya
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |