Defining Table Joins with the Help of Graphics
Use
If several tables are all linked within a SELECT statement, this is known as a join. The result set is a table, the lines of which contain all the fields of all the tables used in the join.
The links between the various tables used in the join are all specified separately. You use these conditions to specify which combinations of records from the individual tables are included in the result set.
Table joins must be defined already, before you maintain InfoSets and QuickViews.
Prerequisites
In either the InfoSet: Title and Database screen or the Create QuickView: Choose Data Source screen, you have chosen the Table Join (Using Table) data source.
If the corresponding software requirements have been met, the graphical join definition is the standard setting.

In the InfoSet maintenance, you can decide whether or not you want to use graphics to help you define table joins. From the InfoSet: Initial Screen, follow the menu path Settings -> Settings. Put a checkmark in the Graphical Join Definition checkbox accordingly.
For more information see
Procedure
|
In the Add Table dialog box, specify the name of the table that you want to add. Choose The table is displayed in a window: The table fields are displayed along with their corresponding long texts. Key fields are marked with a symbol. You can move the position of the window however you like. |
Propose join conditions |
The system proposes the standard default table joins. The proposals are determined from the foreign key dependencies stored in the dictionary, or from the key fields in the tables that are used in the join. The join conditions between the individual tables in the join are displayed as lines. |
Create join condition |
Select the field where the join condition starts. Use the Drag&Relate function to join this field with its target field. If the join condition is valid, the join is displayed as a line. |
Define the type of join condition |
You can choose from the following functions when you open the context menu for the join-line:
If according to the join conditions of a record in the first table, there is a corresponding record in the second table, this second record is included in the result set also.
All of the records in the first table are included in the result set. If, in the second table, there is no record corresponding to a record in the first table, a record containing fields with initial values (blank fields) is used in the second table.
We recommend that you do not add additional tables to tables that have been joined using a left-outer join.
|
|
You get to the Delete Table dialog box. Specify the name of the table that you want to delete. Choose
Clicking on the pushbutton that closes the window in the title bar of the table window is another way of removing a table. |
|
This takes you to the InfoSet: Alias Names for Tables dialog box. You use this function if you want to include the same table twice in a join. Choose For more information, see Assigning Additional Tables. |
|
The system checks the validity of the join conditions between the tables you have selected, and looks for any tables that have been added but not joined. |
|
When you place your cursor on an quantity field or a currency field and choose the Reference field function, the system displays the reference table that contains the corresponding unit of measure or currency for this field. |
|
Select a field from a table. Click on the Two fields sharing the same domain can always be joined. Two fields sharing the same data type (including length attributes) in the data dictionary, can also be joined. |
For more information on restrictions and rules governing the use of joins, see
Defining Table Joins Without the Help of Graphics.In the Join Definition screen, choose
Back.
The join definition is saved together with your QuickView.
In the Join Definition screen, choose
Back.
Save your entries on the following screen.
With a table join as a data source for an InfoSet, you can
Result
The result of a table join is again a (flat) table. You cannot, therefore, use a table join to analyze hierarchical relationships between tables. We recommend you use logical databases in this case.
For more information see the online documentation on the SELECT ABAP statement.