‎2008 Jan 25 10:10 AM
This is my code.
if sy-subrc = 0.
message 'Data is Deleted Successfully' type 'S'.
clear zesi.
endif.
Am getting error message like
Char. strings w/o text elements will not be translated:
''Data is Deleted Successfully'' in code inspector
What is wrong in my code.
Regards,
Prajwal K.
‎2008 Jan 25 10:14 AM
Hi
just there your writing the message as a hardcoded so that is showing that error
in SAP , allways SAP recomends to don'f use hardcoded messages
just define a text element like this
message text-001 type 's'.
double click on text-001 and write the message what ever you want there and activate it
thats all
‎2008 Jan 25 10:12 AM
HI
Just put your text in the text elements T01
and then instead of your code put that Text element
reward points if helpful
Regards
hitesh
‎2008 Jan 25 10:14 AM
Hi
just there your writing the message as a hardcoded so that is showing that error
in SAP , allways SAP recomends to don'f use hardcoded messages
just define a text element like this
message text-001 type 's'.
double click on text-001 and write the message what ever you want there and activate it
thats all
‎2008 Jan 25 10:29 AM
hi Naresh thanks a lot.
please tell me what happenes if i hardcode message. am getting same output.
‎2008 Jan 25 7:34 PM
Nothing happens if you hardcode a text. It's just a recomendation that you shouldn't hardcode them to have them all together in the text definitions and to change those texts more easily and keeping integrity. For example, if you use the same hardcode in 2 different parts of the program and then you are asked to change it, you may forget it's duplicated and only change it once. That error can easily pass though testing and get to Production. However if you have a repository of texts, you only have to change it once. It's like constants...
Regards,
Pablo
‎2008 Jan 25 10:15 AM
‎2008 Jan 25 10:15 AM
the problem is that you hardcoded your text and hardcoded text cannot be translated. You have to do:
message text-001 type 'S'.
text-001 will be a text symbol, which can be translated and the error won't be displayed in Code inspector.
hope this helps
ec
‎2008 Jan 25 10:16 AM
Hi,
Define text element as
text-001 = 'Data is Deleted Successfully'. save & activate.
if sy-subrc = 0.
message text-001 type 'S'.
clear zesi.
endif.
hope this will help.
Thanks,
Anil.G
‎2008 Jan 25 10:22 AM
Hi,
Just declare a message class as given below in the REPORT command.
REPORT z10_test
NO STANDARD PAGE HEADING
MESSAGE-ID z10_material
LINE-COUNT 0(2).
if sy-subrc = 0.
message S050.
clear zesi.
endif.
Activate the code and check in the CODE INSPECTOR you will not get the error.
Because the MESSAGE-ID Z10_MATERIAL will now maintain the language.Here, if the user dont want the message to be displayed in ENGLISH then he/she can change the language in MESSAGE-ID Z10_MATERIAL .
Hope this helps.