‎2008 Dec 02 10:34 AM
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
‎2008 Dec 02 10:37 AM
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.
‎2008 Dec 02 10:37 AM
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
‎2008 Dec 02 10:39 AM
Hi Sai,
Take the help of KEY word documentation, this is better than any other solution
Regards
Ramchander Rao.K
‎2008 Dec 02 10:40 AM
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
‎2008 Dec 02 10:49 AM
‎2008 Dec 02 10:53 AM
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.