We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-dev] SLIN (Extend Check Syntax) Warnings About Constant Declaration in ABAP Program

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from TerryB on Feb 21 at 12:42 PM
Jean,

The simplest way to deal with this is probably to use a variable instead of a constant and assign the value of the text element to it, like this:
DATA d_blah TYPE text10.
d_blah = text-001.
Of course, if this value is used only for internal program control then you probably don't have to worry about translation, as long as you can justify suppressing the SLIN warning.

Cheers,
Terry

---------------Original Message---------------
From: Jean Sagi
Sent: Tuesday, February 21, 2012 11:18 AM
Subject: SLIN (Extend Check Syntax) Warnings About Constant Declaration in ABAP Program

Hi all,

SLIN warns "Char. strings w/o text elements will not be translated" this code:

constants tipane_general type string value 'General'.

I tried to change the above line this way:

1. constants tipane_general type string value 'General'(100).
This gives syntax error "Offset or length specifications are not allowed".
The idea was to define a text element but the compiler interprets (100) not that way.
BTW, A variable assignment works fine this way.

2. constants typane_general type string value text-t50.
This gives syntax error "Field "text-t50" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement".
This way of trying to declare a text element for the constant also don't work.

So after much trying/googling I can't think a way to solve this.
Of course any light on this would be higly appreciated.


Kind regards,


J.

PD: I used "#EC NOTEXT to supress the alerts and it worked but I don't want to cheat SLIN thisway.

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
TerryB  
Senior SAP Developer
achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Become a blogger at Toolbox.com and share your expertise with the community. Start today.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language