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.

SAP COMMUNITY NETWORK © 2011 SAP AG

SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com 1

.............................................................................................................................Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Table of Contents InfoSet………..................................................... 11 Disclaimer and Liability Notice ......................................................... ..sdn...............sap.................................................................. 3 A Practical Scenario .............................. 5 Scenario 2 .........boc.................................................................................................................................................................................................................................................................. 3 Technical Issues That Affect the Result of the Query .....................................uac..............................................................................................................com | BOC ...................................................com 2 .................com | BPX ..............................................sap.......................................................................................................................................................................bpx..........................................................................sap.................. 5 Scenario 1 ..sap.. 9 Related Content ................................................................................................................................................................................................................ 3 Creating InfoSet ......... 9 Temporal Join ........................................ 12 SAP COMMUNITY NETWORK © 2011 SAP AG SDN ........... 7 Scenario 3 .....................com | UAC ............................................................................. 3 Number of Records Keyfigure .......................

sdn.sap. For two InfoObjects.bpx.com | BOC . 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. the join is a time-dependent or temporal join.DataStore object DS_ORDER Key: ORDER_NO Data part: PERSON. You can set join conditions between fields from the key part of the tables and between fields from the data part of the tables.com | UAC . the Number of Records key figure is included in every InfoSet. 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. A Practical Scenario Depending on how join conditions have been designed. standard InfoCubes and/or InfoObjects (characteristics with master data). If one of the InfoObjects contained in the join is a timedependent characteristic. every record from table1 and table2 can be included several times in a combination for a record in the results set. The join condition and the filter for the query that you specify determine which combinations are valid.boc. The system collects information from the tables of the relevant InfoProviders.sap.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios InfoSet InfoSet describes data sources that are defined as a rule as joins of DataStore objects. Number of Records Keyfigure The data is compressed using the characteristics that you do not want to be displayed in the query. The following objects are used in our scenario: 1. PLANT. InfoCube or InfoObject of type Characteristic with Master Data in a join. Therefore. InfoCubes and DataStore objects. for example. This key figure tells how many records in the results set for the join feed into a record in the query.sap.com 3 . which can result in different totals. you can define an equal join condition between two attributes. You can include any DataStore object. One row of this result set contains a valid combination of rows from each of the tables involved. InfoSets allow you to analyze the data in several InfoProviders by using combinations of master data-bearing characteristics. AMOUNT SAP COMMUNITY NETWORK © 2011 SAP AG SDN . The filter for the query determines which values are allowed for individual columns of the results set. 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. Different values for the same key figure can be output for the same combinations of characteristics in various queries.com | BPX .uac. You can include individual objects in a join as many times as you want. or objects of different object types.sap. A join can contain objects of the same object type.

com | BPX .com 4 .boc.sap.Characteristic PLANT (time independent) Key: PLANT 3.sdn.com | UAC .bpx.Characteristic PERSON (time dependent) 4.sap.Characteristic BPARTNER (time independent) Key: BPARTNER Data part (attribute): PLANT: SAP COMMUNITY NETWORK © 2011 SAP AG SDN .uac.com | BOC .sap.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios 2.sap.

for each record in DS_ORDER. The join condition is PLANT(DS_ORDER) = PLANT(PLANT).com | BPX .sap. The AMOUNT key figure cannot be included more than once in the results set.boc.uac.com 5 . All the InfoProviders in the InfoSet are displayed.com | UAC . In this example.sdn.sap. Scenario 1 InfoSet contains a join from DataStore object DS_ORDER and characteristic PLANT.sap. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .bpx.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Creating InfoSet Three scenarios are discussed below.com | BOC .sap. there is exactly one record in PLANT.

sap.sdn.sap.bpx.sap.com 6 .boc.sap.com | UAC . A query is created in BEx Query Designer to view the data from the InfoSet. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .com | BOC . Click on activate button to activate the InfoSet.uac. In fact it is included in every InfoSet.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Drag and drop a link from the characteristic ‘PLNT’ in the DSO to the characteristic ‘PLNT’. In the row section the Number of Records key figure is included.com | BPX . Here Keyfigures are dragged into the column section and characteristics are dragged into the row section. This key figure tells how many records in the results set for the join feed into a record in the query.

