Escolar Documentos
Profissional Documentos
Cultura Documentos
SAP BW
Student Guide
Version 1.0
01st July 2007
Copyright 2006 Patni Computer Systems Ltd., Akruti, MIDC Cross Road No.
21, Andheri (E), Mumbai 400 093. All rights reserved. No part of this
publication can be reproduced in any way, including but not limited to
photocopy, photographic, magnetic, or other record, without the prior
agreement and written permission of Patni Computer Systems.
Patni Computer Systems considers information included in this document to
be Confidential and Proprietary.
Patni Internal
Page 1 of 205
SAP BW
Table of contents
1
INTRODUCTION TO BUSINESS INTELLIGENCE & DATA
WAREHOUSING ....................................................................................................... 4
1.1.
1.2.
1.3.
1.4.
1.5.
1.6.
2
Page 2 of 205
SAP BW
6.1.
6.2.
10
10.1.
10.2.
11
11.1.
11.2.
11.3.
11.4.
11.5.
11.6.
11.7.
11.8.
11.9.
11.10.
12
12.1.
12.2.
12.3.
Patni Internal
Page 3 of 205
SAP BW
1.1.
To implement BI, the following technologies are used Data Marts/ Data Warehouses - A data warehouse is a subject
oriented, integrated, time variant, non-volatile collection of data in
support of management's decision-making process. To facilitate data
retrieval for multi dimensional analytical processing, a special
database design technique called a star schema is used very often.
The main differences between an OLTP and an OLAP system are as follows
Patni Internal
Page 4 of 205
SAP BW
Criteria
Purpose
OLTP data
OLTP
servers
handle
mission
critical
production data accessed
through simple queries.
Time Scale
Indexing
Normalization
Organization
Values
Operations
performed
Homogeneity
DBMS
OLAP data
OLAP servers handle
management
critical
data accessed through
an iterative analytical
investigation.
Organizations
day-to- Historical data for trend
day operational data. analysis.
Current data.
Optimize
update Optimize ad hoc query
performance
by performance
by
minimizing the number including
lots
of
of indexes.
indexes.
Fully normalized.
Possibly
partially
denormalized
for
performance reasons.
Organized
around Organized
around
business functions.
information topics.
Typically coded data Typically
descriptive
(e.g. product codes) for data
(e.g.
product
efficiency reasons.
names) for ease-of-use
reasons.
Insert, Delete, Update.
Read only.
Possibly scattered among
a variety of databases,
under a mix of DBMS and
operating systems, and
using different value
coding schemes.
Chosen primarily for its
ability to meet the
organization's
OLTP
needs. Usually an RDBMS.
1.2.
The star schema derives its name from its graphical representation like a
star. This database schema classifies two groups of data: facts (sales or
quantity, for example) and dimension attributes (customer, time, and
material, for example).
Patni Internal
Page 5 of 205
SAP BW
A fact is measure that answers the questions like how much? and how
many? The fact data (values for the facts) are stored in a highly normalized
fact table. A dimension is a textual description of the dimensions/features
of the business. The dimension answers the questions Who? What? When?
For example, the dimensions of a product may include product name, brand
name, size, and packaging type. The values of the dimension attributes are
stored in various demoralized dimension tables.
As shown in figure 1.1, a fact table appears in the middle of the graphic,
along with several surrounding dimension tables. The central fact table is
usually very large, measured in gigabytes. It is the table from which we
retrieve the statistical data. The size of the dimension tables amounts to
only 1 to 5 percent of the size of the fact table. Foreign keys tie the fact
table to the dimension tables.
1.3.
Introduction to SAP BW
Patni Internal
Page 6 of 205
SAP BW
With the Business Explorer (BEx), SAP BW gives a flexible reporting and
analysis tool to support strategic analyses and decision-making processes
within an organization. These tools include querying, reporting and OLAP
functions.
1.4.
SAP BW Architecture
Patni Internal
Page 7 of 205
SAP BW
1.4.1.2. Non-SAP Systems
The open architecture of SAP BW allows data to be extracted from
heterogeneous sources across the organization thus making it possible to
have consolidated data basis for reporting. SAP delivers various tools,
which allow these interfaces to be implemented quickly and efficiently.
In heterogeneous system landscapes, an important requirement is that the
different data structures and content are consolidated before being loaded
into SAP BW. You can use an ETL tool such as Ascential DataStage to load
data from heterogeneous systems, such as Siebel and PeopleSoft, transform
this data into a single format and then load it via a Business Programming
Interface into SAP BW. BAPI is the interface used for the structured
communication between SAP BW and external systems. Both data providers
and ETL tools use this interface.
SAP automatically supports automatic import of files in CSV or ASCII format
for flat files as standard.
The SOAP (Simple Object Access Protocol) RFC Service is used to read XML
data and to store it in a delta queue in SAP BW. The data can then be
processed further with a corresponding DataSource and SAPI.
1.4.1.3. Data Providers
SAP BW can also be supplied with target-orientated data from various
providers. For example, you can compare the market research data
provided by an agency with your own operative data. Again, BAPI is used for
the transfer of data supplied by the data providers to SAP BW.
1.4.1.4. Databases
SAP BW allows data to be loaded from external relational database systems.
A DataSource is generated based on the external table structure, enabling
table content to be loaded quickly and consistently into SAP BW.
DB Connect is a way, which allows relational databases to be accessed
directly. Here, SAP DB MultiConnect is used to create a connection to the
database management system (DBMS) in the external database. By
importing metadata and original data, the necessary structures can be
generated in SAP BW and the data can be loaded into the SAP BW system.
Page 8 of 205
SAP BW
them using a monitor tool. However, before the data is in a suitable form to
be stored, it must be prepared by the Extraction, Transformation and Load
(ETL) process.
1.5.
Patni Internal
Page 9 of 205
SAP BW
The main distinction between a classic start schema and SAP BW star
schema is that in the SAP BW star schema the dimension tables do not
contain master data information. This master data information is stored in
separate tables, called master data tables. We can think of the SAP BW star
schema as two self-contained areas:
InfoCube
Master Data Tables/Surrogate ID (SID-) Tables
1.5.1. InfoCube
InfoCubes are the central objects of the multi-dimensional model in SAP
BW. Reports and analyses are based on these. From a reporting perspective,
an InfoCube describes a self-contained data set within a business area, for
which you can define queries.
An InfoCube (BasisCube) consists of a number of relational tables- a central
fact table surrounded by several dimension tables- combined on a multidimensional basis.
Note: There are various types of InfoCube in BW, which will be discussed
later. Till then an InfoCube will always refer to a BasisCube. The BasisCube
is the InfoCube relevant for modeling, since only physical objects (objects
that contain data) are considered in the modeling within the SAP BW- data
model.
In the SAP BW- star schema, the facts in the fact table are referred to as
key figures and the dimension attributes as characteristics. The dimension
tables are linked relationally with the central fact table by way of foreign
or primary key relationships. In contrast to the classic star schema, the
characteristic values are not stored in the dimension tables. A numerical SID
key is generated for each characteristic. This foreign key replaces the
Patni Internal
Page 10 of 205
SAP BW
characteristic as the component of the dimension table. Here, SID stands
for Surrogate ID (replacement key). In the graphic above, these keys are
given the prefix SID_. For example, 'SID_MATERIAL' is the SID key for the
characteristic 'MATERIAL' ('MATERIAL_ID').
Each dimension table has a generated numerical 'primary key', called the
dimension key. In the graphic above, this dimension key is denoted with
the prefix DIM_ID_. Here, 'DIM_ID_MATERIAL' is the dimension key for the
material dimension table.
As in the classic star schema, the primary key of the fact table is made up
of dimension keys ('DIM_ID_DATENPAKET', 'DIM_ID_ZEIT', 'DIM_ID_EINHEIT',
'DIM_ID_KUNDE', 'DIM_ID_MATERIAL').
Master Data Tables/SID Tables
Additional information about characteristics is referred to as master data in
the SAP BW. The master data is classified into three types:
Attributes
Texts
(External) hierarchies
1.5.2.
Patni Internal
Page 11 of 205
SAP BW
Master data tables are connected to an InfoCube (and thus to the key
figures of the fact table) by way of the SID tables. The following graphic
illustrates this.
The excavation of master data from the dimension tables using SID
technology allows you to use the same master data with different
InfoCubes. In other words, the master data is InfoCube-independent, and
can be used by several InfoCubes at the same time.
Patni Internal
Page 12 of 205
SAP BW
Dimension (Table)
NA
NA
NA
NA
Table 1.2: Comparison of SAP BW Star Schema and Classic Star Schema
The use of automatically generated INT4 keys (SID keys, DIMID keys) enables
faster access to data than via long alphanumeric keys. Thanks to the
Patni Internal
Page 13 of 205
SAP BW
excavation of master data from the dimension tables using the SID
technique, the following modeling possibilities exist:
Historizing dimensions
Multi-lingual capability
Cross-InfoCube use of master data ("shared dimensions")
The query performance is improved here, as aggregated key
figures can be stored in their own fact tables.
1.6.
Page 14 of 205
SAP BW
1.6.1. Modeling
The Modeling function area is used to create and maintain (meta) objects
relevant to the data staging process in SAP BW. These objects are displayed
in a tree structure, in which the objects are ordered according to
hierarchical criteria. You can use a context menu (using the Right mouse
click) to access the relevant maintenance dialogs for each object in the
object tree. You can also carry out additional functions. To access the
Modeling function area, choose transaction RSA1.
1.6.2. Monitoring
The Monitoring function area enables you to monitor and control data
loading processes and additional data processes in SAP BW. You can access
the Monitoring function area via the transaction RSMON.
Page 15 of 205
SAP BW
1.6.5. Documents
The Documents function area enables you to insert, search in, and create
links for one or more documents in various formats, versions and languages
for SAP BW objects. To access the Documents function area, in the AWB
navigation window, choose Documents.
In the Translation function area, you can translate short and long texts
belonging to SAP BW- objects. To access the Translation function area, in
the AWB navigation window, choose Translation.
Patni Internal
Page 16 of 205
SAP BW
2.1.
Introduction to InfoObjects
2.2.
Types of InfoObjects
Page 17 of 205
SAP BW
Page 18 of 205
SAP BW
InfoObject under an active SAP BW client or a new InfoObject being
defined by the customer. Before they can be used, revised objects
have to be transferred to an active object and then activated.
2.3.
Characteristic InfoObject
General
Patni Internal
Page 19 of 205
SAP BW
This tab page is used to determine the basic properties of a characteristic,
for example description, data type (CHAR, NUMC, DATS or TIMS), length
(max. 60. characters in case of CHAR or NUMC) and conversion routine (E.g.
ALPHA, MATN1).
Note: When defining a characteristic, you must enter at least a description,
data type and length. All other settings on this and other tab pages are
optional.
Patni Internal
Page 20 of 205
SAP BW
characteristic to appear as a textual description or as only the key value or
both in BEx.
SAP Business Explorer also allows displaying the data on maps (World map,
Continent maps etc.). Some third party vendors like ESRI, provide special
type of files called as Shape files that serve as a basis for displaying BW
data on maps. The related settings can be done using the BEx tab.
Master data/texts
On this tab page, you determine whether or not the characteristic can have
attributes or texts. If the characteristic is to have its own texts, you need
to make at least one text selection (short, medium-length, long text- 20,
40, 60 characters). The attributes are assigned to the characteristic on the
Attributes tab page.
Patni Internal
Page 21 of 205
SAP BW
Attributes
Attributes are themselves InfoObjects (characteristics/key figures) that are
used to describe characteristics in greater detail. For example, the
characteristic Customer Number can be described in more detail with other
InfoObjects like Customer Type and Customer Class, Address etc. If the
With master data indicator was set on the Master data/texts tab page you
are able to specify attributes and properties for these attributes together
with the characteristic on the Attributes tab page.
Patni Internal
Page 22 of 205
SAP BW
Page 23 of 205
SAP BW
Example: The characteristic InfoObject "cost center" has the navigation
attribute "company code" (amongst others). In turn, this characteristic has
the navigation attribute "company". In this case, "company" is a transitive
attribute that you could activate as navigation attribute.
Note:
Remarks:
Changes for hierarchies are available only after the data change aggregate
update program has been run. This is true even if there are no aggregates
associated with the hierarchies.
Patni Internal
Page 24 of 205
SAP BW
When using hierarchies you should filter out the Not assigned node in the
hierarchy. Often the user does not notice that all nodes are included in the
output (even the ones that are not needed or blank), but it slows down the
query result because a lot of useless data is being selected.
A hierarchy can be created using three methods:
1. Import from flat file
2. Manual creation in BW
3. Import from SAP R/3 (preferred option)
Two components of interest for hierarchies are:
Leaves. A leaf is a characteristic value and represents the last level
of a hierarchy. The SID value for a leave is a positive random integer.
Node. A node is a set of leaves in a hierarchy. The SID value for a
node is a negative random integer.
A Version-Dependant Hierarchy
Page 25 of 205
SAP BW
shown in the Table 2.1, District 2 is placed under North region in the
planned version but is under South region in the actual version.
Hierarchy Version PLAN
Region NORTH
District 1
District 2
District 3
Region SOUTH
District 4
Region SOUTH
District 2
District 4
Table 2.1: Version-dependant Hierarchy
Hierarchy
01.01.2006 31.12.2009
Region NORTH
District 1
District 3
Region SOUTH
District 4
Region SOUTH
District 2
District 4
Table 2.2: Time-dependant Entire Hierarchy
Page 26 of 205
SAP BW
Hierarchy Intervals
It is possible to position characteristic values in the form of intervals under
a hierarchy node. Instead of positioning each cost element value for
material costs under the material costs node individually in a cost element
hierarchy, you can specify the cost element values as a cost element
between 100 and 1000. You can also create intervals for characteristic
values, for which no master data exists. As a result, you can save yourself
the need to extend the hierarchy every time for new master data.
Note:
Compounding
In Compounding, a field or another object is attached to an InfoObject. A
compounding characteristic is when the objects definition is incomplete
without the definition of another characteristic. In other words the meaning
of master data depends on the source of the data.
Patni Internal
Page 27 of 205
SAP BW
On this tab page, you determine whether or not the characteristic is to be
compounded to other InfoObjects. You often need to "compound"
characteristic values to enable characteristic values to be assigned
uniquely.
Example:
Cost center 100 stands for sales and distribution in controlling area 1000,
and it also stands for sales in controlling area 2000. In this case, you would
define a "cost center" to "controlling area" characteristic compounding.
In addition, compounding can be used to define dependencies between
objects. This simplifies navigation in reporting.
Page 28 of 205
SAP BW
CO. Cost center has a compound object controlling area.
MM. Storage location has a compound object plant.
A compound field is similar to a superior organizational field in SAP R/3.
2.4.
Page 29 of 205
SAP BW
General
Business Explorer
Master data/texts
Hierarchy
Attributes
Compounding
Page 30 of 205
SAP BW
the InfoArea NODESNOTCONNECTED (non-assigned nodes). However, these
InfoObjects can be assigned to an InfoObject Catalog at any time. When an
InfoObject Catalog is deleted, the InfoObjects assigned to it are not deleted
along with it. Instead, the non-assigned characteristic or non-assigned key
figures are assigned to the appropriate InfoObject Catalog.
2.5.
Key Figures
As we know, the key figure InfoObjects represent the business facts such as
quantity, amount, count and so on. The following tab pages are available in
the maintenance menu, with which you can define key figure InfoObjects
and change settings.
Type/Unit
Aggregation
Additional Properties
2.5.1. Type/Unit
On this tab page, you determine the key figure type (amount, quantity,
number etc.), the data type (currency field / floating point number,
quantity filed/ floating point number etc.) as well as the currency /
quantity unit.
Patni Internal
Page 31 of 205
SAP BW
For the key figure types amount, quantity and number, you can choose
between the data types decimal number and floating-point number. For the
date and time key figure types, you can choose the decimal display if these
fields are to be included in the calculation. If you choose the amount or
quantity key figure type, you must assign a currency or quantity unit to this
key figure. For the key figure type amount, you can choose between a fixed
currency (EUR, for example) and a variable currency, (OCURRENCY) for
example.
For the key figure type quantity, you can choose between a fixed quantity
unit, KG for example, or a variable quantity unit, OUNIT for example.
2.5.2. Aggregation
Default BEx settings for aggregation of the key figure are done using this tab
page. This is required for the meaningful evaluation of the key figure. The
aggregation behavior determines whether or not, and in which way, the key
figure values can be summarized using the different characteristics/their
values within the evaluation.
Patni Internal
Page 32 of 205
SAP BW
2.5.3. Aggregation
In this field, you specify the function (SUM/MAX/MIN) which determines the
way in which the key figure is aggregated "by default" for the same key (->standard aggregation behavior).
2.5.3.1. Exception Aggregation
In this field, you specify the function (last value, first value, max, min...)
which determines the way in which the key figure is aggregated using the
reference characteristic for exception aggregation in the Business Explorer.
2.5.3.2. Reference Characteristic for Exception Aggregation
In this field, you choose the characteristic, with reference to which the key
figure is aggregated with exception aggregation. Generally this is a time
characteristic. However, it can be any characteristic.
Example:
The key figure number of employees is aggregated using the characteristic
cost center ( Standard aggregation behavior). In this case, you would set a
time characteristic as a reference characteristic with last value as the
exception aggregation.
2.5.3.3. Cumulative/Non-cumulative Values
Cumulative values (revenue, for example) are key figures for which key
figure values must be posted in every time unit that is being reported on
(time period-specific values).
Non-cumulative values (warehouse stock, for example) are key figures that
are only evaluated for selected time periods (markers).
The values for the remaining periods are calculated from the value in a
marker and the non-cumulative changes (in-/out- flow) that lie in between.
There are two ways of defining non-cumulative values:
Non-cumulative with Non-Cumulative Value Change
When defining the non-cumulative value, a cumulative value is also required
as a key figure InfoObject (non-cumulative value change). This must agree
with the non-cumulative value to be defined in the type definition.
Non-cumulative with In- and Out-flow
When defining the non-cumulative value, two cumulative values, "inflow"
and outflow are required. These must agree with the non-cumulative
value to be defined in the type definition.
Page 33 of 205
SAP BW
characteristics - in other words, including time characteristics- have the
aggregation summation.
The cumulative non-cumulative value change, inflow and outflow must
have summation as their default- and exception aggregation. To optimize
the data transport and handling for non-cumulative values in SAP BW, noncumulative values are handled differently to cumulative values. This also
applies for technical data transfer and storage. There are no differences in
the way cumulative- and non-cumulative values are handled in reporting.
Page 34 of 205
SAP BW
(If a key figure is defined with a reference, the additional tab page
Elimination also appears.)
2.6.
InfoCubes
Patni Internal
Page 35 of 205
SAP BW
There are following InfoCube types in SAP BW:
Basis Cube (star schema). Combination of 1 fact table and up to 16
dimension tables (standard InfoCube)
Only BasisCubes physically contain data in the database. By doing so, they
are also data targets. In contrast, Virtual Cubes only represent logical
views of a dataset. There is no difference between these InfoCube types as
far as the reporting end user is concerned. Queries can be defined based on
all the above InfoCube types. InfoCubes are thus InfoProviders.
Physical Data Stores:
Basic Cubes
InfoObjects (characteristics with attributes or texts)
ODS objects that have the indicator for BEx reporting
Virtual Data Stores:
InfoSets
Remote Cubes
SAP Remote Cubes
Multi-Providers
2.7.
BasisCubes
Fact table
A BasisCube consists of one fact table, in which key figure values are
stored. A fact table can contain a maximum of 233 key figures.
The star schema is based on facts and fact tables. Facts are data elements
from a fact table.
Patni Internal
Page 36 of 205
SAP BW
Fact
Page 37 of 205
SAP BW
to access the Unit dimension table during queries, which may cause
degradation in system performance. Therefore, for query
performance, key figure InfoObjects of type Number or Integer
should be used whenever possible (unless you really plan to do
currency/unit conversions in the queries).
2. Data package dimension table This dimension is always present in
a BasisCube. To identify discrete packets of information loaded into
the InfoCube (this is needed to delete, reload, or maintain packets
individually)
3. Time dimension Table - This dimension is always present in a
Patni Internal
Page 38 of 205
SAP BW
Dimensions
Characteristics can be defined as line items. In other words, aside from this
characteristic, no other characteristics can be assigned to a dimension. This
kind of dimension is called a line item dimension (degenerated dimension).
This option is used when a characteristic has a large number of values
(order number, for example), which, in combination with other
characteristics, would lead to a large increase in dimension tables for the
fact table, detrimentally affecting query performance.
Figure 2.11 shows how the line item dimension does not have any dimension
tables, in contrast to the normal dimension. In this case, the SID table of
the line item is directly connected to the fact table by way of the external
primary key relationships.
Remote Cube
A Remote Cube is also called a Virtual Cube. It is an InfoCube whose
transaction data are not managed in SAP BW but in a remote system.
Benefits of Remote Cubes are:
They do not store data in SAP BW.
Only the structure of the Remote Cube is defined in SAP BW.
Patni Internal
Page 39 of 205
SAP BW
SAP Remote Cubes. The SAP Remote Cube is a Remote Cube that
allows the definition of queries with direct access to transaction data
in other SAP systems.
2.8.
Patni Internal
Page 40 of 205
SAP BW
Patni Internal
Page 41 of 205
SAP BW
10. Using the Key figures tab page, transfer the active key figure
InfoObjects, from the template list. You need at least one key figure
in an InfoCube. Referenced InfoObjects like 0UNIT and 0CURRENCY
are transferred automatically.
Patni Internal
Page 42 of 205
SAP BW
Patni Internal
Page 43 of 205
SAP BW
Note: You can mark a dimension as a line item dimension. In addition, you
can also set the Card. Height indicator to indicate high cardinality. This is
used if the dimension has at least 10-20% the size of the fat table in terms
of number of records. In this case, B tree indices are created instead of
bitmap indices.
12. Using Assign tab page, assign the characteristics to dimensions.
13. For better performance, partition the InfoCube using Extra
Partitioning menu.
The number of partitions depends upon the span of time for which the
data is stored in the InfoCube and the actual volume of data. E.g. As
shown in the Figure 2.17, out of total 62 partitions, 60 partitions
correspond to months ranging from January2001 to December2005.
Patni Internal
Page 44 of 205
SAP BW
One partition is for the transaction data before January2001 and one is
for the data after December2005.
If you want to partition an InfoCube that already has data in it, you
need to create a new InfoCube and partition it, then move data
from the non-partitioned InfoCube to this partitioned InfoCube.
Patni Internal
Page 45 of 205
SAP BW
2.9.
Patni Internal
Page 46 of 205
SAP BW
The graphic shows the structure of the text table, for characteristic
COSTC##: in this example. Since the indicators for short text, mediumlength text, time and language-dependence were set on the Master
data/texts tab page, these fields are included in the structure of the text
table.
Legend:
{...} "Compounded" characteristic
/BIC/<...> Newly-created characteristic
LANGU Language key
DATETO Date valid to
DATEFROM Date valid from
TXTSH Short description (20 characters)
TXTMD Medium-Iength description (40 characters)
TXTLG Long text description (60 characters)
Patni Internal
Page 47 of 205
SAP BW
If you have not deselected the indicator in the With master data checkbox
(the checkbox is checked by default) on the Master Data/texts tab page,
you can maintain attributes for the master data-carrying characteristics on
the Attributes tab page. You can choose to define display attributes and
navigation attributes as either time-dependent or time-independent. In this
section, we only look at display attributes in greater detail. A maximum of
two attribute tables can be generated for display attributes (timedependent and time-independent attributes) for each master data-carrying
characteristic.
Providing that one of either the P or Q table exists, a view (/BIC/M<Name of
characteristic> of P or Q or P and Q is generated.
Patni Internal
Page 48 of 205
SAP BW
Page 49 of 205
SAP BW
Attribute for a master data-carrying characteristic.
OBJVERS has two statuses: A = Active (the data can be used for reports) and
M = modified/revised.
CHANGED also has two statuses: I = Entry marked for insertion and D = Entry
marked for deletion.
The following example throws light on the connection between OBJVERS
and CHANGED:
Example:
Page 50 of 205
SAP BW
activate this modified data record explicitly to make it available for
queries. Up until activation, the active, unmodified data records are used in
reports. After the master data has been activated, the modified data
records are given status A and the old data records are deleted.
2.9.4. Hierarchies
The hierarchy table (H table) is used to store the hierarchical relationships
between characteristic values, when external hierarchies are used for the
characteristic. Only one H table is ever generated even if a characteristic
contains several hierarchies. In other words, the H table contains all
hierarchies.
If the complete hierarchy is time-dependent, the DATETO and DATEFROM
fields do not appear in the H table. They appear as global fields (Meta
information) in table RSHIEDIR. This also applies for the VERSION field for
version-dependent hierarchies. Conversely, when the hierarchy structure is
time-dependent, the date fields mentioned above appear in the H table.
Patni Internal
Page 51 of 205
SAP BW
Legend:
HIEID - Internal hierarchy ID (unique ID)
Patni Internal
Page 52 of 205
SAP BW
NODEID -Internal ID number of a hierarchy node
IOBJNM - InfoObject
NODENAME - Name of the hierarchy node
TLEVEL - Level of a hierarchy node
LINK - Link indicator for a hierarchy node
PARENTID - Parent ID for a hierarchy node
CHILDID - Child ID of a hierarchy node
NEXTID - Next ID of a hierarchy node
INTERVL - Indicator: Node is interval
In this graphic, you can see the content of the H table after a hierarchy was
loaded into SAP BW for characteristic 0COUNTRY, or after a hierarchy was
created and activated (simplified display) in SAP BW. Setting the indicator
in the INTERVL field permits intervals in this hierarchy, which means these
are modeled in the J table. The second row of the example hierarchy is
looked at more closely to help you better understand the structure of the
table. You can see from the NODEID field that this is the second node of this
hierarchy. The PARENTID field shows that the superordinate node has
NODEID 1. In this example, the superordinate node is the root node. The
CHILDID field denotes the subordinate node and the NEXTID denotes the
adjacent (next) node. In this example, the subordinate node is Austria and
the adjacent node is the USA
Page 53 of 205
SAP BW
2.9.6. S Table
Page 54 of 205
SAP BW
example of the profit center navigation attribute for the master datacarrying characteristic COSTC##. The graphic has been simplified.
Patni Internal
Page 55 of 205
SAP BW
Patni Internal
Page 56 of 205
SAP BW
In this table, negative SID values are assigned to the nodes. The following
graphic shows a K table for a characteristic with a time-independent
hierarchy.
Inclusion Table
In theory, this table contains the same information as the H table, meaning
that it displays the relationships between nodes/nodes and nodes/leaves.
Here, the leaves (characteristic values) are assigned positive SID values and
the nodes are assigned negative SID values (K table). The following graphic
shows the I table for a characteristic with a time-independent hierarchy.
Patni Internal
Page 57 of 205
SAP BW
Legend:
SID OSID LINKNO SVER PRED SUCC LISTNO FACTOR NTYPEID -
In this graphic, you can see example K and I tables after a hierarchy was
loaded into SAP BW for characteristic OCOUNTRY, or after a hierarchy was
created and activated (simplified display) in SAP BW.
Patni Internal
Page 58 of 205
SAP BW
Figure 2.31: Hierarchy Example
InfoCube Tables
This section looks at the structure of the dimension tables and the F- and
E tables.
Dimension Tables
Legend:
[]
Technical name of InfoCubes
#
Numeration of the dimensions automatically allocated by the system.
The DIM numbers contain the following elements: P, T, V, 1, 2... 9,A,B, C,
D.
P
Data package
T
Time
U
Unit
Patni Internal
Page 59 of 205
SAP BW
A
B
C
D
10
11
12
13
Each BasisCube generates two fact tables, the F and E tables, after
activation. Both tables have the same columns.
The structure of the fact tables in the SAP BW star schema is the same as
that in the Basis star schema. The keys of the dimension tables (DIM IDs) are
the foreign keys of the fact table. Each row of the fact table is uniquely
identified by a combination of DIMID values.
2.9.10.1. Differences between the F and E tables:
The F table is optimized for data loading, since the data is always
automatically partitioned using the package dimension. As a result, you are
able to administer each individual data request separately. The E table is
optimized for data requests, since the DMID of the package dimension is set
to zero, thus reducing the key combination. Data records having the same
key values are compressed. The figure 50 shows the relationship between
fact tables and dimension tables.
Patni Internal
Page 60 of 205
SAP BW
/BIC/F<technical name of BasisCube> (F table for a customer-defined
BasisCube)
/BIC/E<technical name of BasisCube> (E table for a customer-defined
BasisCube)
/BI0/F<technical name of BasisCube> (F table for a SAP standard BasisCube)
/BI0/E<technical name of BasisCube> (E table for an SAP standard
BasisCube)
Transaction LISTSCHEMA shows you tables for the structure of the InfoCube.
In addition, you can also display the attribute tables for the characteristics
involved in the InfoCube. Hierarchy tables, text tables and the E table are
not shown.
Patni Internal
Page 61 of 205
SAP BW
3.1.1. Definition
DTP is an object that determines how data is transferred between two
persistent objects E.g. from Staging (PSA) layer to Enterprise Data
Warehousing Layer, or from Enterprise Data Warehousing Layer to
Architected Data Marts Layer.
Patni Internal
Page 62 of 205
SAP BW
The figure 1.1 illustrates an example of a data update from the DataSource
to an InfoProvider. The data can be updated from an InfoProvider to
another InfoProvider using a data transfer process. The data transfer
process can also be used to control data distribution from a BI system into
any target outside of the BI system. For this purpose, a data transfer
process with an open hub destination is used as the target. The following
are the ways of data transfer:
The InfoPackage controls the transfer of data from the source to the
entry layer of BI.
The data transfer process controls the distribution of data within BI.
By using Infospoke BI can be used as the source system, whereby he
data can be loaded from BI to any other destination.
Patni Internal
Page 63 of 205
SAP BW
3.2.
Within SAP Netweaver 2004s infopackages can only load data from source
system to PSA without any semantic transformation. What can be done here
is a technical transformation (e.g. conversion exit to transform data from
external format to internal format). Transformations can be defined
between a source and a target for data transformation or conversion. DTP is
responsible for data loading from one persistent layer to the other. Every
path from persistent source to target is a DTP. This means that besides
InfoSource any other objects like InfoProviders, DataSources, DSO can be
the source or target for the DTP. Consider the following example:
Infopackages only can load data from Source System to PSA without
any semantic transformation
PSA will physically store the data
Data can be loaded from PSA to DSO via DTP
All the infopackages and DTPs should be included in process chain for
automations.
Patni Internal
Page 64 of 205
SAP BW
3.3.
Patni Internal
Page 65 of 205
SAP BW
Patni Internal
Page 66 of 205
SAP BW
Patni Internal
Page 67 of 205
SAP BW
Within the execute tab we can see all the process steps during the
data loading
Process step filters out records with the same key
It means if error handling is switched on and there are infoobjects
which have the update mode overwrite in the transformation, new
records with the same key at the incorrect records will be filtered
out during data loading
Patni Internal
Page 68 of 205
SAP BW
3.4.
Page 69 of 205
SAP BW
3.5.
Patni Internal
Page 70 of 205
SAP BW
Key of the error stack can be defined in the Semantic Groups option
Maximum 16 key fields are possible
It defines which data should be detained from the update after the
erroneous data record (for DSO)
By default the key is same as complete target key (key of DSO)
Patni Internal
Page 71 of 205
SAP BW
Patni Internal
Page 72 of 205
SAP BW
During the transformation, the data records for request 109882 are
aggregated to one data record. If, for example, there is no SID for the
characteristic value order number 1000, the record is interpreted as
erroneous. It is not updated to the target. Those data records that form the
aggregated data record are written to the error stack.
Patni Internal
Page 73 of 205
SAP BW
Figure 1.5.5: Error Stack Example
The Order Number field is the key for the error stack. During the
transformation, data record 01 of request 109883 is identified as
containing errors. It is written to the error stack. Any data records from the
previous request that have the same key were updated successfully to the
target.
3.6.
Patni Internal
Page 74 of 205
SAP BW
In the temporary data storage we can see all records correct and
incorrect. Incorrect records are marked with a special symbol.
Patni Internal
Page 75 of 205
SAP BW
3.7.
In the error stack we can see only incorrect records. Here we can
correct these records manually.
DTP Monitor
Patni Internal
Page 76 of 205
SAP BW
Patni Internal
Page 77 of 205
SAP BW
Patni Internal
Page 78 of 205
SAP BW
5) Once Error DTP gets created, we can check the status of Standard DTP
which is changed from create to display, and can also check the Error DTP
under the Object for which we created the standard DTP.
6) Error DTP
Patni Internal
Page 79 of 205
SAP BW
8) In the Error DTP process monitor its showing 3 records that we corrected
in Error Stack in earlier steps.
Patni Internal
Page 80 of 205
SAP BW
9) We can also check the status of Standard DTP, its also Green now
(without errors).
10) We can also check the records updated status of Standard and Error DTP
in the manage tab of data target.
Patni Internal
Page 81 of 205
SAP BW
3.8.
You can use the Manage function to display the content of the fact table or
concrete characteristic values (from a view of the table provided by the
data browser). You can also repair and reconstruct indexes, delete
erroneously loaded requests, roll up requests in the aggregates, compress
the content of the fact tab1e, and reload requests that were deleted from
the BasicCube. Select the BasicCube to be managed and from the context
menu, choose Manage. Six tab pages appear:
Contents
Performance
Requests
Rollup
Collapse
Reconstruct
The graphic displays the initial screen for InfoCube Management, including
the tab pages mentioned above.
Patni Internal
Page 82 of 205
SAP BW
Figure 4.22: Manage InfoCube
3.8.2. Contents
This tab page lists all characteristics involved in the BasicCube for the
associated dimensions. Via InfoCube Content, you can display the key figure
values for the BasicCube, as well as the characteristics, SIDs for the
characteristics and key figures of the Cube via a view. Fact Table can be
used to display a list of all dimension keys and key figures for the individual
transaction data records (the fact table content).
Via Selection, you can use a pre-selection to delete the data records
matching these selection criteria from the BasicCube. If you select the cost
center having cost center number T900000004250, all data records with this
value are deleted from the BasicCube.
Patni Internal
Page 83 of 205
SAP BW
Choose Do not use any conversion to display the data in the database
formats
Choose Use mat. Aggregates to display the data from an aggregate
instead of the fact table if an appropriate aggregate exists
Choose Use DB aggregation to allow aggregation on the fields that
are not the selection condition
Choose Output number of hits to add a new column in the display to
show how many records in the fact table are used to produce each
display row
Choose Display modified structures to display the M version master
data. You use this option to check how the result would look in BEx
should the characteristic data be activated
Patni Internal
Page 84 of 205
SAP BW
In this pop-up window, we can specify the data to be deleted and how to
delete them by clicking Delete selection button.
3.8.3. Performance
This tab page allows you to influence load and query performance using the
Delete Indexes, Repair Indexes and Create Index (Batch) functions.
Patni Internal
Page 85 of 205
SAP BW
Note that the status light should always be green. If no index/statistics data
exist, the status lights will be red.
Depending on the size of the InfoCube, it may take some time for the
status light to turn green/red
To improve data loading performance, it is recommended that you
delete the indexes, load the data, and the recreate the indexes. To
automate this job, click Create Index button
Patni Internal
Page 86 of 205
SAP BW
Check all the options and click Execute Changes button. Pl note that the
next time when you load data into this InfoCube, you will receive a
message, just click Yes button
Indexes are use to locate needed records in a database table quickly. SAPBW uses two types of indexes B-tree for database tables and bitmap indexes
for fact tables and aggregate tables. For a SQL statement, many execution
plans are possible. The database optimizer generates the most efficient
execution plan based on either the heuristic ranking of available execution
plans. The cost based optimizer uses statistics to calculate the cost of
available execution plans and select the most appropriate one for
execution.
3.8.4. Requests
All requests (data requests) that were loaded into the BasicCube are
displayed on this tab page. In BW, each data load from BW Scheduler is
considered as a request and is assigned a unique request number consisting
of 30 characters and is stored as an integer value called a request id, in the
data packet dimension of the InfoCube.
You can also delete request where required. The system displays whether
requests have been scheduled for aggregation or already aggregated. You
can also see whether requests have been compressed or have been
scheduled for deletion.
Patni Internal
Page 87 of 205
SAP BW
You can enter an update period in the Request Display row to restrict the
number of displayed requests.
On the Request tab page, you can see the status (red, yellow, green) of
previous data load processes. The following table shows the values of the
request ID status:
Patni Internal
Page 88 of 205
SAP BW
Each request has its own unique number (request ID). You can see this in
the following graphic. By using a request ID (a unique key generated by the
system) to indicate each request, the system can maintain a chronological
update history. It allows the system administrator to identify specific
upload sequences that had errors.
During extraction, the data requested in each request is taken from the
source system and packed in packages within the request, before being
loaded into SAP BW.
When executing a query, data packages with the status "red" or "yellow"
cannot be taken into consideration. Data packages having status "green"
that are loaded at a later time are also not used in the query here. If this
were not the case, the consistency of data within the query could not be
guaranteed.
To delete a request from the InfoCube, click Delete button. If the request
has been rolled up into an aggregate or compressed, then you cannot delete
it. If it has been rolled up, then the aggregate must be deactivated first. If
it has been compressed, then all data in the fact table must be deleted
first.
BW provides a useful function that allows us to check whether one data load
request overlaps with another. For that select request 31501 and then click
Patni Internal
Page 89 of 205
SAP BW
A new session window opens and displays the requests 30 character request
number
Patni Internal
Page 90 of 205
SAP BW
Click
to check the overlapping. The result contains information about
the overlapping. If overlapping is present, the result also tells us whether
we can delete the request.
3.8.5. Rollup
If activated and filled aggregates exist for the BasicCube and you then load
new requests into the BasicCube, you need to roll these up into the
aggregates as well.
3.8.6. Compress/Collapse
As mentioned above, each data load process is uniquely identified within a
BasicCube using a request ID, which is included in the package dimension.
This allows you to look at individual requests in detail. Using request Ids can
have the effect that a data record with the same content (where all
characters are the same except for the request ID) appears more than once
in the fact table. The result is an unnecessary increase in the data volume.
The greater data volume reduces performance in Reporting, since every
time a query is executed; the system accesses data via the request ID. This
is because data records are only aggregated within a request. To save
storage, space and improve read performance, you can compress a
BasicCube, whereby the request ID is set to null. Data records with the
Patni Internal
Page 91 of 205
SAP BW
same dimension key are aggregated. During compression, data records are
written to the BasicCube E table and the compressed requests are removed
from the F table. Newly requested requests are written again to the F table
and can then be compressed if required (see graphic).
Patni Internal
Page 92 of 205
SAP BW
The Collapse tab page deals with the InfoCube compression. As mentioned
earlier, each InfoCube has two fact tables: the F and E fact table. We load
data into the F fact table, where the dates are grouped according to load
request. The F table allows us to check for overlapping requests and to
delete unnecessary requests. Note that F fact table is an overhead in terms
of performance and space utilization. Further, while executing a query, the
OLAP processor must aggregate key figures to eliminate the request
information in the data packet dimension.
Therefore, BW allows us to aggregate the F table and saves the aggregated
data in the E fact table and this process is called InfoCube Compression.
Upon compression, request id is set to zero and hence not available.
For instance, we want to compress request 31839, enter 31839 into the
Request ID and then click
. BW will compress 31839and
request below 31839. However, to delete records whose key figures are all
0, select the With Zero Elimination.
On order to delete a compressed request, we must either delete all off the
E Fact table data or use the Request reverse posting (Read everything in
manually) function in the Monitor-Administrator Workbench.
Patni Internal
Page 93 of 205
SAP BW
3.8.8. Reconstruct
You can use this function to reconstruct requests that were already rolled
up into a BasicCube and that have since been deleted (update requests into
the BasicCube).
This function can only be used when the data is held in the PSA.
By accessing the Contents tab page in BasicCube management, you are able
to extract BasicCube data into an external file, or a new or existing DB
table. This is useful in situations where some of the collected data is to be
used in other analysis tools (for example, a different planning tool than SAP
Patni Internal
Page 94 of 205
SAP BW
Strategic Enterprise management). You must make the following settings on
the selection screen:
Select the fields for output in the file
Specify selection values for characteristics
Select the file type and name of the file to be generated, as well as the
location where the file is to be saved.
The system transfers the data after you confirm your entries. By default,
the data is returned as a display list.
3.9.
Using BW Monitor
BW Monitor enables us to trouble shoot during the load process. Simply put,
you may use BW Monitor to display the status of data loads and find out
when, where, and how errors (if any) occurred.
Patni Internal
Page 95 of 205
SAP BW
Click
to continue. Leave Date Selection blank, as we want to
list the status of all data loads.
We see the status of all data load (successful and failed). Double
click on the last failed load operation to get the details.
Patni Internal
Page 96 of 205
SAP BW
Click
under Status tab to display the error. The
message box is displayed.
Under the Details tab page, we can see how the data flowed and
where the errors have occurred.
Patni Internal
Page 97 of 205
SAP BW
To review the status of other data loads, we can click New Selection (F5)
button
Patni Internal
Page 98 of 205
SAP BW
Patni Internal
Page 99 of 205
SAP BW
4.1.
1. Context Menu:
Direct Access to display data
Additional Functions
SAP BW
Patni Internal
SAP BW
4.2.
WriteOptimized
Direct
Update
Primary Usage
EDW
Layer
ODS
Layer
Delta
Capability
Delta
determination
from
after
images
on
record level
On
request
level
No
delta
capability
Table Structure
Fast
Access(No
Activation)
Others
Activation
Queue
Active
Data
Change
Log
Staging Layer,
especially for
large sets of
data
with
unique key
For
external
applications
and
analysis
processes(APD)
Via
Staging(DTP)
Via
Staging(DTP)
Via
APIs,
staging into
subsequent
targets
possible
Patni Internal
Integration
into
Dataflow
SAP BW
1) SIDs Generation upon Activation
Improves Query performance
Queries are also possible if SID values are not generated
2) Unique Data Records
Available only if SIDs Generation upon Activation is set.
Activation Process is optimized.
3) For non-reporting scenarios write optimized DSOs are recommended
than standard DSOs
4) Enhanced Activation Process:
Instead of the key field request GUID there is a key field
request SID used within the Activation Queue
Because of this modified structure there is no expensive
join to the request SID table necessary.
Also there is the package fetched used instead of the single
dataset fetch during the activation process (In addition to
that there is only one loop over the activation loop
implemented now; for restarting there is no further loop
necessary because the packages are stored temporarily in
the cluster tables)
5) Structure (Tables):
Structure of the Standard Data Store Object is similar to that of the
standard ODS in BW3.5
Contains 1. Activation Queue
2. Active Data
3. Change Log
Activation Queue:
Patni Internal
SAP BW
Change Log:
Patni Internal
SAP BW
SAP BW
1. Definition:
SAP BW
2. The uniqueness of the data can be switched off with a check box
Definition:
- This indicator is only relevant for write-optimized Data Store
Objects. The technical key for these objects in the active table
always consists of the fields Request ID, Data Package and Data
Record. The infoobjects that appear in the maintenance dialog in the
folder Key Fields from the semantic key of the Data Store Object.
- If this indicator is set, a unique index with the technical name KEY
is generated for the infoobjects in the semantic key.
- If this indicator is not set, the active table of the Data Store Object
could contain several records with the same key.
3. On Data Warehousing Workbench:
SAP BW
1. Definition:
2. The Data Store Object for direct update is perfect for using it for
external data.
There is an API available with various function modules:
- BAPI BAPI_ODSO_READ _DATA_UC
- RSDRI_ODSO_INSERT
- RSDRI_ODSO_INSERT_RFC
- RSDRI_ODSO_MODIFY
- RSDRI_ODSO_MODIFY_RFC
- RSDRI_ODSO_UPDATE
- RSDRI_ODSO_UPDATE_RFC
- RSDRI_ODSO_DELETE_RFC
3. On Data Warehousing Workbench:
Patni Internal
SAP BW
4.3.
4.3.1. Overview
There is new monitor concept installed for the Data Store Object
administration:
Load monitor like 3.X Monitor
Logs for DSO- request processing
Frames like Contents and Reconstruction are same as that of earlier
version.
a) Load Monitor:
Monitor view is divided into two frames
Header view and
Details view
Header View: Displays all relevant objects which do depend to the transfer
process.
Patni Internal
SAP BW
Details View: Displays all the relevant steps with timestamp of the transfer
process.
SAP BW
can
also
be
viewed
via
transaction
Parameters Required:
Request ID
Name of the Data Store Object
Patni Internal
SAP BW
4.4.
1. Partitioning/Clustering
Patni Internal
SAP BW
3. Indexing:
Patni Internal
SAP BW
5 MultiProviders
Sometimes, there are complex reporting demands for which you need to
combine data from several InfoCubes. These complex requests are carried
out using a MultiProvider. MultiProviders enable us to combine any
InfoProviders you choose in order to build a new semantic layer for
reporting, with having to change the data store.
An InfoProvider is an object using which queries can be defined and
evaluated. InfoProviders are the objects / views relevant to reporting. For
this reason it does not matter if these objects contain data or not.
InfoProviders can be:
InfoCubes (BasisCubes, virtual cubes)
ODS objects
InfoSets
MultiProviders
According to the above definition, data targets are also always InfoProviders
(but not vice versa).
A MultiProvider is a special InfoProvider that combines data from several
InfoProviders, providing it for reporting. The MultiProvider itself does not
contain new data. Its data comes exclusively from the InfoProviders on
which it is based. A MultiProvider can be made up of various combinations
of the following InfoProviders:
InfoCube
ODS object
InfoObject
InfoSet
A MultiProvider allows reporting using several InfoProviders. For example,
InfoCube and InfoCube: You have an InfoProvider with actual data for a
logically self-contained business area as well as a corresponding
InfoProvider with plan data. You can combine t6he two InfoProviders ZINTO
A MultiProvider to compare actual and plan data in a query. a combination
of two InfoCubes was still referred to as a MultiCube in BW Release 2.0b /
2.1 c.
Patni Internal
SAP BW
5.1.
Advantages of MultiProvider
This concept provides you with advanced analysis options, without you
having to fill new and extremely large InfoCubes with data. You can
construct simpler BasisCubes with smaller tables and with less
redundancy.
The individual BasisCubes and ODS objects can be individually
partitioned.
MultiCube only exists as long as a logical definition. The data is still stored
in the InfoProviders on which they are based.
In a MultiProvider, each characteristic of the MultiProvider must match
precisely one characteristic or navigation attribute in each InfoProvider
involved.
5.2.
Three BasisCubes are available. The first BasisCube contains customer order
data, the second contains delivery data and the third billing data. The three
BasisCubes have the following common characteristics: ONUM(order
number), CUS (customer) and PROD (product).
Patni Internal
SAP BW
Sales Order
Delivery
Billing
Sales Process
ONUM : Order Number (C)
CUS : Customer (C)
PROD : Product (C)
OQTY : Order Quantity (K)
OPRI : Order Price (K)
DQTY : Delivered Quantity (K)
DPRI : Delivery Price (K)
BQTY : Billing Quantity (K)
BPRI : Billing Price (K)
Sales Order
Delivery
ONUM : Order Number (C)
Billing
ONUM : Order Number (C)
Patni Internal
SAP BW
A query executed using a MultiProvider is divided up across the involved
InfoCubes using several select statements, which can be processed in
parallel. This gives you further improvement in system performance. The
OLAP processor presents the combination of the results from the individual
select statements as the query result.
In case where a characteristic does not have a corresponding characteristic
in a particular BasisCube, the data is presented in the query with the
characteristic value Not Assigned.
MultiProvider Queries
MultiCube
Sales Process
Info
Cube
Sales Order
Info
Cube
Billing
Info Cube
Delivery
Patni Internal
SAP BW
5.3.
Creating a MultiProvider
1. In the context menu for your InfoArea, right Click and choose Create
MultiProvider
SAP BW
In the subsequent window, you can select the objects involved in the MultiProvider
viz., InfoCubes/ODS Objectstab page and the click
Patni Internal
SAP BW
Patni Internal
SAP BW
. Confirm
assign
the
characteristics
to
the
dimensions,
choose,
Patni Internal
SAP BW
Patni Internal
SAP BW
8. Choose
. Assign a time characteristics of the
MultiProvider to a time characteristics of appropriate objects or simply
choose
9. On the Key Figures tab, transfer all the proposed key figures into the
Structure from the Template.
Patni Internal
SAP BW
Patni Internal
SAP BW
6 Aggregates
Most end users need to access only a subset of information. In that case, we
would create a new InfoCube, which contains only that information you are
seeking. This new InfoCube is actually a subset of the original InfoCube.
Because the new InfoCube is smaller, this requires disk I/O volume during
execution will be smaller too, and thus see an improved query performance.
SAP implements this idea in BW and calls the new InfoCube an aggregate.
An InfoCube can have multiple aggregates, and the aggregates are
transparent to users. It means that we create queries on InfoCubes, not on
aggregates. For a query run or a navigation step, the BW OLAP processor is
responsible for selecting an appropriate aggregate. If no appropriate
aggregate exists, the BW OLAP processor will retrieve data from the original
InfoCube.
An aggregate is a materialized, aggregated view of BasicCube data. In an
aggregate, the dataset for a BasicCube is stored redundantly and
persistently in summarized for on the database. Like database indexes,
aggregates also improve system performance without the need for end-user
intervention or end-users having to know how to perform this procedure,
Aggregates can be created for the following:
Characteristics
Attributes
Hierarchies
6.1.
Using Aggregates
The large quantity of data records in the fact table leads to poor query
response time. By using the aggregates, the data volume is reduced for each
query access, because the data is stored in a compressed form. This
increases the reading performance for queries. Within the aggregate, data
can be summarized by time, by characteristics, or by the available
hierarchies.
Too many aggregates may not be feasible because the rollup process takes
time and in spite of the query performance getting improved the ETL
process would take more time.
Aggregates should be created in the following cases:
Executing and navigating query data lead to delays when using a group
of queries
You want to expedite the execution and navigation of a specific query.
Patni Internal
SAP BW
Customer
Siemens
ABB
P&G
ABB
Colgate
Siemens
Sales
25
20
10
30
20
50
Country: *
Customer: Empty
Patni Internal
SAP BW
Country
Germany
USA
India
Sales
45
30
80
Country: Empty
Customer: *
Customer
Siemens
ABB
P&G
Colgate
Sales
75
50
10
20
Country: F, India
Customer: *
Country Customer Sales
India
ABB
30
India
Siemens
45
Country: H, Level 2
Customer: Empty
Country
America
Europe
Asia
Sales
30
45
80
SAP BW
Switch off the aggregate -The aggregate is still filled with data, but is
not used by the OLAP processor.
Deactivate the aggregate -The aggregate data is deleted. However, the
aggregate definition remains.
Delete the aggregate - The aggregate data and definition are deleted.
Patni Internal
SAP BW
The selection of characteristics for the aggregate needs to be restricted
so that you can keep data quantity in the aggregate to the minimum.
You can do this by having several data records occupy a similar
characteristic specification (aggregated performance). On the other
hand, you need to only select characteristics that are often used in the
queries.
Only create aggregates if a specific demand exists (queries)
Create a sample aggregate from the statistics if you are not sure which
characteristics you want to transfer into your aggregate. These statistics
are based on data from the statistics cubes (technical content lesson)
If time-dependency (key date) is needed in your aggregate, this key date
is filled by using a key date or a variable
Patni Internal
SAP BW
Figure 3.1: Request before Rolling Up
In the above figure, the first request with number 41239 was not rolled up
into the aggregate and is also Request is available for reporting is also not
clicked, hence is not available for reporting. In the RSDDAGGRDIR table, a
read pointer is set to request 40424 in the RNSID_TO field. This read pointer
refers to the OLAP processor, which request is available for reporting during
the query execution.
After the roll-up of request 41239, you see that the reporting request is
available, and the read pointer in the RSDDAGGRDIR table is set to request
41239.
SAP BW
during the roll-up. This removes the request ID. By doing so, a compression
can be executed across all the requests. Data records with the same
characteristic value are aggregated. If a request has to be deleted after the
compression then all aggregates have to be deactivated first. This can take
a long time. If you compress the aggregates first when the InfoCube is also
compressed, then it is possible to delete a rolled-up but not yet compressed
request without taking up a great amount of time.
6.1.6.1. Read Pointer
A read pointer reads the position of a new SID for combinations of
characteristics; for example, a new Request ID is generated during a change
in an InfoCube and related aggregates (roll-up). Reporting uses only the
request up to the RNSID of the Read pointer.
Read pointers are used to keep aggregate data and cube data in sync.
6.1.6.2. RNSID (Request Set ID)
RNSIDs are package IDs or InfoPackage IDs. The RNSID represents the
chronological update history defined with a unique key created from the
system for each load request and with the request for each data record.
Benefits of the RNSID include:
Improved performance
Identification of separate loads of data in the InfoCube and
aggregates
The RNSID is useful when it is necessary to remove or reload specific
batches of data to/from the InfoCube and aggregates.
Each data upload has a Request Set ID in the aggregates and the
InfoCube. The RNSID column is hidden in the fact table.
6.2.
Patni Internal
SAP BW
The (time) effort for a realignment run depends on the number of
navigation attributes (or hierarchies) and frequency of master data
uploads for the respective characteristic InfoObject.
During the realignment run you are only able to report on the old noncumulative from attributes/hierarchies. Active versions of the changes
are available when the change run has finished. This also applies to
reporting using InfoCubes that are not affected by the realignment run,
but do use the modified hierarchies and attributes.
You can check which objects are affected by the realignment run by
using the monitor function for the realignment run. This shows you
which characteristics and hierarchies are activated, and which
aggregates and BasicCubes are affected. If the realignment run is active,
then you can see whether the changes are already active for each
aggregate.
. Refer to figure:
Patni Internal
SAP BW
To change material HIBE to PAI and Short description to MONEY and then
save the changes. Go to SE16 and type /BIC/PMATERIALC-the name of the
database table. The following screen is displayed.
For material 59, you see that the A in the OBJVERS column indicates that
the corresponding entry is active, and the M indicates that the
corresponding entry is modified and to be activated. The D in the CHANGED
column indicates that the corresponding entry is to be deleted, and the I
indicates that the corresponding entry is new one.
Note: Upon execution of a query, you observe two things:
A query always retrieves the current texts as the text table does not
maintain the history of changes
A query always retrieves active master data i.e., HIBE instead of PAI.
There are two ways of activating master data. Choose Modeling>InfoObject->Your InfoArea->Your Characteristics (MaterialC). Right click
choose Activate master data, as shown in the figure.
Patni Internal
SAP BW
Patni Internal
SAP BW
Patni Internal
SAP BW
In the above screen, you can schedule the activation by clicking
to execute in background mode or schedule for
. To list changed
immediate execution by selecting
. The next dialog box is displayed
characteristic choose
which shows list of changed characteristics.
You cannot delete master data if they are used by other BW objects. The
SID table /BIC/SMATERIALC contents are shown in the next screen. The X in
column DATAFL indicates that an InfoCube uses the corresponding entry,
and the X in column INCFL indicates that a hierarchy uses the entry.
Patni Internal
SAP BW
Patni Internal
SAP BW
7 Admin Cockpit
We use the BI Administration Cockpit to perform administration tasks in BI
more simply and quickly. We can call the BI Administration Cockpit from the
BI Administration 1.0 business package in SAP Enterprise Portal. It supports
BI administrators in status monitoring and performance optimizing by
providing an overview of the objects and processes in BI systems. It provides
BI administrators with a central point of access that is focused on critical
situations and allows for navigation to more detailed information and error
handling and optimization applications.
SAP BW
Provides drilldown capability to handle errors and optimize
performance in the respective system.
We can use the new technical content, on which BI Admin cockpit is
based to create additional evolutions and reports. The technical
content has been enhanced in the following areas:
Complete redesign of query runtime statistics
Enhancement of data-load statistics to include statistics for
process chain and DTP.
Addition of current data load status of process chains and
processes
Addition of current status of loaded requests
BI Administrator Cockpit:
SAP BW
Areas:
Enterprise Data warehousing
Enterprise query, reporting and analysis
Business planning and analytical services BI queries
BI WAD
SAP netweaver portal
Providing a central point of entry with cockpits:
Real time monitors
Runtime statistics
8 Process Chains
8.1.
8.1.1.
8.1.2. Uses
In an operating BW system there are a multitude of processes in addition to
the loading process that occur regularly.
Process chains help us to
Automate the complex schedules in BW with the help of the eventcontrolled processing,
Visualize the schedule by using network applications, and
Centrally control and monitor the processes.
Patni Internal
SAP BW
8.2.
SAP BW
We also have the option to include process chains as processes themselves
in another process chain. In doing so, we need to determine whether we are
dealing with a local process chain or a remote process chain. A local
process chain comes from processes that are scheduled in the BW system
itself. It is scheduled as a process in the same BW system. A remote process
chain calls a process chain that needs to be run by using a destination in
another system. After terminating the process chain in another system, this
is confirmed in the BW system and terminates the remote process chain
there.
We can access the process maintenance screen via transaction RSPC. It
enables:
SAP BW
Collectors are used to manage multiple processes that feed into the
same subsequent process. The collectors available for BW are:
AND: All of the processes that are direct predecessors must send
an event in order for subsequent processes to be executed.
OR: At least one predecessor process must send an event. The
first predecessor process that sends an event triggers the
subsequent process.
EXOR: Exclusive OR is similar to regular OR, but there is only
ONE execution of the successor processes, even if several
predecessor processes raise an event.
Collector processes allow the designer of a process chain to trigger a
subsequent process based on whether certain conditions are met by
multiple predecessor processes.
Patni Internal
SAP BW
Short Text
Client
Page 144 of 205
SAP BW
MATNR CHAR
MTART CHAR
MATKL CHAR
18
4
9
0
0
0
Material Number
Material Type
Material Group
Fields
Short Text
Client
Language Key
Material Number
Material Description
9.1.
SAP BW
The view consists of one table MARA. Enter this name in Table/Join
Conditions tab page and in view fields, enter all the fields of table 8.1.
Patni Internal
SAP BW
To link the text with the master data, the field MATNR of the table MARA
must be equal to the field MATNR of the table MAKT.
9.2.
Run transaction SBIW and click Maintain Generic DataSources, or you may
run transaction RSO2.
You select
is displayed
Patni Internal
SAP BW
Patni Internal
SAP BW
You enter a name ZMARA_ATTR as the name of the DataSource and then
click
Patni Internal
SAP BW
Patni Internal
SAP BW
Note: To test extract, go to menu DataSource->Start Extraction (F8) or click
on
. After extraction to see the output list again go to menu DataSource>Output list or click
Patni Internal
SAP BW
Now you need to create a characteristic ZMARA. Table 8.3 shows the
attributes of the characteristic ZMARA.
Characteristic Attribute Compounding
ZMARA
MTART
MATKL
Table 8.3 Characteristic ZMARA Master Data
Note that the replication of DataSources from the source system SEND001
has already determined the client from which to extract.
9.3.
To load the Master data and text follow the same steps discussed in the
earlier chapter. However, you need to assign DataSource(s) ZMARA_ATTR
for characteristic ZMARA and for texts choose ZMARA_TEXT.
Patni Internal
SAP BW
10
10.1.
Logistics Cockpit
Maintaining DataSources
Activating updates
Controlling updates
Patni Internal
SAP BW
10.2.
Fig.1: SBIW
With the LC, several data structures are delivered and, for each level of
detail, there exists an extract structure as well as a datasource (that
already represents a BW extract view).
When you create and save a sales order (as other transactional tasks),
the document is processed in the memory and then stored into
application (and database) tables. In LC extraction technique (see Fig.2)
we have at our disposal different LIS communications structures (like the
MCVBAK, MCVAP, MCVEP and so on for sales orders) that we can decide
to use for our reporting purposes when the application is running and
during memory processing.
Patni Internal
SAP BW
Patni Internal
SAP BW
In the maintenance screen (see Fig.4), on the left side, you see what has
already been selected in the standard extract structure and on the right
side, you see all the available fields of the communication structures
where you can select fields from for the update.
Patni Internal
SAP BW
SAP BW
Finally, the right choice will be the result of all these considerations; by
doing so, the information structures in BW will be current and overall
performance will be improved.
Patni Internal
SAP BW
11
SAP BW
region and country) on a map. Moreover you can use Exception Reporting to
determine variant and critical objects, to automatically send messages
about variant values via email or SMS (through background processing in the
Reporting Agent), or to instantly detect such objects in an alert monitor.
You can analyze data in the following areas in the SAP BW BEx:
. BEx Analyzer (Microsoft Excel based)
. In BE Web Applications
Both are seamlessly integrated. In other words, you can display queries
from the BEx Analyzer in a standard view in the Web browser with a single
click. The opposite is also possible, that is, you can export a Web
application into Microsoft Excel 2000.
Patni Internal
SAP BW
Personal digital assistant (PDA) with Windows CE 3.0 and Pocket Internet
Explorer
WAP-enabled mobile telephone
i-Mode-enabled mobile telephone
Mobile device with EPOC32 operating system (the Nokia Communicator
9210, for example)
Quit and Use Query: With this function, you leave the Query Designer
and use the query you have defined.
Exit Query: Choose Exit Query if you want to leave the Query Designer.
Your entries are not saved.
Display Query on the Web: Using this function, you can display the query
in a default view on the Web, once you have saved your query definition.
New Query: Choose this function if you want to create a query. The BEx
Open dialog box appears and you can select the InfoProvider here that
contains the data that you want to evaluate in the query.
Patni Internal
SAP BW
Open Query: This function takes you directly to the BEx Open dialog box.
The, you can choose from queries in your History, Favorites, Roles, or from
the InfoAreas.
Save Query: You use this function to save a modified query under its
current name. If the query does not yet have a technical name, the system
automatically offers the function Save Query As....
Save Query As...: You use this function to save a query under a new
technical name. You can save the query in your favorites or in a role.
Delete Query: You use this function to delete the query. You can only
delete the query if it is not being used in workbooks, Web templates,
Crystal Reports, or reporting agent settings.
Exception: You use this function to define exceptions for a query.
Note: Exceptions are deviations from normal key figure values, as defined
by you, and are highlighted in color in the query view. Using the small arrow
next to the exceptions symbol, you can change or create exceptions. For
more information, see the Exceptions and Conditions unit.
Patni Internal
SAP BW
Check Query: Using this function, you can check a new or saved query
for errors before you save it.
Query Where-Used List: Using this function, you can find out in which
objects (workbooks, Web templates, Crystal Reports, or reporting agent
settings) the query is used.
Display <-> Change: Using this function, you can switch between the
display and change modes.
Change Query (Global Definition): You choose this function if you are in
the Local Query Definition and want to switch to the Global Definition.
Table Display: You can create a query for tabular reporting, as well as
for Online Analytical Processing (OLAP) reporting, by activating or
deactivating the Table Display mode in the query definition when defining a
query. This function is only available for queries with one structure. You
can only have queries with two structures in the multi-dimensional display.
They are not suitable for OLAP reporting.
Technical Name: Using this function, you can show/hide the technical
names of the query components.
Context Menu: This function enables you to display the current context
menu without using the right mouse button (for example, for use with a
touch screen).
Help: This function takes you to the SAP BW online documentation. The
BEx Query Designer section is displayed automatically there in the BEx
documentation.
Using the small arrow next to the help symbol, under the About... entry,
you can see the version of the Query Designer, with the support package
number and the revision.
To define a new query, start the Query Designer and choose New Query. In
the New Query: Select InfoProvider dialog box, select the required
InfoProvider.
Patni Internal
SAP BW
Once you have selected the InfoProvider, the Query Designer is displayed as
shown in the following graphic.
Patni Internal
SAP BW
Patni Internal
SAP BW
5. Filter
The characteristics displayed in the filter appear neither in the drilldown
nor as free characteristics in the query analysis. These characteristics are
only used as global filters on the cube data.
6. Preview (displayed in gray on the screen)
This area gives a preview of the query results area. To create a query, you
can expand or collapse the InfoProvider directories by clicking on the plus
or minus symbol. By expanding the key figure node in the InfoProvider tree,
for example, you can display a list of all the key figures for the
InfoProvider.
Use Drag & Drop or Choose CTRL C + CTRL V to transfer the characteristics,
key figures, and structures of the InfoProvider into the Filter, Rows,
Columns, or Free Characteristics areas of the Query Designer.
The following graphic shows the Query Designer with a query definition.
Once you have defined a query, choose Save Query or Save Query As... . If
you have not yet saved the query, you have to enter a query description and
a unique technical name. You can also choose where you want to save the
Patni Internal
SAP BW
query (in your roles, favorites). You can use Save Query As... to save
existing queries under a different name.
Once you have saved the query, you have the following options:
You can execute the query in the BEx Analyzer and include it in a
workbook. To do this, choose Quit and Use Query.
You can display the query on the Web in a default view. To do this,
choose Display Query on the Web.
You can use the query in the Web Application Designer as a data
provider for Web items.
11.3.BEx Analyzer
Once you choose Quit and Use Query from the Query Designer, a report is
displayed in Microsoft Excel sheet. The report contains the query
description, a filter area and the result area. The filter area contains the
characteristics and free characteristics chosen in the query definition.
Patni Internal
SAP BW
SAP BW
Patni Internal
SAP BW
Patni Internal
SAP BW
Query Technical Name: Technical name that you entered when you
saved the query.
Key Date: Contains the date for which the time-dependent master data
is selected. You create a key date either in the query definition (query
properties) or provide the value using a variable (for more information,
see the Query Properties unit). If no key date has been defined, the
system date is taken as the key date.
Changed At: Date and time at which the query definition was last
changed.
Status of Data: Time at which the data from the last request was posted
to the InfoProvider. This can be evaluated for reporting.
Current User: User who currently has the query open or who has inserted
it into a workbook.
Last Refreshed: Data and time at which the query data was last
refreshed. This is the time at which you displayed the text elements (the
system has to refresh the query in order to display the text elements).
Variables, Filter Values, Conditions, Exceptions: Depending on the
current query definition, additional text elements (variables, filter
values, conditions, and exceptions) may also be displayed.
Patni Internal
SAP BW
SAP BW
reverse the +/- signs. The reverse +/- signs is only a display function. It
has no influence on calculation in formulas.
Calculations: You can use this function to recalculate result rows and
individual values that are displayed in the version according to particular
criteria. E. g. You want to calculate the result on the basis of the
average of all displayed sales volumes instead of on the basis of total
sales volume.
Currency Translation: In the Query Designer you can set a currency
conversion key and a target currency in the properties dialog box for a
structure part.
Patni Internal
SAP BW
You can define the following properties for characteristics:
Description: The text provided in the InfoObject maintenance appears
here. You can change the text and display it in the query.
Display As: This is where you determine the form in which the
characteristic values are displayed, as long as they were created in the
InfoObject maintenance for the characteristic:
No Display
Key and Name
Name and Key
Name
Key
Long or Medium Name
Display of Results
Suppress Results Rows: You can structure the appearance of your report
by using this function to determine whether the results rows are
displayed Always, Never or With Only One Value.
Normalized to: You can use this function to normalize key figure values
to a specific characteristic. When values are normalized, the key figures
are displayed as a percentage in relation to the chosen result. You can
select the Query Result, Overall Result and Result (interim result) as the
reference value. The characteristic is normalized only if it is in the
drilldown.
Sorting: You can make settings for sorting within the characteristic. You
can use the following:
The characteristic itself, sorted by key or name,
All attributes of the characteristic sorted by Key or Name
The sort sequence is either Ascending or Descending. You cannot use
the attribute that you have selected for sorting in the display.
11.3.7.1. Attributes
Characteristics can be described in more detail through attributes. For
example, you can assign the attribute Telephone Number to the
characteristic Sold-to Party to display the telephone number of the sold-to
party.
You assign attributes to characteristics in the InfoCube maintenance. You
can maintain them as purely Display Attributes or as Navigation Attributes.
Patni Internal
SAP BW
SAP BW
When defining a restricted key figure, you want to select the restricting
characteristics, individual characteristics values, value ranges, hierarchy
nodes, or characteristic variables. When selecting value ranges, the
following operations are available:
Between
Greater than or equal to
Less than or equal to
Greater than
Less than
The following figure shows the definition of a restricted key figure, which
will give the Sales amount only for year 2002.
Patni Internal
SAP BW
The following is a snapshot of a report, which uses the restricted key figure
defined above to compare overall sales with the sales made in year 2002.
Patni Internal
SAP BW
You can use all basic key figures of the InfoProvider in question, as well as
the newly defined restricted and calculated key figures of the InfoProvider,
to define new calculated key figures. You can define calculated key figures
at both query level and InfoProvider level. At query level, the calculated
key figure is valid only for the query in question. If you create a calculated
key figure at InfoProvider level, you can use it in all queries that are based
on the same InfoProvider.
1. Select the Key Figure directory, and choose New Calculated Key Figure
from the context menu. You reach the New Calculated Key Figure dialog
box.
2. Enter a description of the calculated key figure into the text field.
3. Define the required formula using basic key figures, restricted key
figures, formula operators, and functions. You can use Drag & Drop to
transfer the formula components into the formula field.
Key figures always have the same units when a query is executed. This
means that the formula is semantically incorrect if you add a currency unit
(for example, EUR) to a unit of weight (for example, kg). If you want to
calculate values without using units, you should use the Value Without
Dimension function. See Data Functions.
4. Check the formula definition, and choose Formula Syntax Check.
The Formula Syntax Check function only checks the syntax of the formula. It
does not check whether the formula is semantically sound, for example,
whether the units are compatible.
5. Choose OK. In the Properties of the Calculated Key Figure dialog box,
assign a technical name, and choose OK. If you choose Enhance, the dialog
box is enhanced with aggregation behavior or exception aggregation
options.
6. The new calculated key figure is available under Calculated Key Figure,
and can be included in the definition using Drag & Drop. To define
calculated key figures, you have to include key figures needed for the
calculation in the definition, and choose New Formula from the context
menu of the Key Figure directory. These formulas are available only locally
in the query definition.
If you are defining calculations in the columns as well as in the rows, a
formula collision can occur in the interfaces of the two formulas. You can
therefore define which of the formulas is to be used.
Patni Internal
SAP BW
The following snapshot of a report shows the use of the calculated key
figure defined above.
Patni Internal
SAP BW
11.6.Variables
For flexible reporting we often need variables. Variables are query
parameters that you define in the Query Designer and that are filled with
values only when you execute the query or Web application.
Variables act as placeholders for:
. Characteristic values
. Hierarchies
. Hierarchy nodes
. Texts
. Formula elements
Variables are reusable objects.
The variables defined in the Query Designer are available in all
InfoProviders for use in query definition. Variables are not dependent on the
InfoProvider, but rather on the InfoObject for which they were created.
Variables enable you to set queries more flexibly (query parameterization).
When using variables in the Query Designer, you do not choose fixed
characteristic values, hierarchies, hierarchy nodes, texts, or formula
elements, but rather you set variables as placeholders. These are then filled
with values at query runtime (when you insert the query into a workbook,
when you refresh a workbook or when you launch the query on the Web). If
you use variables, a query definition can then serve as the basis for many
different queries.
Variable Types
There are different variable types, depending on the object (for example,
characteristic, formula) for which the variable is defined as a placeholder.
Characteristic Value Variables
When selecting characteristic values in the query definition, you can select
variables instead of fixed values. These act as placeholders and are filled
with values when you execute the query.
You can use variables to select single values and value areas.
1. Selecting Single Value Variables
From the context menu of the characteristic, choose Restrict. The dialog
box for selecting characteristic values appears. Select the Variables tab
page and transfer the required variables using Drag & Drop or the arrow
button.
2. Selecting Single Value Variables as Variable Value Area Limits
In the dialog box for selecting characteristic values, in the Selection field,
choose Value Area and set the required operator (Between, Less than,
Greater than, ...).
Select the Variables tab page.
Patni Internal
SAP BW
When using the Between operator, you can restrict both limits using single
value variables or choose a single value variable for one of the interval
limits and transfer a fixed value for the other interval limit on the Fixed
Values tab page.
When using the operators Greater than or equal to, Less than or equal to,
Greater than, or Less than, from the list of available variables in the left
window, highlight a variable and move this using Drag & Drop or the arrow
button into the right Selection window.
Swapping Interval Limits
If you are using variables when making interval selections, you can swap the
limits by highlighting the relevant variable in the right Selection window,
and choosing Swap Interval Limits from the context menu.
3. Selecting Variables with Several Single Values or Value Ranges
Depending on how they have been defined, you can not only select single
values for variables, but also several single values, intervals, or selection
options. Under Single Values select the relevant variable from the variables
window and specify the values or interval limits when you execute the
query.
Variable Processing Types
The following processing types are available:
User Entry/Default Value
Replacement Path
Customer Exit
SAP Exit
Authorization
. User Entry / Default Value
If you choose User Entry/Default Value as the processing type for a variable,
you can enter the required value for the variable manually in a dialog box
when you execute the query.
You enter a default value when you create the variable. This default value
is then displayed for input-enabled variables in the input field of the
variable screen. For fields that are not input-enabled, the default value is
used as the variable value.
. Replacement Path
The processing type Replacement Path enables you to specify the value that
automatically replaces the variable when the query or Web application is
executed.
Patni Internal
SAP BW
For example, when you enter a variable as a characteristic value, you do
not need to determine the text for the characteristic value straight away,
but can let it be filled dynamically to match the characteristic that is used
when the query is executed for the variable.
1. Text variables and formula variables with the replacement path
processing type are replaced by the corresponding characteristic value. The
variable wizard takes you through the Characteristic dialog step
automatically. This is where you select the reference for the replacement
value.
2. Characteristic value variables with the replacement path processing type
are replaced by a query result. In the Replacement Path dialog box, you
select the query containing the results that you want to use as a variable.
You can now use the data result of the selected query as a variable in a
different query.
. Authorization
The Authorization processing type enables you to fill the variables
automatically with the values frothed authorization of a user. If you choose
the Authorization processing type when you create a variable, the variable
is filled automatically with the values in the users authorization.
When the user opens a query, the data selection is automatically carried
out according to his or her authorizations.
. Customer exit
If necessary, you have the option of using a customer exit to set up a
processing type for variables that is tailored specifically to your needs. The
Customer Exit processing type for variables enables you to determine values
for variables by means of a function module exit. The function module used
is EXIT_SAPLRRS0_001.
You create a project in transaction CMOD by selecting the SAP enhancement
RSR00001 and assigning this to the enhancement project. Activate the
project. Note: For more information about working with the SAP
enhancement for global variables in reporting, see the SAP enhancement
help. Call the transaction SMOD. Enter the name of the enhancement
(RSR00001), choose Documentation and then Edit Display/Change. For
general information about working with Customer Exits, see the Application
Help in transaction CMOD.
. SAP Exit
The SAP exit processing type is contained in variables that are delivered
with SAP BW Business Content. Overview of Variable Types and Processing
Types
Patni Internal
SAP BW
SAP BW
Details
A dialog step in the variable wizard in which all types of variables appear
except for variables with the replacement path processing type.
The variable wizard automatically offers you only those options that are
possible and useful.
Figure 72: Variable Wizard: Details
Under Variable Represents, select the display area that the variable is to
represent. You can choose from:
. Single Value
The variable represents one value only.
. Multiple Single Values
The variable represents a range of single values.
You can use this setting with hierarchy nodes, for example, to enable the
user to enter several single nodes.
. Interval
The variable represents a from-value and a to-value.
. Selection Option
The variable represents a combination of single values and intervals of your
choice.
. Precalculated Value Set
The variable represents a number of values that are stored in a database
table by the Reporting Agent.
2. Under Variable Entry is specify whether the variable input is Optional,
Mandatory, or Mandatory, Initial Value not Allowed.
3. Under Ready for input you can determine whether the variable is inputenabled when the query or Web application is executed. If the ready-forinput option is active (= default setting), the variables screen is offered
when you execute the query or Web application. You can then enter the
required values, confirm the default values, or change the default values.
4. The option Can be changed in query navigation enables you not only to
select from values that you entered in the variables screen after you have
executed the query, but also use other values as dynamo ic filters in the
query.
5. Copy personalization data from variable
You can personalize variable values for input-enabled variables for each
user. These personal values are saved for each variable and each user.
Default Values
Patni Internal
SAP BW
When you define a variable, you enter one or more default values. These
then appear in the variables screen when you execute the query or Web
application.
Replacement Path
A dialog step of the variable wizard that appears for characteristic value
variables, formula variables, and text variables with the replacement path
processing type.
There are different options for the replacement path, according to the type
of variable used:
. Text variables and formula variables with the Replacement Path
processing type are replaced by the corresponding characteristic value.
The value for a formula variable has to be a number. The value for a text
variable has to be a text.
1. Under Replace Variable With, you have the following options:
Key
External Characteristic Value of the Key
Name (Text)
Attribute Value
Hierarchy Attribute
2. Using the setting With Interval Take, you determine whether the FromValue, the To-Value, or the Difference is used as the value when the value
to be replaced is an interval.
3. The setting Offset Start and Offset Length enables you to determine the
start and the length of the text output.
4. The Evaluate as Boolean function (value 0 or 1)
This function is only available for formula variables. If you select this
setting, the formula variable is not replaced by a value (for example, key
value), but rather it specifies that a value exists.
. The value of the variable is 0 if the value to be replaced is a string with
only blank characters or a zero.
. The value of the variable is 1 if the value to be replaced is a string with
characters that are not blank or a number that is not zero.
. Characteristic value variables with the Replacement Path processing type
are replaced by a query result.
You can now use the data result of the selected query in a different query
using the variable.
Example: You want to insert the result of the query Top 5 Products into
another query Sales Volume - Calendar Year/Month variably.
1. Highlight the characteristic, for example, Product, and from the context
menu, choose New Variable. The variable wizard appears.
Patni Internal
SAP BW
2. Enter a name and a description for the variable and choose the
Replacement Path processing type.
3. You reach the Replacement Path dialog step. Enter the name of the
query (for example, Top 5 Products)
4. You reach the Save Variable dialog step.
5. You can now insert the variable into the query (Sales Volume Calendar
Year/Month) to determine how the sales volume of the 5 products with the
highest sales volumes has developed on a month-by-month basis.
Note: Each time that the query Sales Volume Calendar Year/Month is
executed, the pre-query (Top 5 Products) is executed beforehand. This can
lead to long runtimes. If you do not absolutely need to execute a pre-query
(for example, you do not have to calculate the top 5 products every time
since these change only monthly), we recommend that you use a variable
that represents a precalculated value set.
Characteristic
A dialog step of the variable wizard that appears for text and formula
variables with the Replacement Path processing type.
In text and formula variables with the Replacement Path processing type,
the characteristic reference is not clear in the system. Therefore, select
the characteristic to which the variable refers.
Currencies and Units
A dialog step of the variable wizard for formula variables.
You can select from the following dimensions:
Amount
Quantity
Price (= currency/unit)
Number (= default setting)
Date
Saving Variables
In the final dialog step, you get an overview of the settings you have made
for the variable. Choose Finish. The variable is saved and the variable
wizard closes.
Changing Variables in the Variable Editor
The variable editor uses a dialog box to give all of the selection options
available for changing an existing variable.
The individual fields of the dialog box reflect the dialog steps in the
variable wizard and show the current settings of the variable. The dialog
box is context sensitive, which means that only the fields and options that
are relevant for the variable are displayed, depending on the type of
Patni Internal
SAP BW
variable and the processing type. If you would rather make your changes
using a step-by-step processes with explanatory text, you can go to the
variable wizard.
Using the Variable Offset
To analyze key figures that have a fixed time-relationship to one another,
you can use the variable offset. For example, you want to compare the
sales volume from the current time period with that of the same time
period in the previous year. In your report definition, you can use the same
variable several times to restrict the key figures and determine a difference
from the input value.
You can also use the variable offset to select an interval as a restriction
with upper and lower limits that refer to the same variable.
1. To do this, in the upper-left selection field, choose Value Range and
Between as the operator.
2. On the Variables tab page, select the required variable and move this
using Drag & Drop (or using the arrow key pointing to the right) into the
right selection window.
3. Now specify variable offsets for the upper and lower limits.
11.7.Content Variables
Business Content variables are delivered for all types of variables. You have
to activate the variables delivered before you can use them. Variables that
are delivered with Business Content from SAP BW often have the SAP exit
processing type. This enables you to create complex queries quickly and
easily.
For time characteristics, a range of variables are delivered that replace
frequently used time periods or specific times, for example, the current
month or the comparable month of the previous year.
Patni Internal
SAP BW
In the Metadata Repository, you find the variables that were created for the
InfoObjects used. You also find information about whether the variable in
question is actively available in the system.
11.8.Exceptions
The readability of a report improves if the threshold values are shown with
different colors. This is done using Exceptions on a query level.
The functions in exception reporting enable you to select and highlight
unusual deviations of key figure values in a query. You can see deviations
from pre-defined threshold values or intervals in the query result displayed
in different colors if the exception is active. Spotting these deviations early
provides the basis for timely and effective reactions.
11.9.Creating Exceptions
You create an exception in the Query Designer using the symbol Exception
New Exception.
Patni Internal
SAP BW
In the dialog box that appears, you can specify a meaningful Description and
set the exception to Active. The exception is applied as soon as you execute
the query. If you do not set the active flag, you can activate the exception
in the report itself. In the BEx Analyzer, from the BW toolbar Layout Display
Exceptions you also have the option of adding an additional line between
the filter and results areas for each exception and activating or deactivating
the exception from there. There is an item for Web applications that you
can integrate into your template for the same purpose. You can use
exceptions to evaluate one or all key figures in your query definition. If you
want to use exceptions selectively on specific key figures in your query
definition, you have to define an exception for each key figure accordingly.
On the Exception Values tab page, you enter your values by first choosing
New. An alert level row always consists of a From field, a To field and an
Alert Level field. If you leave the From or the To value empty, this gives an
infinite value definition. You choose Transfer to add your entries to the list
of threshold values.
Hint: You can proceed as follows to make entering large values with many
zeros easier:
An apostrophe after the value means multiply by a thousand, two mean
multiply by a million and three mean multiply by a billion (for example: 1.=
1,000, 1,5..= 1,500,000).
By defining variables as threshold values, you can influence defined
exceptions flexibly. You can allocate the available alert levels as you wish.
You can set the alert colors red, yellow and green, each in three shades, as
required. The colors relate to the color characteristic values of the format
templates delivered by SAP and symbolize traffic-light colors.
You can include all values or specific intervals (for example, only those
falling below the threshold value in the red area) in the threshold value
catalog. You can enter fixed point or floating-point numbers for the values
you are defining.
With key figures that exceed the threshold value and are on the border
between two intervals, the worst alert level is always shown (for example,
interval 0 to 1000 alert level 9 and 1000 5000 alert level 8, the sales volume
key figure is 1000 - alert level 9 is used as the basis for identification
Cell Restrictions
On the Cell Restrictions tag page, you can specify whether a restriction with
regard to the use of the exception applies Only to the Totals (default
setting) or to All values (therefore not a restriction).
Patni Internal
SAP BW
You can choose New to define an operator for each characteristic in the
query definition, and a value for each operator. You also choose Transfer
here to add your restrictions to the list.
You have the following selection options for the operators:
. Everything: The cell context is not restricted. The exception applies for
every drilldown state of the characteristic.
. Totals Only: The exception affects only the aggregated values of the
characteristic.
. Everything Except Totals: The exception affects all values except for the
aggregated values of the characteristic.
. Fixed Value: The exception applies only to a specific characteristic value
of the characteristic, which you can determine in the search help in the
value field. You can also use a characteristic value variable here. To do
this, select Variables Entry. You are then given the option of using or
changing an existing characteristic value variable, or of creating a new one.
. Level: The exception applies only to specific hierarchy levels of the
characteristic. You enter the required hierarchy level in the value field
here.
Note that you have to list all characteristics that you defined in the Cell
Restrictions in the drilldown of the report, since the exception takes effect
only then. If there is a characteristic in the drilldown that is not recorded in
the cell restrictions, the effect that the exception has depends on whether
you selected Totals Only or All on the Cell Restrictions tab page. If you
selected All, it does not matter where you integrate the characteristic in
the drilldown, the exception is applied accordingly. However, if you
selected Totals Only you have to place this characteristic at the end of the
drilldown, otherwise the exception does not take effect.
The following snapshot of a report shows the cells in different colors as per
the exception.
Patni Internal
SAP BW
You can change exceptions in the Query Designer using the symbol
Exception Change Exception.
If you want to delete or changing a list entry, highlight the entry using your
cursor and choose Delete, or OK if you want to make changes.
You can change exceptions in the Query Designer using the symbol
Exception Change Exception. Use the cursor to highlight the exception that
you want to delete and choose Delete to confirm. Hint: If you execute your
report on the Web, you can create, change, activate and deactivate
exceptions using the List of Exceptions Web item. You can delete an
exception using the context menu only if you created the exception in the
Web application itself.
You can define several exceptions in a query for different value assignment
areas or for different versions. If the threshold value areas overlap when
you activate several exceptions, the worst (highest) alert level counts.
Patni Internal
SAP BW
11.10.
Conditions
Patni Internal
SAP BW
11.10.2. Features
In the area Display all values for which at least one of the following
conditions applies, you choose New to select a Key Figure for which a
condition is to be used. In the second field, you can see the operators for
specifying value definitions. You choose Transfer to add your entries to the
list of conditions and choose New to define more conditions. You save your
conditions by choosing OK and you can then display your report in the BEx
Analyzer or in the browser.
A condition row consists of a key figure, an operator, and a value for the
operator. In query definitions that contain two structures, there is an
additional field for defining a structural component.
You can use the following operators for threshold value conditions::
Equal to - Example: Invoiced quantity equals 1000
Not equal to - Example: Line item not equal to 5
Less than - Example: Sales revenue less than 100,000 EUR
Greater than - Example: Incoming orders greater than 1,000,000 EUR
Less than or equal to - Example: Sales revenue less than or equal to
100,000 EUR
Patni Internal
SAP BW
In the variable definition, select Variable Entry. You are then given the
option of choosing an existing variable from the dropdown box, changing
the variable or creating a New Variable.
You can use the following operators for ranked list functions:
. Top N - Example: Display the sales revenue of the top 5 customers
. Bottom N - Example: Display the bottom3 (lowest) incoming orders
. Top % - Example: Restriction to 20%of the best revenue, in order
. Bottom % - Example: List of 15%of the customers with the lowest sales
revenue, in order
. Top Sum - Example: You get a list of the products with the highest sales
revenues where the total sales revenue makes up 20,000 EUR. All sales
revenues are sorted in descending order and then the sum is calculated
until the threshold value of 20,000 EUR is exceeded. All products, including
the product that takes the sales volume over the 20,000 EUR mark, are
listed.
. Bottom Sum - Example: As with Top Sum but here, a ranked list is sorted
in ascending order of products with the weakest sales revenue until a sum
greater than or equal to 20,000 EUR is reached. All products, including the
product that takes the sum over the 20,000 EUR mark are also listed here.
The following figure shows a report where only Top 2 Customers according
to Sales are displayed.
Patni Internal
SAP BW
11.10.3. Calculate
Result As to display the Summation. If you are using the browser, you can
call the context menu and then choose Properties Local Properties
Calculate Result As Summation.
If you are using several conditions in one report, conflicts can arise which
lead to automatic deactivation. The following status descriptions appear in
the display:
. Variant
Reason:
The condition relates to a characteristic that is not included in the
drilldown.
The condition relates to a characteristic combination that is not included in
the drilldown.
. Not Used
Reason:
The condition relates to a characteristic that is drilled down using an active
display hierarchy.
The condition relates to a characteristic that is included through the
activation of another condition, leading to a collision, and is therefore
Patni Internal
SAP BW
deactivated (however, you can reactivate this condition and automatically
deactivate the last condition activated).
If you activate a condition for a combination of characteristics, the results
row is no longer displayed.
Patni Internal
SAP BW
12
12.1.Introduction
The BEx Web Application Designer is a desktop application for creating Web
applications with BI-specific content. Using the BEx Web Application
Designer, you can create an HTML page containing BI-specific content such
as various tables, charts, or maps. This HTML page (Web application) forms
the basis of Web applications with complex interaction, as well as Web
cockpits and iViews. The command wizard and pattern wizard are integral
parts of the Web Application Designer. Using the command wizard, you can
easily generate commands from the Web Design API and include them in
your Web template. Using the pattern wizard, you can configure BI patterns
to a certain extent and tailor them to meet your needs.
12.2.Features
The initial view of the BEx Web Application Designer has four different
screen areas in addition to the menu and toolbars as depicted in the figure
below
SAP BW
You can adjust the appearance of the Web Application Designer to meet
your requirements. The object on which you are working, namely the Web
template, is handled differently from the tools and help windows with
which you are working.
You can show and hide the individual screen areas and toolbars using
the View menu option.
You can reposition the three toolbars and the Web Items and
Properties windows as required. Depending on where you position the
object, it is either anchored or appears freely as a toolbox.
Since the Web Application Designer is a Multiple Document Interface
Application (MDI Application), you can open and manage different
windows with Web templates simultaneously. You can use the Window
menu option to arrange the windows differently: cascading
(overlapping), vertical, or horizontal.
Web Items Screen Area
The Web Items window offers a pool of Web items that you can use to
create your Web application. A Web item describes the way in which the
data from a data provider is displayed, such as tables ,maps and graphics
(i.e. Chart).
The Web Items screen area is divided into the following sections:
The selection groups for Web items (master Web items) are located in
the upper area, divided into various categories:
{
Standard: The following Web items are part of the Standard grouping:
Analysis
Chart
Report
Navigation area
Filter area
Button group
Dropdown box
Radio button groups
Checkbox group
List box
Hierarchical filter selection
Extended: The following Web items are part of the Advanced grouping:
Web Template
Container Layout
Patni Internal
SAP BW
Container
Tab Pages
Group
Single Document
Document List
Map
System Messages
Information Field
Input Field
Miscellaneous: The following Web items are part of the Miscellaneous grouping:
Patni Internal
SAP BW
In the lower section of the layout view, you can create data providers.
When you double-click New Data Provider, the dialog for creating data
providers opens.
You can also create data providers in the Web Items screen area.
Grouped
If you choose this sort order, the objects used are listed by
type: data providers, Web items and commands.
Web Template
If you choose this sort order, the sequence of the objects used
in the Web template are displayed as a flat structure.
If you choose this sort order, the sequence of the objects used
in the Web template are displayed as a hierarchical structure.
You see a hierarchical structure if you nest Web items in the
Web template (for example, when you use the Container Web
item).
You can change the parameters of the associated objects using the context
menu for each Web item, Web template, and data provider listed
Properties Screen Area
In the Properties screen area, you define the properties of Web templates
and Web items.
Structure
The Properties screen area is divided into the following sections:
In the dropdown box in the header of the screen area you see the
selection for which you want to define properties for a Web template or
for specific Web items. Depending on your choice in the dropdown box, you
can then make various settings for Web templates or Web items.
Once you have selected a Web template from the dropdown box, you can set the
parameters for the Web template on the Web Template Parameter tab page.
Patni Internal
SAP BW
Once you have chosen a Web item from the dropdown box, you can make the
following settings:
Tab page: General
Here you can use the Create New symbol next to the dropdown
box to create a data provider and assign it to the Web item. See
Web Template Parameters.
Here you can set the parameter for the selected Web item.
In the lower area of the Web Item Parameter tab page or the Web
Template Parameter Web page, context sensitive help is available.
Under Data Provider, you can create data providers of type Filter or
of type Query View. Drag the required data provider type into your
Web template using Drag&Drop. The dialog for creating data
providers opens.
Underneath the selection for Web items and data provider
maintenance, you see the help area, which provides explanations for
the Web items and the data providers. To display the texts for the
Patni Internal
SAP BW
respective Web item, select the Web item by double-clicking with
the right mouse button. To hide the texts, proceed in the same way.
Once you have hidden the display of texts and selected a Web item
by single clicking, a quick info is displayed for the Web item.
Creating A Web Application Using the Web Application Designer
After selecting Create a new web application , you will get a new screen
wherein you can add web items from the left of your screen to create a web
application. Let us create a simple web application having A table a Chart
and a Navigation Block.You can drag and drop these elements from under
the Standard Web Items pane into the WAD layout.
Patni Internal
SAP BW
Select on Create a new data provider and the following window will pop-up
Browse for a query you have created . We have selected a query created on
one of the BW Statistics Cube here YTBD_STATS_QUERY. And select ok.
Patni Internal
SAP BW
Select the table in your right hand pane and check the properties tab in
your left pane.. Assign the Info provider DP1 to the table. Repeat the same
process for the chart and the Navigation block.
Save the Web template and run this web template in the browser.
Patni Internal
SAP BW
Patni Internal