Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
0 Essentials
1 of 24
Module Objectives
A standard table into a standard business component A party table into a standard business component A party table into another party business component
3 of 24
Joined Tables
Business components are primarily based on a Base Table, but they
Base Table
S_SRV_REQ
RTNG_CD
SR_AREA
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
5 of 24
Join Example
From S_SRV_REQ
From S_ENTLMNT
6 of 24
7 of 24
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
8 of 24
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
9 of 24
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
FK
PK
10 of 24
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
11 of 24
FK
PK
12 of 24
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
13 of 24
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
14 of 24
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
15 of 24
Joins and Party Business Components Bringing Party Data into a Standard Business Component Bringing Party Data into a Party Business Component
16 of 24
PK S_PARTY
PARTY_TYPE_CD
ROW_ID
ROW_ID
NAME
NAME
LOC
17 of 24
18 of 24
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
2. Join Specification
19 of 24
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
ROW_ID
ROW_ID
ROW_ID
NAME
FK
PK
FK
PK
20 of 24
Name
Location
21 of 24
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
22 of 24
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,
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
25 of 24