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 Statement

Former Member
0 Likes
1,311

Hi Experts,

I am in up gradation project from 4.6c to ECC 6.0.

Iam using the translate statement like

Translate wa_hrp1000-stext to upper case.

It is Obsolete Statement In ECC 6.0.

Please give the alternative statement of Translate in ECC 6.0

Please help me in this regard.

Thanks in advance

Sai

6 REPLIES 6
Read only

Former Member
0 Likes
751

Hi,

check with below thread

As new SAP systems are made Unicode enabled, there was an issue with translations done using ABAP code. Issue was with any Programs that uses TRANSLATE <string> TO UPPERCASE statement in a multi lingual environment. You might get a warning as dangerous use of TRANSLATE in Multi lingual environment. For this either we can use SET LOCALE LANGUAGE language, before the statement or use the Function Module AIPC_CONVERT_TO_UPPERCASE with the language parameter.

Hope this will help.

Regards,

Nitin.

Read only

Former Member
0 Likes
751

Hi Sai,

There is no alternative for the Translate statement.

All that you have to do is add this statement before every TRANSLATE stmt:

SET LOCALE LANGUAGE SY-LANGU.

I think you will be seeing this TRANSLATE in Internationalization errors in EPC,

It will be saying Dangerous use of TRANSLATE. Right.

In that case add the above statement before every TRANSLATE stmt.

The Error will be removed.

Please let me know if you need any further info.

Thanks,

Sai

Read only

Former Member
0 Likes
751

Hi Sai,

Take the help of KEY word documentation, this is better than any other solution

Regards

Ramchander Rao.K

Read only

Former Member
0 Likes
751

Hi

Use this function module

TERM_TRANSLATE_TO_UPPER_CASE

CALL FUNCTION 'TERM_TRANSLATE_TO_UPPER_CASE'

EXPORTING

  • LANGU = SY-LANGU

TEXT = wa_hrp1000-stext

  • IMPORTING

  • TEXT_UC = wa_hrp1000-stext

  • EXCEPTIONS

  • NO_LOCALE_AVAILABLE = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Make shure the paramaters u pass shd be of character type.

if not move tht field into local variable of charcter type and pass the field

u will get

Regards

Edited by: Rasheed salman on Dec 2, 2008 11:43 AM

Edited by: Rasheed salman on Dec 2, 2008 11:44 AM

Read only

Former Member
0 Likes
751

Thank you friends

Read only

Former Member
0 Likes
751

Hi Sai Babu,

Translate is not fully obsolete its like use of translate not recommended with P, F, I, CURR, QUAN TYPES, TRANSLATE CODE PAGE / NUMBER FORMAT NOT ALLOWED.

With luck,

Pritam.