As a result in BEx query output.com | UAC . The join condition is between PLANT (DS_ORDER) = PLANT (BPARTNER). SAP COMMUNITY NETWORK © 2011 SAP AG SDN . A number of records from BPARTNER may have the same value for PLANT.sap.sap. As a result. Scenario 2 InfoSet contains a join from DataStore object DS_ORDER and characteristic BPARTNER. Here there are five business partners and three of them are assigned to the same plant.sap.sdn.sap.bpx.boc. This means that more than one record from BPARTNER may be determined for a single record in DS_ORDER.com | BPX .com 7 . there is more than one record in the result set of the join and the AMOUNT key figure appears several times.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios In the query output each characteristics are included only once and keyfigures are not repeated.com | BOC . the keyfigures will repeat.uac.

com | BPX .uac.com 8 .boc.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Here for order number ‘O1’ the keyfigure ‘100’ is repeated three times because three business partners have been assigned to the same plant.sap.com | UAC . SAP COMMUNITY NETWORK © 2011 SAP AG SDN .sap.bpx.sdn.com | BOC .sap.sap.

This is only visible in the Query Designer and is only used for the time selection. a time is modeled for a temporal join.uac. a dimension valid time interval (VALIDTIMEINTERVAL) exists for each InfoSet that represents a temporal join.sap. The records are valid for the duration of the interval to which they are assigned (valid time interval). Time-dependency is assessed when the resulting set is determined.bpx.boc. The valid time interval for a temporal join describes the period in which a record of the join result set is valid. 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. the question arises about how you can restrict to a particular time interval.sdn. A time interval is assigned to each record in the resulting set.sap.sap.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Scenario 3 InfoSet contains a join from DataStore object DS_ORDER and time-dependent characteristic PERSON. Using time-dependent characteristics results in a situation like that described in the second scenario. Although physically a person is unique and can exist only once.com 9 .sap. Temporal Join Join containing at least one time-dependent characteristic is a temporal join.com | UAC . The time selection options that are available for time-dependent characteristics in temporal joins allow avoiding this type of situation. the fact that the PERSON characteristic is time-dependent means that several records can exist for a single person. Due to technical reasons. Most of the time. When defining queries. The join condition is between PERSON(DS_ORDER) = PERSON(PERSON).com | BOC .com | BPX . one or more key dates or a combination of these. For this reason. A join containing at least one time dependent characteristic is a temporal join. contains the following fields: SAP COMMUNITY NETWORK © 2011 SAP AG SDN .

com 10 .boc. In the query result several records exist for a single person because person is a time dependent characteristic.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Valid from and valid to: These fields contain the beginning and the end of the valid time interval.com | BPX .sap.bpx.sap.sap.com | BOC .com | UAC . They must not be used with restrictions. The runtime system derives the correct selections for the database access from the time interval field. 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.sap.uac. Temporal joins enable you to present statuses for several periods or time intervals next to each other in a query. You can use more than one key dates and intervals as filters in the query definition. They are not visible in Join Control. but are available in the BEx Query Designer. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .sdn. These fields are only allowed to be used for the output of results in rows or columns.

com | UAC .com 11 .Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios Related Content Interpreting Queries Using InfoSets Temporal Join Join Control For more information.boc.sap.sap.sap. visit the EDW homepage SAP COMMUNITY NETWORK © 2011 SAP AG SDN .com | BOC .bpx.uac.sdn.sap.com | BPX .

com | UAC . including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. or seek to hold. 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.uac.com 12 . Changes made based on this information are not supported and can be overwritten during an upgrade. SAP COMMUNITY NETWORK © 2011 SAP AG SDN .sap.Interpreting Query Results using InfoSets and the Concept of Temporal Join with Practical Scenarios 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. code or methods suggested in this document. SAP responsible or liable with respect to the content of this document.com | BPX . SAP will not be held liable for any damages caused by using or misusing the information.boc.sap.sdn.sap. and anyone using these methods does so at his/her own risk.bpx. You agree that you will not hold.sap.com | BOC .

Sign up to vote on this title
UsefulNot useful