cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Constraint Questions

rob_edwards2
Explorer
0 Kudos

Hi All,

            Just started looking / trying to create constraints & have some (probably very) basic questions.

1,

     In the object section when you are declaring a class, I get an error when trying to use the following..

objects:

ngl is_a(300) 07930

  ...the error messages i get are...

'E28065 Syntax error in class entry: expression required in form <(...)...>

E28025 Syntax error in constraint'

  If I change the declaration to...

objects:

ngl is_a(300) TEST_7931

  ...all is fine.

  From this I'm assuming that you can not set a class that is numeric within a constraint. Yes / No? Is there a way to do so?

2,

     If you use a restriction to set a value in a characteristic from a range of pre-defined values, i.e...

restriction:

ngl.C7900_GAS_MEASURMENT_01 = 'N'

  ...is it then possible to be able to override this manually with one of the other values, as you are creating the config. Seems to block any other value from being selected.

3,

     Can not seem to use NOT SPECIFIED? Is that correct, if so is there another way.

  Please ignore that anything is simple & therefore there are easier ways to do, just trying to understand constraints .

  Thanks in advance.

    Rob.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hey Rob,

I also face same issue some time back...got solutions for your quries...intresting one though

1)

  From this I'm assuming that you can not set a class that is numeric within a constraint. Yes / No? Is there a way to do so?

Yes you can use number class in OBJECTS part of constraint but with "skey"

Like I've created a class with number:07930 attached screen shots for ref..

wrote a dep net for class:

OBJECTS:

X IS_A(300)SKEY'07930'

                                                                       

RESTRICTIONS:

                                                                       

X.ID_CARD = 'CARD WITH PHOTO AND NAME'

                                                                       

INFERENCES:

X.ID_CARD

It works succesfully....

2) We cant overwrite the value set by Constraint manually,

3) Non declarative syntax can not be used in Constraints

go through the link:

http://help.sap.com/saphelp_470/helpdata/EN/92/58c31f417011d189ec0000e81ddfac/content.htm

rob_edwards2
Explorer
0 Kudos

Rahul,

               Thaks for the information.

The fact that you can use numeric classes by using the SKEY is excellent. All our existing classes are numeric, & I thought I would not be able to use constraints on these (without creating new of course).

Thanks for the other points as well.

Answers (1)

Answers (1)

syerazvi
Participant
0 Kudos

Hi Rahul/Rob,

I am getting the attached error if i use a SKEY, my class has a hyphen (please see attached)

E28102 Variable declaration for object expected

E28025 Syntax error in constraintsyntax-error.png

Please kindly advise