bw interpreting query results using infosets and the concept of temporal join with practical...

12
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2011 SAP AG 1 Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Applies to: SAP BI 7.0. For more information, visit the EDW homepage . Summary This article describes the how queries using InfoSets work with three different scenarios. It also describes temporal join and the usage of time dependent characteristics in an InfoSet. Author: Jerry Jerome Company: Applexus Technologies (P) Ltd. Created on: 31 March 2011 Author Bio Jerry Jerome is working as SAP Technology Consultant with Applexus Software Solutions (P) Ltd. He has experience in SAP ABAP and SAP BI.

Upload: ccpg04

Post on 31-Dec-2015

39 views

Category:

Documents


0 download

DESCRIPTION

BW infoset

TRANSCRIPT

Page 1: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 1

Interpreting Query Results using

InfoSets and the Concept of

Temporal Join with Practical

Scenarios

Applies to:

SAP BI 7.0. For more information, visit the EDW homepage.

Summary

This article describes the how queries using InfoSets work with three different scenarios. It also describes temporal join and the usage of time dependent characteristics in an InfoSet.

Author: Jerry Jerome

Company: Applexus Technologies (P) Ltd.

Created on: 31 March 2011

Author Bio

Jerry Jerome is working as SAP Technology Consultant with Applexus Software Solutions (P) Ltd. He has experience in SAP ABAP and SAP BI.

Page 2: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 2

Table of Contents

InfoSet……….. .................................................................................................................................................... 3

Technical Issues That Affect the Result of the Query ........................................................................................ 3

Number of Records Keyfigure ............................................................................................................................ 3

A Practical Scenario ........................................................................................................................................... 3

Creating InfoSet .................................................................................................................................................. 5

Scenario 1 ....................................................................................................................................................... 5

Scenario 2 ....................................................................................................................................................... 7

Scenario 3 ....................................................................................................................................................... 9

Temporal Join ..................................................................................................................................................... 9

Related Content ................................................................................................................................................ 11

Disclaimer and Liability Notice .......................................................................................................................... 12

Page 3: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 3

InfoSet

InfoSet describes data sources that are defined as a rule as joins of DataStore objects, standard InfoCubes and/or InfoObjects (characteristics with master data). If one of the InfoObjects contained in the join is a time-dependent characteristic, the join is a time-dependent or temporal join. InfoSets allow you to analyze the data in several InfoProviders by using combinations of master data-bearing characteristics, InfoCubes and DataStore objects. The system collects information from the tables of the relevant InfoProviders.

You can include any DataStore object, InfoCube or InfoObject of type Characteristic with Master Data in a join. A join can contain objects of the same object type, or objects of different object types. You can include individual objects in a join as many times as you want. Join conditions (equal join condition) connect the objects in a join to one another. A join condition specifies the combination of individual object records included in the results set.

Technical Issues That Affect the Result of the Query

The results set of a join is made up of fields from all of the tables involved. One row of this result set contains a valid combination of rows from each of the tables involved. The join condition and the filter for the query that you specify determine which combinations are valid. You can set join conditions between fields from the key part of the tables and between fields from the data part of the tables. For two InfoObjects, for example, you can define an equal join condition between two attributes. The filter for the query determines which values are allowed for individual columns of the results set, or the combinations of values that are allowed for various different columns. This further restricts the results set that are produced by the join condition.

Number of Records Keyfigure

The data is compressed using the characteristics that you do not want to be displayed in the query. Different values for the same key figure can be output for the same combinations of characteristics in various queries, which can result in different totals. Therefore, the Number of Records key figure is included in every InfoSet. This key figure tells how many records in the results set for the join feed into a record in the query.

A Practical Scenario

Depending on how join conditions have been designed, every record from table1 and table2 can be included several times in a combination for a record in the results set.

The following objects are used in our scenario:

1.DataStore object DS_ORDER

Key: ORDER_NO

Data part: PERSON, PLANT, AMOUNT

Page 4: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 4

2.Characteristic PLANT (time independent)

Key: PLANT

