Show TOC

Function documentationJoin Query for MDOs Locate this document in the navigation structure

 

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.

Features

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   http://help.sap.com   SAP Netweaver   SAP Netweaver 7.0   Application Help   SAP Netweaver Library   SAP NetWeaver Developer's Guide   Fundamentals   Using java   Reference   Appendix   Java Persistence Reference   Open SQL Reference   Open SQL Grammar.  

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 Note

For every join, you have to define a condition.

End of the note.

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.

Activities

  1. On the SAP MII Workbench, choose   File   New   MDO Query.  

    The DataSource screen of the MDO query appears.

  2. Select two or more persistent or joined MDOs from the MDO field.

  3. Choose Join from the Modes field.

  4. From the Template Categories tab, choose Join Query.

    The Join Query screen appears.

  5. 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.

  6. Click the Join Expression column with secondary mouse button and choose Add.

  7. Choose the MDOs from the Selected MDOs column.

  8. To add conditions to the join, select a row from the Join Expression tab.

  9. Click the conditions table with the secondary mouse button and select Add.

  10. Choose the list of attributes of the selected MDOs from the Columns and the operators from the Operators column.

Note Note

You can enter the filter, sort and group expressions manually.

End of the note.

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.