This scenario shows how the rule type “Full Outer Model Join” merges two input tables with one join predicate as a bridge.
Input Tables
Product - Material Table
| Product Code |
Material Code |
Request Order |
| P0001 |
M1011 |
5 |
| P0001 |
M1010 |
2 |
| P0002 |
M1009 |
1 |
| P0002 |
M1011 |
3 |
| P0005 |
M1012 |
10 |
| P0005 |
M1011 |
30 |
|
JO - Product Table
| Product Code |
Product |
Price |
Unit |
| P0001 |
Shoe |
75 |
EUR |
| P0002 |
Watch |
300 |
EUR |
| P0003 |
Shirt |
80 |
EUR |
| P0004 |
Shorts |
20 |
EUR |
|
This scenario executes a Full Outer Model Join that is based on the join predicate.
In this case, Product Code is the predicate used for both rules and all items with product code “P0001” and “P0002” are added in the final results.
Interim Result ( Product - Material Table and JO - Product Table)
Product - Material Table
| Product Code |
Material Code |
Request Order |
| P0001 |
M1011 |
5 |
| P0001 |
M1010 |
2 |
| P0002 |
M1009 |
1 |
| P0002 |
M1011 |
3 |
|
JO - Product Table
| Product Code |
Product |
Price |
Unit |
| P0001 |
Shoe |
75 |
EUR |
| P0002 |
Watch |
300 |
EUR |
|
The following table shows parts of the Full Outer Join table. However, since they contain “?” or null values, they are not included in the final results.
| Product Code |
Material Code |
Request Order |
| P0005 |
M1012 |
10 |
| P0005 |
M1011 |
30 |
| |
? |
? |
| |
? |
? |
|
| Product Code |
Product |
Price |
Unit |
| |
? |
? |
? |
| |
? |
? |
? |
| P0003 |
Shirt |
80 |
EUR |
| P0004 |
Shorts |
20 |
EUR |
|
As mentioned above, the system returns the rest of the non-null and/or non-initial values since the Model Join function is also behaving as a normal Model View function.
Expected Result
| Material Codw |
Request Order |
Product Code |
Product |
Price |
Unit |
| M1011 |
5 |
P0001 |
Shoe |
75 |
EUR |
| M1010 |
2 |
P0001 |
Shoe |
75 |
EUR |
| M1009 |
1 |
P0002 |
Watch |
300 |
EUR |
| M1011 |
3 |
P0002 |
Watch |
300 |
EUR |
| M1011 |
30 |
P0005 |
|
0 |
|
| M1012 |
10 |
P0005 |
|
0 |
|
| |
|
|
Shirt |
80 |
EUR |
| |
|
|
Shorts |
20 |
EUR |
Returns values for matching rows (“P0001” and “P0002”) based on the join predicates set for the field Product Code (PROD_CODE).