Académique Documents
Professionnel Documents
Culture Documents
Meaning - Boolean logic is a type of decision making utilized by computers to decide if a statement is true or false. Scope of Boolean in SAP - The same Boolean logic we apply for writing business rules in SAP. Operators The following are the operators used in Boolean as well as in SAP.
1. AND - True if both operands are true. 2. OR - True if any one operand is true. 3. ! - True if an operand is false.
Note: An operand is a mathematical expression which can be a number, a variable, or any other expression. Examples 1. A and B It means both A and B will be true. 2. A or B It means either A or B is true. 3. ! A It signifies Not of A/Reverse of A which means A is false.
RULES
1) C1 or C2 => A Here, C1 and C2 are operands (Variables) Or is an operator Condition: C1 or C2 Restriction: A The above expression signifies that either C1 or C2 give A as a result.
Reverse
When we write reverse of a rule then Condition becomes restriction and vice versa. For example for the above case reverse would be: ! A => ! C1 and ! C2 Condition: ! A Restriction: ! C1 and !C2
Objects: ?o is a (300) D_GCR_003_. Condition: Not ?o. T_X_C_MENU in (DOUBLE_HEAD, ILLUM_DOUBLE_HEAD, TRIPLE_HEAD) AND ?o. T_X_C_MENU <> E_STOP Restrictions: ?o.YN_BOOTS_MULTIHEAD = NO Inferences: ?o.YN_BOOTS_MULTIHEAD. REVERSE
Restrictions: ?o. T_X_C_MENU in (DOUBLE_HEAD, ILLUM_DOUBLE_HEAD, TRIPLE_HEAD). Inferences: ?o.T_X_C_MENU. 3) C1 or C2 or C3 => A Condition: C1 or C2 or C3 Restriction: A The above expression signifies that either C1 or C2 or C3 give A as result. Reverse ! A = ! C1 and ! C2 and !C3
REVERSE (! A = ! C1 and ! C2 and !C3) Objects: ?o is a (300) D_GCR_003_. Condition: ?o.YN_BOOTS = YES Restrictions: ?o.T_SHAPE_OF_SIGNALING_UNIT_HEAD = ROUND, ?o.YN_BOOT_MULTI_HEAD = NO, ?o.T_X_C_MENU = PUSHBUTTON. Inferences: ?o. T_SHAPE_OF_SIGNALING_UNIT_HEAD, ?o.YN_BOOT_MULTI_HEAD, ?o.T_X_C_MENU .
4) C1 and C2 and C3 => A Condition: C1 and C2 and C3 Restriction: A The above expression signifies that C1 and C2 and C3 altogether give A as result. Reverse: - In this case the logical reverse has or in the restriction part but in SAP we can not have or in restriction part so the logical reverse is split in 3 parts. Logical reverse - ! A => ! C1 or ! C2 or ! C3 SAP reverse - a) ! A and C1 and C2 = ! C3 b) ! A and C2 and C3 = ! C1 c) ! A and C1 and C3 = ! C2
?o.YN_BOOTS = YES AND ?o. YN_BOOT_MULTI_HEAD = YES AND ?o. T_X_C_MENU <> PUSHBUTTON. Restrictions: ?o. T_SHAPE_OF_SIGNALING_UNIT_HEAD = ROUND Inferences: ?o. T_SHAPE_OF_SIGNALING_UNIT_HEAD.
1) 2) 3) 4)
! A and C1 => ! C2 (1) ! A and C2 => ! C1 (1) ! A and C1 => ! C3 (2) ! A and C3 => ! C1 (2)
REVERSE:
Objects: ?o is a (300) D_GCR_003_. Condition: ?o.YN_BOOTS = YES AND ?o. YN_BOOT_MULTI_HEAD = YES Restrictions: ?o. T_X_C_MENU = PUSHBUTTON. Inferences: ?o. T_X_C_MENU.