SAP|Dependency Syntax: General Rules 相关性语法规则

4 篇文章 0 订阅

参考资料:

https://help.sap.com/doc/saphelp_aii710/7.1/en-US/d8/fa9bd49ede11d1903b0000e8a49aad/frameset.htm

Dependency Syntax: General Rules 相关性语法规则

AND

Two statements that are both either true ornot true are linked with AND. 两个同时为真或不为真的语句用AND关联。

Length = 300 and Width = 200

OR

Two statements of which at least one iseither true or not true are linked with OR. 其中至少有一条是真或非真的两条语句用OR相关联。

Color = ‘red’ or Basic_material = ‘wood’

NOT

You can negate one or more expressions byusing NOT. 可以使用NOT对一个或多个表达式求反。

NOT (Color = ‘blue’)

NOT (Color = ‘red’ and Basic_material = ‘wood’)

IF

Conditions in actions and procedures startwith IF. 条件从IF开始。

Color = 'red' if Model = ‘A’

 

Special Features

Lists

In lists, the individual elements arealways separated by commas. 在列表中,各个元素总是用逗号分隔。

COLOR = 'RED' IF MODEL = 'A',

COLOR = 'BLUE' IF MODEL = 'B',

COLOR = 'GREEN' IF MODEL = 'C',

 

Case sensitivity

In characteristic names, object variables,and operators, there is no distinction between upper case and lower caseletters. 在特征名称、对象变量和运算符中,大小写字母没有区别。

 

Concatenation

LC

All letters are converted to lower case. 所有字母都转换成小写。

Leather_saddle = LC('Alpha')

= 'a'

UC

All letters are converted to upper case. 所有字母都转换成大写。

Leather_saddle = U C('Alpha')

= 'A'

This function is important if the assignedcharacteristic does not allow lower case, but the assigned expression maycontain lower-case letters. 如果指定的特征不允许小写,但指定的表达式可能包含小写字母,则此函数很重要。

||

The string is cut off at the maximum numberof 30 characters. 字符串在最多30个字符时被截断。

Leather_saddle = Alpha || Beta

= 'AB'

 

List of Built-In Conditions内置条件列表

Implied Condition隐含条件

SPECIFIED

Characteristic has a value: 特征有一个值:

SPECIFIED COLOR

Built-In Condition SPECIFIED 指定的内置条件

https://help.sap.com/doc/saphelp_aii710/7.1/en-US/d8/fa9bd49ede11d1903b0000e8a49aad/frameset.htm

Use

You use the expression SPECIFIED in preconditions, selection conditions, or theconditional section of actions and procedures, to define that the condition isfulfilled if a characteristic has any value assigned to it. The specific valueassigned is not relevant.

使用:您可以使用“前提条件”、“选择条件”或“操作和过程”的“条件”部分中的表达式SPECIFIED,来定义如果某个特征有任何赋值,则满足该条件。指定的特定值不相关。

Example

SPECIFIED SPECIAL_PAINT

SPECIAL_PAINT SPECIFIED

If you use a condition like this as, for example, a selection conditionfor an operation in a task list, the operation is included in the task listexplosion if a value is assigned to characteristic SPECIAL_PAINT when thecondition is processed. It does not matter which value you assign to thecharacteristic.

如果使用这样的条件作为任务列表中操作的选择条件,则在处理条件时,如果为特征SPECIAL_PAINT指定了值,则该操作将包含在任务列表展开中。将哪个值指定给特征并不重要。

The negative form NOT SPECIFIED always goes before the characteristicvariable.

否定形式NOT SPECIFIED总是在特征变量之前。

Example

NOT SPECIFIED SPECIAL_PAINT

Restrictions

You cannot use NOT SPECIFIED in actions and constraints.

限制:不能在动作和约束中使用NOT SPECIFIED。

 

IN

One of these values must be set: 必须设置以下值之一:

COLOR IN (‘red’, ‘green’, ‘blue’)

Built-In Condition IN 

https://help.sap.com/doc/saphelp_aii710/7.1/en-US/d8/fa9bd49ede11d1903b0000e8a49aad/frameset.htm

Use

You can use the operator IN to define lists of values that have an ORrelationship to each other.

可以使用运算符“IN”定义相互之间具有“OR”关系的值列表。

COLOR IN (‘red’, ‘yellow’,‘green’)

If you use a condition like this as, for example, a precondition for acharacteristic, the characteristic appears if the value assigned tocharacteristic COLOR is either ‘red’, ‘yellow’, or ‘green’, or if no value isassigned to characteristic COLOR.

例如,如果使用这样的条件作为特征的先决条件,则如果分配给特征COLOR的值为“红色”、“黄色”或“绿色”,或者如果没有分配给特征COLOR的值,则会出现特征。

LENGTH IN (200, 300, 350)

If you use a condition like this as, for example, a selection conditionfor a BOM item, the item is included in the BOM explosion if the value assignedto characteristic POWER is 200, 300, or 350.

如果使用这样的条件(例如,BOM表项的选择条件),则如果指定给特征POWER的值为200、300或350,则BOM表分解中将包含该项。

Restrictions限制

Value nodes in value hierarchies are not supported in dependencies. 相关性不支持值层次结构中的值节点。

The expression Country IN ‘Europe’, where Europe isa value node with subordinate values, is not allowed in dependencies.

表达式Country IN'Europe(其中Europe是具有从属值的值节点)不允许在相关性中使用。

 

TYPE_OF

Only for certain objects: 仅适用于某些对象:

TYPE_OF ($ROOT, (Material) (300) (NR = 'U91’))

Built-In Condition TYPE_OF

https://help.sap.com/doc/saphelp_aii710/7.1/en-US/d8/fa9bd49ede11d1903b0000e8a49aad/frameset.htm

Use:You use TYPE_OF to define that the condition only applies to oneobject.

使用:您可以使用TYPE_OF来定义条件仅适用于一个对象。

You use this condition if the dependency is dependent on itsenvironment, for example, dependent on being used for a specific BOM headermaterial.

如果相关性依赖于其环境(例如,依赖于用于特定BOM表标题物料),则使用此条件。

Example

TYPE_OF($ROOT,(Material)(300)(NR=‘U91’))

If you use a condition like this as, for example, a selection conditionfor a BOM item, the item is included in the BOM explosion if the $ROOT object(header material) has material number ‘U91’.

如果使用这样的条件(例如,BOM表项的选择条件),则如果$ROOT对象(标题物料)的物料编号为“U91”,则该物料将包含在BOM表展开中。

Restrictions

TYPE_OF and NOT TYPE_OF cannotbe used in constraints.

NOT TYPE_OF cannot be used inactions.

限制

TYPE_OFNOT TYPE_OF不能在约束中使用。

NOT TYPE_OF不能在操作中使用。

 

PART_OF

The object is a component of a BOM (only inconstraints). 对象是BOM表的一个组件(仅在约束中)。

Constraints: Entering Conditions

In the condition section of a constraint, identified by the keywordCONDITION, you define when a constraint is valid. This condition acts as afilter. Under RESTRICTIONS, you enter the consistency checks that a constraintis to make.在由关键字condition标识的约束的条件部分中,可以定义约束何时有效。这种情况就像一个过滤器。RESTRICTIONS,输入约束要进行的一致性检查。

For example, you can define that a constraint is only processed ifvalue ‘586’ is assigned to characteristic CPU for material ‘PC’: 例如,您可以定义仅当值“586”指定给物料“PC”的特征CPU时,才处理约束:

OBJECTS:

PC IS_A (300) PC

CONDITION:

PC. CPU = ‘586’

Note

If you enter more than one condition, there is an AND relationshipbetween these conditions: 注意:如果输入多个条件,则这些条件之间存在AND关系:

CONDITION:

PC.CPU = ‘586’ andPC.HARD_DISK = ‘1620’

Conditions in the Restrictions Section

Some simple conditions can also be entered directly in the restrictionssection:

限制部分中的条件

也可以在“限制”部分直接输入一些简单条件:

OBJECTS:

PC IS_A (300) PC

RESTRICTIONS:

PC.HARD_DISK = ‘1620’ ifPC.CASING = ‘Tower’,

PC.HARD_DISK = ‘850’ ifPC.CASING = ‘Minitower’

The hard disk can only have the value ‘1620’ for a tower, or ‘850’ fora minitower. 对于 tower,硬盘的值只能为“1620”,对于 minitower,硬盘的值只能为“850”。

PART_OF and SUBPART_OF

If a constraint refers to several objects that are part of a BOM, youcan use the CONDITION section to define that the constraint is only valid ifthe objects belong to the BOM of the superior material. 如果约束涉及多个属于BOM表一部分的对象,则可以使用 CONDITION部分定义仅当这些对象属于上级物料的BOM表时,约束才有效。

图片

The example shows that a constraint is only processed if the casing isa component of the BOM for the PC. This condition is entered under CONDITIONusing the expression PART_OF: 该示例表明,仅当外壳是PC BOM的一个组成部分时,才处理约束。该条件是在CONDITION下输入的,使用表达式PART_OF:

OBJECTS:

PC IS_A (300)PC,

C IS_A (300)CASING

CONDITION:

PART_OF (C, PC)

The constraint is only valid if the casing is part of the PC. 仅当外壳是PC的一部分时,约束才有效。

The condition in the constraint is very important, because without thecondition the constraint would be valid for all combinations including a PC anda casing, even if the casing is not in the BOM for the PC. 约束中的条件非常重要,因为如果没有该条件,约束将对包括PC和套管在内的所有组合有效,即使套管不在PC的BOM中。

If you want a constraint to refer to the components of sub-assemblies,you use the expression SUBPART_OF.

OBJECTS: 如果希望约束引用子部件的零部件,请使用表达式“SUBPART_OF”。

P IS_A (300)PACKAGE,

C IS_A (300)CASING

CONDITION:

SUBPART_OF (C, P).

In this example, the condition PART_OF (C, P) is false, because thecasing is not directly a component of the package.

Referring to BOM Items在本例中,条件“PART_OF(C,P)”为假,因为外壳不是包装的直接组成部分。

You can also refer to a specific BOM item in the condition section. Forexample, if you want the casing to be in a specific BOM item, you enter the BOMitem. 也可以在“条件”部分中引用特定的BOM表项。例如,如果希望casing位于特定的BOM表项中,请输入BOM项。

OBJECTS:

PC IS_A (300)PC,

C IS_A (300)CASING

CONDITION:

PART_OF (C, PC, ‘0050’)

The constraint checks whether the casing is item 50 of the BOM for thePC. 约束检查外壳是否为PC BOM表的第50项。

 

SUBPART_OF

The object is a component of an assemblythat is part of the BOM of a configurable material (only in constraints).

对象是作为可配置材料BOM表一部分的部件的零部件(仅在约束中)。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值