Join Query for MDOs
You use this screen to join two or more persistent MDOs and/or Joined MDOs to display a consolidated result from different multiple MDO tables.
The MDO query is enhanced to be OpenSQL complaint and supports the following join types:
Inner Join: An inner join is a join of two or more tables that returns only those rows that satisfy the join condition.
Left Outer Join: A left outer join is an extension of inner join. It returns all rows that satisfy the join condition and additionally, returns some or all of those rows from left table for which no rows from the right table satisfy the join condition.
For more information about OpenSQL, see SAP Help Portal at
The Join Query Panel
screen consists of the following:
Selected MDO:
Displays a list of selected MDOs.
Available Attributes:
Displays the list of attributes from the selected MDOs
Selected Attributes:
Displays the list of attributes that you choose from the Available Attributes
column.
Join Expression:
Consists of two tables, Join
and Conditions
. Joins
table consists of MDO objects and the types such as Inner Join and Left Outer Join. Conditions
tables
consists of attributes of the respective MDO objects in the join table and the operators for the conditions. The supported operators are =, <>, <, <=, >, and >=.
Note
For every join, you have to define a condition.
On saving the query, a validation check is performed. The errors and their descriptions are as follows:
Errors |
Description |
|---|---|
Join Expression values cannot be blank |
You cannot have a blank field in the Join/condition table. |
Join must have at least one condition |
You have to define a condition for every join. |
Only one type of join can be defined for a set of MDOs :MDO1, MDO2 |
You have to define a separate join type for each MDO set in the Join table. |
Attribute [ATTRIBUTE_NAME] does not belong to MDO :[MDO_NAME] |
The selected attribute does not belong to the respective MDO mentioned in the Join table. |
On the SAP MII Workbench, choose
The DataSource
screen of the MDO query appears.
Select two or more persistent or joined MDOs from the MDO field.
Choose Join
from the Modes
field.
From the Template Categories
tab, choose Join Query
.
The Join Query
screen appears.
Choose the attributes from Available Attributes
column.
The Available Attributes
screen displays all the attributes present in the selected MDO. The selected attributes will be displayed in the Selected
Attributes
column.
Click the Join Expression
column with secondary mouse button and choose Add
.
Choose the MDOs from the Selected MDOs
column.
To add conditions to the join, select a row from the Join Expression
tab.
Click the conditions table with the secondary mouse button and select Add
.
Choose the list of attributes of the selected MDOs from the Columns
and the operators from the Operators
column.
Note
You can enter the filter, sort and group expressions manually.
To delete a row from the join table, select a row and click the Joins
table with the secondary mouse button. Choose Delete
. The row along with the conditions will be deleted.