3.Characteristic PERSON (time dependent)

4.Characteristic BPARTNER (time independent)

Key: BPARTNER

Data part (attribute): PLANT:

Page 5: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 5

Creating InfoSet

Three scenarios are discussed below.

Scenario 1

InfoSet contains a join from DataStore object DS_ORDER and characteristic PLANT. The join condition is PLANT(DS_ORDER) = PLANT(PLANT). In this example, for each record in DS_ORDER, there is exactly one record in PLANT. The AMOUNT key figure cannot be included more than once in the results set.

All the InfoProviders in the InfoSet are displayed.

Page 6: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 6

Drag and drop a link from the characteristic ‘PLNT’ in the DSO to the characteristic ‘PLNT’. Click on activate button to activate the InfoSet.

A query is created in BEx Query Designer to view the data from the InfoSet. Here Keyfigures are dragged into the column section and characteristics are dragged into the row section. In the row section the Number of Records key figure is included. In fact it is included in every InfoSet. This key figure tells how many records in the results set for the join feed into a record in the query.

Page 7: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 7

In the query output each characteristics are included only once and keyfigures are not repeated.

Scenario 2

InfoSet contains a join from DataStore object DS_ORDER and characteristic BPARTNER. The join condition is between PLANT (DS_ORDER) = PLANT (BPARTNER). A number of records from BPARTNER may have the same value for PLANT. This means that more than one record from BPARTNER may be determined for a single record in DS_ORDER. As a result, there is more than one record in the result set of the join and the AMOUNT key figure appears several times.

Here there are five business partners and three of them are assigned to the same plant. As a result in BEx query output, the keyfigures will repeat.

Page 8: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 8

Here for order number ‘O1’ the keyfigure ‘100’ is repeated three times because three business partners have been assigned to the same plant.

Page 9: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 9

Scenario 3

InfoSet contains a join from DataStore object DS_ORDER and time-dependent characteristic PERSON. The join condition is between PERSON(DS_ORDER) = PERSON(PERSON). Although physically a person is unique and can exist only once, the fact that the PERSON characteristic is time-dependent means that several records can exist for a single person. Using time-dependent characteristics results in a situation like that described in the second scenario. The time selection options that are available for time-dependent characteristics in temporal joins allow avoiding this type of situation. A join containing at least one time dependent characteristic is a temporal join.

Temporal Join

Join containing at least one time-dependent characteristic is a temporal join. Time-dependency is assessed when the resulting set is determined. A time interval is assigned to each record in the resulting set. The records are valid for the duration of the interval to which they are assigned (valid time interval).

Most of the time, a time is modeled for a temporal join. When defining queries, the question arises about how you can restrict to a particular time interval, one or more key dates or a combination of these. Due to technical reasons, it is not possible to define restrictions directly for the fields valid from (0DATEFROM) and valid to (0DATETO) for the individual characteristics or results set. For this reason, a dimension valid time interval (VALIDTIMEINTERVAL) exists for each InfoSet that represents a temporal join. This is only visible in the Query Designer and is only used for the time selection.

The valid time interval for a temporal join describes the period in which a record of the join result set is valid, contains the following fields:

Page 10: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 10

Valid from and valid to: These fields contain the beginning and the end of the valid time interval. They are not visible in Join Control, but are available in the BEx Query Designer. These fields are only allowed to be used for the output of results in rows or columns. They must not be used with restrictions.

Time Interval: This field is only used to select the time interval and for this reason is only allowed to be used to display results in rows and columns. The runtime system derives the correct selections for the database access from the time interval field. You can use more than one key dates and intervals as filters in the query definition. Temporal joins enable you to present statuses for several periods or time intervals next to each other in a query.

In the query result several records exist for a single person because person is a time dependent characteristic.

Page 11: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 11

Related Content

Interpreting Queries Using InfoSets

Temporal Join

Join Control

For more information, visit the EDW homepage

Page 12: BW Interpreting Query Results Using InfoSets and the Concept of Temporal Join With Practical Scenarios

Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2011 SAP AG 12

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.