Application Development 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: 

Behaviour of SLIN wrt Literals. To be or not to be saved in Text Pool?

former_member186584
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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:
  1. The character string is longer than three characters.
  2. The character string contains at least one uppercase and lowercase character.
  3. If the character string consists of only one word, an uppercase letter can only be at the start of this word
  4. 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.
4 REPLIES 4

arindam_m
Active Contributor
0 Kudos

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

FredericGirod
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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:
  1. The character string is longer than three characters.
  2. The character string contains at least one uppercase and lowercase character.
  3. If the character string consists of only one word, an uppercase letter can only be at the start of this word
  4. 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.

0 Kudos

Hi Manish,

Thank you very much.