‎2007 Jul 18 12:38 PM
hello SDN,
I have a very specific requirement for which i have no clue how to go about it?
I have a text field in a z table which will be maintained by users of different countries in thier local language.
My requirement is to translate this text into english and create another entry through the program for all entries.
how can i translate? for ex:- german to english?, any FM available in standard??
Thanks
Pankaj
‎2007 Jul 18 1:01 PM
Try this -
use the following class
cl_abap_conv_obj. Method Convert should be used. Use the following FM to get the codepage number for any langauge.
SCP_CODEPAGE_FOR_LANGUAGE.
~ As foind in forum.
Regards,
Amit
Reward all helpful replies.
‎2007 Jul 18 1:32 PM
i wrote a small prgm and it looks like doesn´t work i may be wrong if so please correct me. Also the FM SCP_CODEPAGE_FOR_LANGUAGE give german and english the codepage 1100....
REPORT ZTEST .
DATA OUT TYPE STRING.
DATA C TYPE REF TO CL_ABAP_CONV_OBJ.
CREATE OBJECT C
EXPORTING
INCODE = '1100'
OUTCODE = '1900'
MISS = '.'
BROKEN = '.'
FILL = ' '
FILTER = ' '
USE_F1 = ' '
CTRLCODE = 'T'
SAPOWNCH = 'T'
SUBSTC = '00035'
DROP = 'M'
EXCEPTIONS
INVALID_CODEPAGE = 1
INTERNAL_ERROR = 2
others = 3
.
CALL METHOD C->CONVERT
EXPORTING
INBUFF = 'HAPPY'
INBUFFLG = '20'
OUTBUFFLG = '20'
IMPORTING
OUTBUFF = OUT
INUSED =
OUTUSED =
SUBSTED =
INPUT_ENDS_IN_CHAR =
OUTBUFF_TOO_SHORT =
EXCEPTIONS
INTERNAL_ERROR = 1
others = 2
.
WRITE OUT.
Thanks
Pankaj
‎2008 Apr 15 9:58 AM
‎2008 Apr 15 10:13 AM