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

Translate

Former Member
0 Likes
886

When I use translate statement in my report of course it is executing well..when I checked extended syntax check it is giving “Dangerous use of TRANSLATE in a multilingual system.”..can anyone suggest any other method for it ..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
854

use the below.

SET LOCALE LANGUAGE sy-langu.

TRANSLATE wl_werks TO UPPER CASE.

9 REPLIES 9
Read only

Former Member
0 Likes
854

REPLACE by Pattern

Replaces strings in fields with other strings using a pattern.

Syntax

REPLACE [ FIRST OCCURENCE OF | ALL OCCURENCES OF ] <old>

IN [ SECTION OFFSET <off> LENGTH <len> OF ] <text> WITH <new>

[IGNORING CASE|RESPECTING CASE]

[IN BYTE MODE|IN CHARACTER MODE]

[REPLACEMENT COUNT <c>]

[REPLACEMENT OFFSET <r>]

[REPLACEMENT LENGTH <l>].

Read only

Former Member
0 Likes
854

Hi,

The warning is only applicable if you are using TRANSLATE on the content which could be of any language apart from English.

If the variable for which you are using TRANSLATE will only hold ENGLISH values, then please ignore the warning.

Best regards,

Prashant

Read only

Former Member
0 Likes
855

use the below.

SET LOCALE LANGUAGE sy-langu.

TRANSLATE wl_werks TO UPPER CASE.

Read only

0 Likes
854

can u explain what is the use of " SET LOCALE LANGUAGE sy-langu."

Read only

0 Likes
854

SET LOCALE LANGUAGE sy-langu.

it will run accordingly to the system language...

if ur logon languae is other than 'EN'...it works perfectly for those languages also...

Ramesh

Read only

0 Likes
854

Is it just like global declaration??? can i use it inside the loop?? or in the global/local declaration???

Read only

Former Member
0 Likes
854

Before translating to upper or lower case letters, the system has to be set to the current text environment.

This statement is used for this purpose

Read only

Former Member
0 Likes
854

Hi,

You can use locally in your form

set local language sy-langu

translate ---

Regards

Amole

Read only

Former Member
0 Likes
854

hi,

You can set the language even inside a loop.

As soon as you set the language, it applies to the program.

It is better to set before the loop starts, instead of setting it for every loop pass.

Regards,

Sailaja.