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

Change text Language programitaclly!!

Former Member
0 Likes
721

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

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
550

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.

Read only

0 Likes
550

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

Read only

0 Likes
550

idea dropped. no solution to it.

Read only

peter_ruiz2
Active Contributor
0 Likes
550

hi,

you can check this link for the solution.

[]

regards,

Peter