Skip to Content
0

# Restriction on characteristics

Sep 24, 2017 at 09:38 AM

92

Former Member

I'm probably using the wrong terminology here, but here goes:

I understand how you 'assign' a value to a characteristic through something like:

\$SELF.CHAR_NAME=’value’ IF CHAR_NAME_A=’x’

BUT is there a way to restrict the values a characteristic can take on?

For instance:

if CHAR_NAME_A is 2, CHAR_NAME may only be set to 1, 2, or 3.
If CHAR_NAME_A is 1, CHAR_NAME can be 1, 2, 3, 4, or 5.

I hope this makes sense.

Using the motorcycle example that appears online that has a couple of different colors and 3 engine sizes, the analogy to our application would be that we wish to limit choices to 2 engine sizes if you order a red bike, but allow all three engines if someone orders a black bike.

Thanks

Jeff

* Please Login or Register to Answer, Follow or Comment.

### 1 Answer

Keyur Mistry Sep 25, 2017 at 03:21 PM
1

You can achieve the expected result through the constrain.

Restriction:

\$SELF.CHAR_NAME IN (1, 2, 3) IF

\$SELF.CHAR_NAME_A = 2,

\$SELF.CHAR_NAME IN (1, 2, 3, 4, 5) IF

\$SELF.CHAR_NAME_A = 1

Reference Document below

### Constraints: Restricting the Allowed Values

https://help.sap.com/saphelp_erp60_sp/helpdata/en/38/63b6531de6b64ce10000000a174cb4/frameset.htm

Show 5 Share
Former Member

Thanks Keyur! I'll be giving this a try shortly.

Jeff

Former Member

Hi Keyur

I think I'm going to need a bit more help/clarification in getting this to work.

Here's what I have entered:

RESTRICTIONS:
\$SELF.RELAY_COMMUNICATIONS IN ('0', '1', '2')
IF \$SELF.RELAYS_MODEM = '1',
\$SELF.RELAY_COMMUNICATIONS IN ('0', '1', '2', '4', '5', '6')
IF \$SELF.RELAYS_MODEM = '0'

A syntax check is returning the following: E28024 Syntax error in sample action/procedure

Your example is a little different from that in the doc you reference. So I tried a few different variations to no avail. Additional google searches talk about an Enhanced Dependency Editor. I don't know if this is something different from what we have or need to be licensed for? I attempting this with the CU01 tc using the Dependency Editor with a Procedure dependency type.

thanks

Jeff

Former Member

You have to use Net Dependency CU21 nd under that constrain need to be created.

This Cstics (RELAY_COMMUNICATIONS) must be restrictable, when you use it for constrain.

Suggestion: To keep maintenance easy mostly use Constrin other than other OD.

Former Member

Disregard this request as I figured out how to accomplish what I require thru a precondition applied to characteristic values.

thanks

Former Member

To many precondition affect the mintence and in long term chance to become complex VC model.