You are on page 1of 25

Siebel 8.

0 Essentials

Business Layer Configuration: Joins

1 of 24

Module 27: Business Layer Configuration: Joins

Module Objectives

To create a join that brings data from:

A standard table into a standard business component A party table into a standard business component A party table into another party business component

Business Layer Configuration: Joins

3 of 24

Joined Tables
Business components are primarily based on a Base Table, but they

can include data from other related joined tables

Service Request SR # Area Entitlement

Base Table

S_SRV_REQ

S_ENTLMNT Joined Table ENTLMNT_NUM EFF_END_DT AGREE_CD

RTNG_CD

SR_AREA

Business Layer Configuration: Joins

SR_NUM

4 of 24

Joined Tables
Three definitions are used to implement a join:

Join Definition specifies the joined table Join Specifications specify the Foreign Key and Primary Key used to relate the base and joined tables Single-Value Field references the join object definition
1. Join Definition

2. Join Specification 3. SVF

Business Layer Configuration: Joins

5 of 24

Join Example

From S_SRV_REQ

From S_ENTLMNT

Business Layer Configuration: Joins

6 of 24

Steps to create a Join


1. Locate the data source 2. Examine existing joins 3. Diagram the join 4. Create the join definition 5. Create the join specification 6. Map the Single Value Field(s)

Business Layer Configuration: Joins

7 of 24

1. Locate the data source


Identify what data you need and find out where it resides in the

application
The required data could exist in another business component
Once the data is identified, find out which table and column the data

resides in
Trace down from the UI element to the table column

Business Layer Configuration: Joins

8 of 24

2. Examine existing joins


Determine if the required join between the tables already exists

Many commonly used joins are already provided, check through them
Use an existing join if it meets the requirements

Examine if Table is already joined If yes, check whether Join Specifications match your requirements

Business Layer Configuration: Joins

9 of 24

3. Diagram the join


The Join Diagram template gives all details about the join

Business Component: Service Request 7. Single-Value Field Single Value Field: Entitlement Id

1. Business Component

3. Joined Table S_SRV_REQ AGREE_ID S_ENTLMNT 4. Joined table column ROW_ID ROW_ID

2. Base Table

NAME
6. Primary Key Column

5. Foreign Key Column

FK

PK

Business Layer Configuration: Joins

10 of 24

4. Create the Join Definition


The join definition is created in the Join child object definition under

the Business Component object


The Table property specifies the joined table The Alias property is the name of the join definition Defaults to the joined tables name

Name of Join

Alias value defaults to joined table name. If multiple Joins to same Table, modify the Alias to a meaningful name

Joined Table

Business Layer Configuration: Joins

11 of 24

5. Create the Join Specification


In the Join Specification child object definition, specify the foreign key

and the primary key


The foreign key is specified in the Source Field property The primary key column is specified in the Destination Column property

FK

PK

Business Layer Configuration: Joins

12 of 24

6. Map the SVF(s)


In the Single Value Fields child object definition, specify the business

component field name, the joined table and the column name of the joined table
SVF specifies the data you seek The join specifies how you access the data

Entitlement Name SVF references NAME column in joined table

BC SVF Field name

Join references S_ENTLMNT table

Business Layer Configuration: Joins

13 of 24

Outer Join Flag


It is set to TRUE to return all records from the base table, even when

there is no related row in the joined table If there is always a related row in the joined table, do not keep Outer Join Flag as TRUE. It affects performance

Outer Join enabled

Business Layer Configuration: Joins

14 of 24

Outer Join Flag


When Outer Join Flag is TRUE, a left outer join is used

All records in source table are displayed, even if there is no related record in the Joined table Records with no related record in target table display target values as NULL

Business Layer Configuration: Joins

15 of 24

Joins and Party Business Data

Joins and Party Business Components Bringing Party Data into a Standard Business Component Bringing Party Data into a Party Business Component

Business Layer Configuration: Joins

16 of 24

Joins and Party Business Components


The base table for party business components is S_PARTY The main data is stored in extension tables of S_PARTY An implicit join is used to reference fields from extension tables Appears in Join property on SVF Most columns Is used when relationship between tables is known use join to Doesnt appear as Join object definition S_ORG_EXT
Account Name Type Location

PK S_PARTY
PARTY_TYPE_CD

FK S_ORG_EXT OU_TYPE_CD PAR_ROW_ID PARTY_UID

Business Layer Configuration: Joins

ROW_ID

ROW_ID

NAME

NAME

LOC

17 of 24

Bringing Party Data into a Standard BC


Example: Bringing Account data into the Opportunity BC

Data from Account brought into Opportunity BC

Data from Opportunity BC

Business Layer Configuration: Joins

18 of 24

Bringing Party Data into a Standard BC


Three definitions bring Party Data into Standard BC:

The Join Definition specifies which S_PARTY extension table to be used The Join specification specifies to use PAR_ROW_ID The SVF is the desired column from the joined extension table

1. Join Definition

3. Single Value Field

2. Join Specification

Business Layer Configuration: Joins

19 of 24

Join specification with Party


It is similar to that for Standard with the following differences:

Destination references PAR_ROW_ID, and not ROW_ID Keys reference base to extension to join, rather than base to join
Typically references PAR_ROW_ID, instead of ROW_ID like in standard S_CONTACT
PR_EDEPT_OU_ID

S_ORG_EXT PAR_ROW_ID

S_PARTY

Business Layer Configuration: Joins

ROW_ID

ROW_ID

ROW_ID

NAME

FK

PK

FK

PK

20 of 24

Bringing Party Data into a Party BC

This account references the top account

Name

Location

Parent Account Name

Business Layer Configuration: Joins

21 of 24

Bringing Party Data into a Party BC


The Join definition must use an explicit join to an extension table

based on appropriate foreign keys It must not use an existing implicit join to that extension table
An explicit join is used since an implicit join to S_ORG_EXT already exists

Business Layer Configuration: Joins

22 of 24

Map Field to Column in Party Table


Select the appropriate explicit join Select the desired column of the joined table Set the appropriate type (DTYPE_TEXT, etc)

Business Layer Configuration: Joins

23 of 24

Module Highlights
BCs can include data from related joined tables Join definitions and join specifications define how to access joined

table data Single-value fields reference the join definition and define the field to access in the joined table To create a join:
Locate the data source, examine existing joins, diagram the join, create the join definition, create the join specification, and define the SVF
Joins that involve party data are similar to standard data; however,

when bringing party data into:


A non-party BC, create a join specification based on PAR_ROW_ID A party BC, use the appropriate explicit join

Business Layer Configuration: Joins

24 of 24

Lab
In the lab, you will:

Examine references when a join is not present and when a join is present Create a join that brings in data from joined table and display it in the UI

Business Layer Configuration: Joins

25 of 24

You might also like