on 10-21-2005 7:21 AM
Hi Guys,
Just i am a beginner.
if we do hard coding in program like.
<b>write : 'program successful'.</b>
is it necessary to put this statement in a text elment?
like <b>write: text-001.</b>
Is this mandatory?
IF we use text element what is the advantage?
Thanks for ur help in advance.
RAJA.
not mandatory...
but it is recommended that you use text-symbols...
reason being SAP programs can be run on different languages other than english...so when u choose a different language...you might need a translation of the text appearing on screens....
if you dont use text elements, there will be no translation while in text elements you can translate text elements for different languages.
rgds,
PJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Raja,
In the example you have given, it is more suitable to use a Text Element (for the reasons that everyone has told you). However, if you are going to hard code something for a SELECT statement, it is bretter to use a constant:
eg.
SELECT matnr werks
from marc
where matnr = '12345' and
werks = 'ABCD'.
should be written as:
constants: c_matnr like mara-matnr value '12345',
c_werks like marc-werks value 'ABCD'.
SELECT matnr werks
from marc
where matnr = c_matnr and
werks = c_werks.
This is better practice because if you latwer want to change these constants they are all located in the one spot. Imagine having dozens of SELECT statements, and all of a sudden instead of hittingplant 'ABCD' you need them to hit plant 'EFGH'.
Hope this helps.
Cheers,
Pat.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja,
It is not mandatory to use text element.
Text elements allow you to create language-independent programs. Any text that the program sends to the screen can be stored as a text element in a text pool. Different text pools can be created for different languages. When a text element is changed or translated, there is no need to change the actual program code. Text elements in an ABAP program are stored in the ABAP Editor.
Regards,
Sriram.
Message was edited by: sriram Ponna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
eventhough it's not mandatory , it is always advisable by using text-001
when you define the string using text element it can be easy for translating ( suppose you want to translate to germen lanuage for the same text ) then it will take care by translate procedure
cheers,
sasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HY,
IT'S NOT MANDATORY TOO USE TEXT ELEMENTS,
BUT WHEN U DO EXTENDED CHECK AT TAHT TIME, HTE HARD CODED COMES IN PICTURE.
SO BETTER USE TEXT ELEMENTS.
REGARDS,
KARTIKEY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.