07-30-2013 8:23 AM
Hello Experts,
My question is regarding the "Character Strings" check of Extended Syntax Check (SLIN).
Say you have a code like:
DATA: GW_VAR(20) TYPE C.
GW_VAR = 'X'.
When you check this on SLIN (make sure that the "Character Strings" checkbox is checked), SLIN will not report anything to be corrected under the aspect - "Character Strings".
On the other hand, if I have:
DATA: GW_VAR(20) TYPE C.
GW_VAR = 'Hello World'.
Now, SLIN says that "Character Strings without text elements will not be translated". So I am prompted to save the literal - 'Hello World' as a Text Symbol.
But if I have something like:
GW_VAR = 'HelloWorld' Now SLIN does NOT prompt me to save 'HelloWorld' in the Text Pool.
So my question is - How does SLIN decide if a literal is to be saved in the text pool? What is the criteria it uses?
Thanks for your time and effort.
07-30-2013 10:49 AM
If you click on Info button in SLIN entry, documentation will show up that details what logic is used.
The check examines all chararacter strings without text elements that could be displayed - this includes the VALUE specifications for fields and constants for which direct specification of a text element is not permitted. The character strings are checked for texts that need to be translated using the following criteria:
- The character string is longer than three characters.
- The character string contains at least one uppercase and lowercase character.
- If the character string consists of only one word, an uppercase letter can only be at the start of this word
- Workflow macro names (words that begin with 'SWC_') are ignored. Strings that are clearly not meant for output, for example, FORM names or strigs in conditions, are not taken into account.
07-30-2013 8:31 AM
Hi,
I think as long as it is not more that one word indicating a single word rather than a string of words that the criteria checked by SLIN.
Cheers,
Arindam
07-30-2013 8:34 AM
Hi,
maybe the 'HelloWord' is a value not a text for SLIN, because of missing space, like 'X'.
There is not sense to put a value in text element ..
I'm doing like this to go fast :
GW_VAR = 'Hello Word'(T01).
I have not to create the text element until the program is translate .. and if I need to translate the program, I have only to create the text element by double-click
regards
Fred
07-30-2013 10:49 AM
If you click on Info button in SLIN entry, documentation will show up that details what logic is used.
The check examines all chararacter strings without text elements that could be displayed - this includes the VALUE specifications for fields and constants for which direct specification of a text element is not permitted. The character strings are checked for texts that need to be translated using the following criteria:
- The character string is longer than three characters.
- The character string contains at least one uppercase and lowercase character.
- If the character string consists of only one word, an uppercase letter can only be at the start of this word
- Workflow macro names (words that begin with 'SWC_') are ignored. Strings that are clearly not meant for output, for example, FORM names or strigs in conditions, are not taken into account.
07-30-2013 10:55 AM