Entering content frame

Procedure documentation Joining Segment Tables Locate the document in its SAP Library structure

Use

A join is a connection between two tables that represents the parent-child relationship between the tables. The two tables are merged based on a common field creating a new virtual table.

To view data from two different tables, you need to create a join condition.

This graphic is explained in the accompanying text

You can create a join only when the two tables have a parent-child relationship between them.

Procedure

...

       1.      Log on to the CRM server and choose Architecture and Technology ® Middleware ® Development ® Meta Object Modeling ® BDoc Modeler.

The CRM BDoc Modeler screen appears.

       2.      Expand the synchronization or Mobile Application BDoc type in the tree.

This graphic is explained in the accompanying text

A join cannot be defined for messaging BDoc types.

       3.      Right-click the segment to which you want to add the join condition.

A context menu appears.

       4.      Choose Change.

The Segment Overview, Mappings, Joins, and Segment Fields tabs appear.

       5.      Choose the Joins tab.

       6.      Enter the alias names of the source and destination tables in the Source Table Alias and Destination Table Alias fields.

       7.      Choose This graphic is explained in the accompanying text.

The Join Condition dialog box appears.

       8.      Enter the join condition.

This graphic is explained in the accompanying text

BDoc Modeler does not validate the text you enter as the join condition.

       9.      Save the BDoc type.

Example

Customers and Contact Persons are stored in the table SMOKNA1.

Addresses are stored in the table SMOADRC.

Task

In a query, you want to search for a Contact Person with search parameters from both the tables.

Solution

Define a join between tables SMOKNA1 and SMOADRC.

SMOKNA1.sfakna1=SMOADRC.sfakna1

Where,

sfakna1 - is a common field in both the tables and is the primary key for SMOKNA1 and foreign key for SMOADRC.

Leaving content frame