Você está na página 1de 205

SAP BW

Patni Computer Systems Ltd.

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

INTRODUCTION TO INFOOBJECTS & INFOCUBES............................ 17


2.1.
2.2.
2.3.
2.4.
2.5.
2.6.
2.7.
2.8.
2.9.

DATA STORE OBJECT DEFINITION: ............................................................. 100


DATA STORE OBJECT TYPES ...................................................................... 102
DATA STORE OBJECT ADMINISTRATION .................................................... 109
DATASTORE OBJECT ADMINISTRATION - PERFORMANCE:......................... 112

MULTIPROVIDERS ..................................................................................... 114


5.1.
5.2.
5.3.

OVERVIEW OF DATA TRANSFER PROCESS.................................................... 62


DATA TRANSFER PROCESS EXAMPLE........................................................ 64
CREATING AND MANAGING DTP................................................................. 65
ERROR HANDLING OF DTP .......................................................................... 69
ERROR STACK IN DTP ................................................................................. 70
TEMPORARY STORAGE FOR DTP ................................................................. 74
DTP MONITOR ............................................................................................. 76
MANAGING INFOCUBES-DATA MAINTENANCE ........................................... 82
USING BW MONITOR ................................................................................... 95

DATA STORE OBJECTS (DSO) ................................................................. 100


4.1.
4.2.
4.3.
4.4.

INTRODUCTION TO INFOOBJECTS ................................................................. 17


TYPES OF INFOOBJECTS ............................................................................... 17
CHARACTERISTIC INFOOBJECT .................................................................... 19
CREATING A CHARACTERISTIC IN THE INFOOBJECT TREE ........................... 29
KEY FIGURES ............................................................................................... 31
INFOCUBES .................................................................................................. 35
BASISCUBES ................................................................................................ 36
CREATING AN INFOCUBE IN THE INFOPROVIDER TREE ................................ 40
TECHNICAL IMPLEMENTATION OF SAP BW STAR SCHEMA ......................... 46

DATA TRANSFER PROCESS IN SAP BI .................................................... 62


3.1.
3.2.
3.3.
3.4.
3.5.
3.6.
3.7.
3.8.
3.9.

BUSINESS INTELLIGENCE AND DATA WAREHOUSING .................................... 4


THE CLASSIC STAR SCHEMA .......................................................................... 5
INTRODUCTION TO SAP BW .......................................................................... 6
SAP BW ARCHITECTURE .............................................................................. 7
THE SAP BW STAR SCHEMA ......................................................................... 9
INTRODUCTION TO ADMINISTRATOR WORKBENCH (AWB) ......................... 14

ADVANTAGES OF MULTIPROVIDER............................................................ 115


MULTIPROVIDER, APPLICATION EXAMPLE ................................................ 115
CREATING A MULTIPROVIDER ................................................................... 118

AGGREGATES .............................................................................................. 125


Patni Internal

Page 2 of 205

SAP BW
6.1.
6.2.

USING AGGREGATES .................................................................................. 125


AGGREGATES AND MASTER DATA CHANGES ............................................ 131

ADMIN COCKPIT......................................................................................... 138

PROCESS CHAINS........................................................................................ 140


8.1.
8.2.

OVERVIEW OF PROCESS CHAINS ................................................................ 140


STRUCTURE OF PROCESS CHAINS ............................................................... 141

GENERIC R/3 DATA EXTRACTION ........................................................ 144


9.1.
9.2.
9.3.

10

CREATING VIEWS IN R/3............................................................................ 145


CREATING DATASOURCES IN R/3. ............................................................. 147
LOADING DATA FROM R/3 INTO BW ......................................................... 152
LOGISTICS COCKPIT............................................................................. 153

10.1.
10.2.
11

WHAT IS LOGISTIC COCKPIT (LC)?........................................................ 153


LOGISTIC COCKPIT FUNCTIONS .............................................................. 154
REPORTING AND ANALYSIS ............................................................... 159

11.1.
11.2.
11.3.
11.4.
11.5.
11.6.
11.7.
11.8.
11.9.
11.10.
12

SAP BW BUSINESS EXPLORER ............................................................... 159


WORKING WITH BEX ............................................................................. 161
BEX ANALYZER ..................................................................................... 167
RESTRICTED KEY FIGURES .................................................................... 175
CALCULATED KEY FIGURES .................................................................. 178
VARIABLES ............................................................................................ 180
CONTENT VARIABLES ............................................................................ 187
EXCEPTIONS ........................................................................................... 188
CREATING EXCEPTIONS ......................................................................... 188
CONDITIONS ........................................................................................... 192

12.1.
12.2.
12.3.

BEX WEB APPLICATION DESIGNER ................................................. 197


INTRODUCTION ...................................................................................... 197
FEATURES .............................................................................................. 197
SAMPLE WEB DASHBOARDS .................................................................. 204

Patni Internal

Page 3 of 205

SAP BW

1 Introduction to Business Intelligence


& Data Warehousing

1.1.

Business Intelligence and Data Warehousing

Business Intelligence is a technology based on customer and profit oriented


models that reduce operating costs and provide increased profitability by
improving productivity, sales, and service and help to make decision-making
capabilities at no time. Business Intelligence Models are based on multi
dimensional analysis capabilities.
BI solutions differ from and add value to standard operational systems
(OLTP systems Online Transaction Processing systems) in three ways

By providing the ability to extract, cleanse and aggregate data from


multiple operational systems into a separate data mart or data
warehouse
By storing data often in a star or multi dimensional cube format, to
enable rapid delivery of summarized information and drill down to
detail
By delivering personalized, relevant informational views and
querying, reporting and analysis capabilities for gaining deeper
business understanding and making better decisions faster

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.

Extraction, Transformation and Loading (ETL) - Data is extracted


from multiple source systems. Data is cleansed and transformed and
into a consistent format and structure. The cleansed data is loaded
into the data warehouse.

On-Line Analytical Processing (OLAP) and Data Mining - Analysis tools


are applied against the data warehouse to analyze and mine the
data.

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.

Centralized into a single


homogeneous data store
in the case of a data
warehouse;
or
a
collection
of
homogeneous subjectoriented data marts.
Chosen primarily for its
ability to meet the
organization's
OLAP
needs. Usually a multidimensional database.

Table 1.1: Comparison of OLTP and OLAP Data

1.2.

The Classic Star Schema

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.

Figure 1.1: Classic Star Schema

1.3.

Introduction to SAP BW

The SAP Business Information Warehouse (SAP BW) is a state-of-the-art,


end-to-end data warehouse solution developed by SAP. It enables users to
analyze data from operative SAP applications as well as from other business
applications and external data sources such as databases, online services
and the Internet.
SAP BW enables Online Analytical Processing (OLAP) for staging of
information from large amounts of operative and historical data. SAP BW
server is pre-configured for core areas and processes and allows users to
examine the relationships in all areas of an organization.

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

SAP BW architecture is made up of three functional layers.


Source Systems
SAP BW Server
SAP BW OLAP

Figure 1.2: SAP BW Three Layer Architecture

1.4.1. Source Systems

A source system is a reference system that functions as a data provider for


SAP BW. SAP BW distinguishes between four kinds of source systems:
1.4.1.1. mySAP.com Components
SAP BW is fully integrated into the new mySAP.com world. SAP has provided
a set of predefined extraction structures and programs, called DataSources,
to extract the source data from mySAP.com components and then to load
the data directly into SAP BW.
A SAPI (Service Application Programming Interface) is an SAP-internal
component that is delivered as of Basis release 3.1i. Communication
between mySAP.com components and SAP BW takes place via this SAPI.

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.

1.4.2. SAP BW Server


SAP BW server provides a 'Staging Engine', which controls the data loading
process. It also features SAP BW databases, which store master, transaction
and metadata.
The Administrator WorkBench (AWB) is responsible for the control,
monitoring and maintenance of all data procurement processes. The
Administrator WorkBench is the place where you define all relevant
information objects, plan load processes using a scheduler, and monitor
Patni Internal

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.4.3. SAP BW OLAP


The Online Analytical Processing (OLAP) processor allows you to carry out
multi-dimensional analyses of SAP BW data sets. It also provides the OLAP
tools with data via the BAPI, XML/A or ODBO (OLE DB for OLAP) interfaces.
In principle, the OLAP area can be divided into three components:
BEx Analyzer (Microsoft Excel based)
BEx Web Application
BEx Mobile Intelligence
You can use these tools to carry out both Microsoft Excel and Web-based
analyses across several dimensions (such as time, place, product, and so on)
simultaneously.

1.5.

The SAP BW Star Schema

The multi-dimensional model in SAP BW is based on the SAP BW star


schema. SAP came up with the enhanced star schema to resolve the
problems experienced with the classic star schema. Figure 1.3 shows the
crossover between the classic star schema shown in the Figure 1.1 and the
SAP BW star schema. For the time being, only components relevant to the
modeling view are taken into consideration.

Figure 1.3: SAP BW Star Schema

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.

Figure 1.4: InfoCube

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.

Master data information is stored in separate tables called master data


tables (separately for attributes, texts and hierarchies). These tables are
independent of the InfoCube. For example, as shown in the Figure 1.3, the
attribute material group is stored in the attribute table, the text
description for 'material name' is stored in the text table and the material
hierarchy is stored in the hierarchy table for the characteristic 'MATERIAL'.
In this way, the characteristic 'MATERIAL' is the primary key for the master
data tables belonging to this characteristic.
As mentioned earlier, precisely one numerical SID key is assigned to each
characteristic. This assignment is made in a SID table for the respective
characteristic, whereby the characteristic becomes the primary key in the
SID table. As shown in the Figure 1.5, the SID key 'SID_MATERIAL' is assigned
to the characteristic 'MATERIAL' in the SID table for characteristic
'MATERIAL'. The SID table is connected to the associated master data tables
via the characteristic key.

Patni Internal

Page 11 of 205

SAP BW

Figure 1.5: Master Data Tables

1.5.3. Connecting Master Data Tables to an InfoCube

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.

Figure 1.6: Connecting Master Data Tables to InfoCube

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

Figure 1.7: Sharing Master Data Tables among InfoCubes

1.5.4. Comparison of SAP BW Star Schema and Classic Star


Schema

Classic Start Schema


Cube
Measure
Fact table
(Dimension) Attribute

Dimension (Table)

NA
NA
NA
NA

SAP BW Star Schema


InfoCube
Key figure or KPI
Fact table
Characteristic
Navigational attributes
Display attributes
(External) Hierarchy node
Dimension table
Master table
Text table
External hierarchy Table
(SID) Table
Standard business content
Hierarchies
MultiProviders
Remote cubes

Table 1.2: Comparison of SAP BW Star Schema and Classic Star Schema

1.5.5. Advantages of the SAP BW 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.5.6. Disadvantages of the SAP BW Star Schema

A large number of joining operations take place due to introduction of


various tables. This could slow down the data access operations as
compared to the classic star schema.

1.5.7. SAP BW Star Schema Restrictions

To summarize the features of SAP BW Star Schema, remember the following


points.
Maximum of 1 fact table per InfoCube
Maximum of up to 16 dimension tables (containing different
characteristics) per InfoCube
Minimum of 4 dimension tables (3 system reserved plus at least 1 user
defined) per InfoCube
Maximum of 248 characteristics per dimension table
Maximum of 233 key figures per InfoCube
The SAP BW star schema does not contain master data, hierarchy, or
texts (these data are stored outside of the star schema and are
readily available for querying).

1.6.

Introduction to Administrator Workbench (AWB)

The Administration Workbench (AWB) is the tool used for central


administration, control and monitoring of SAP BW. The AWB allows us to
manage, control and monitor all relevant objects and processes. It provides
schedulers to plan and schedule the load processes, a monitor to monitor
the loads and various assistant to analyze the loads and finding out the
errors.
The AWB basically allows us work in the following function areas:
Modeling
Monitoring
Reporting Agent
Transport Connection
Documents
Business Content
Translation
Metadata Repository
Patni Internal

Page 14 of 205

SAP BW

Figure 1.8: The Administrator Workbench

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.

1.6.3. Reporting Agent


The Reporting Agent is a tool with which you can schedule and execute
reporting functions in the background, such as the evaluation of exceptions,
the printing of queries and the pre-calculation of Web templates. To access
the Reporting Agent function area, in the AWB navigation box, choose
Reporting Agent.
Patni Internal

Page 15 of 205

SAP BW

1.6.4. Transport Connection

The Transport Connection can be used to collect newly created or changed


objects in the SAP BW system. You can use the Change and Transport
Organizer (CTO) to transport them into other SAP BW systems. (From
quality assurance into the productive system, for example). To access the
Transport Connection function area, in the AWB navigation window, choose
Transport Connection.

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.

1.6.6. Business Content


Business Content provides pre-configured information models based on
metadata. It provides users in an enterprise with a selection of information
they can use to fulfill their tasks. To access the Business Content function
area, choose the transaction RSORBCT.
1.6.7. Translation

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.

1.6.8. Metadata Repository


In the HTML-based SAP BW- Metadata Repository, all SAP BW Meta objects
and the corresponding links to each other are managed centrally. Together
with an integrated Metadata Repository browser, a search function is
available enabling a quick access to the Meta objects. In addition, metadata
can also be exchanged between different systems, HTML pages can be
exported, and graphics for the objects can be displayed.
To access the Metadata Repository function area, choose the transaction
RSOR.

Patni Internal

Page 16 of 205

SAP BW

2 Introduction to InfoObjects &


InfoCubes

2.1.

Introduction to InfoObjects

InfoObjects in SAP BW are the smallest available information modules or


fields. They contain the technical and specialist information for master and
transaction data in SAP BW. InfoObjects are part of the Metadata
Repository. They are uniquely identified with their technical name.
InfoObjects are the basic components of the SAP BW star schema. An
InfoObject is a generic term for SAP BW business evaluation objects.
InfoObjects are part of the SAP BW metadata repository. They describe the
properties (technical definition and business logic) of the application field.
SAP provides various InfoObjects as a part of its Business Content. The
technical names of these InfoObjects begin with 0. In addition to these
standard InfoObjects, we can define our own InfoObjects.

2.2.

Types of InfoObjects

The InfoObjects are divided into 2 types viz.


Characteristics
Time Characteristics
Units
Technical Characteristics
Key figures
1. Characteristics: In SAP-BW, attributes located in the dimension tables
are called Characteristics. In traditionally data modeling, a characteristic is
a field that allows activity to be categorized such as customer, customer
group, material, material group, product, product group, sales organization,
fiscal year, period, and region. Characteristics correspond to key fields in a
fact table and can be used to sort, select, and subtotal in queries. Note that
characteristics are descriptive in nature and are not normally additive as
opposed to key figures. SAP BW offers four possible data types for
characteristics:
1. CHAR (character)
2. NUMC (Numeric Character)
3. DATS (Date)
4. TIMS (time)
Note:
There can be up to 248 characteristics per dimension table
Patni Internal

Page 17 of 205

SAP BW

The length of the characteristic value can vary from 1 to 60


Characteristic may have a compound key and can refer to other
characteristics

2. Key Figures (quantitative information, e.g., amount, count, quantity)


Note: Key figure InfoObjects cannot be authorization relevant.
Key Figures A key figure is a data element from a fact table and usually
represents numeric data that can be measured, such as revenues and gross
profit. The key figure InfoObjects provide the values to be evaluated. E.g.
Quantity sold (0QUANTITY), Amount (0AMOUNT), Headcount etc. In other
words, they represent the facts in the conventional data warehouse.
Characteristics - Characteristic InfoObjects are business reference objects,
which are used to analyze key figures E.g. Plant (0PLANT), Country
(0COUNTRY), Material (0MATERIAL), Product (MYPRODUCT). Characteristics
provide different views for analyzing the facts. The dimensions are formed
using Characteristic InfoObjects.
Time Characteristics - Time characteristics form the time reference frame
for data analyses and evaluations. They are delivered with Business
Content. It is not possible to define your own time characteristics. Some of
the time characteristics available are Calendar Day (0CALDAY), Calendar
Month (0CALMONTH), Calendar Year (0CALYEAR), and Fiscal Year
(0FISCYEAR).
Units - The Unit InfoObjects enable key figure values to be associated with
their corresponding units in evaluation. E.g. Currency unit (0CURRENCY) can
be associated with the key figure Amount (0AMOUNT) and value unit (0UNIT)
with Quantity (0QUANTITY).
Technical Characteristics - These characteristics are used for SAP BWs
internal operations. E.g. Request ID (0REQUID) represents the numbers
allocated to loading requests while Change ID (0CHNGID) give the numbers
allocated by the system during aggregate change runs.
InfoObjects can exist in three versions in SAP BW:

D: SAP-delivered version. SAP-delivered (D) InfoObjects are reserved


SAP objects. They can be used as templates or copy in the active SAP
BW client.

M: Revised version. Revised (maintenance) version (M) is for objects


that are under revision. They could be a copy of an SAP-delivered
Patni Internal

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.

A: Active version. Active (A) InfoObjects are InfoObjects that meet


all specified rules and are ready for use in the SAP BW active client.

Activation is a process that makes revised objects available at runtime.


Upon activation a runtime object is generated and can be accessed by
application programs and screen templates.
In SAP BW, all dependent objects need to be activated before they can be
used, including InfoObjects, InfoCubes, transfer rules, communication
structures, and so forth. Additionally, custom InfoObjects can be created
(e.g., to define a custom data file).
InfoObjects are organized in two areas of the SAP BW Administrator
Workbench (AWB):
1. InfoArea. An InfoArea is a folder in the AWB used to store and
organize related InfoObjects.
2. InfoObject Catalog. An InfoObject catalog is a folder in the AWB
containing related InfoObjects.
There are two types of InfoObject catalogs:
1. Characteristics
2. Key Figures

2.3.

Characteristic InfoObject

As mentioned earlier, the characteristics InfoObjects are the business


reference objects using which we analyze the facts. While creating such
characteristics in SAP BW, the following tab pages are available in the
maintenance menu.
General
Business Explorer
Master data/texts
Attributes
Hierarchy
Compounding
You can use these tab pages to define characteristic InfoObjects and change
their settings. A precise knowledge of the business significance of these
characteristics is required before you can define them in a meaningful way.

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.

Figure 2.1: Creating Characteristic InfoObject General

Note: If the Attribute Only check box under Miscellaneous block is


selected, the attribute can be used only as a display attribute, not as a
navigational attribute. Selecting this option also allows you to select the
Lowercase letters. If the option Lowercase letters is selected, the attribute
can accept lowercase letters in data to be loaded. If the option Lowercase
letters is selected no master data tables, text tables, or another level of
attributes underneath are allowed
Business Explorer (BEx)
This tab page is used to set the display defaults during reporting in the
Business Explorer (BEx). For example, you can set the default as to the

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.

Figure 2.2: Creating Characteristic InfoObject Business Explorer

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

Figure 2.3: Creating Characteristic InfoObject Master data / texts

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

Figure 2.4: Creating Characteristic InfoObject Attributes

Attributes can be of 2 types Display Attributes or Navigation Attributes.


Display Attributes - Display attributes can only be used as additional
information in reporting when combined with the characteristic. In other
words, in reporting, you cannot navigate within the dataset of a data target
(InfoCube or ODS object).
Navigation Attributes - Navigation attributes allow the users to navigate in
reporting. When a query is executed, the system does not distinguish
between navigation attributes and characteristics for a data target
(InfoCube or ODS object). In other words, all navigation functions in the
query are also possible for navigation attributes. In order to make these
attributes available as navigation attributes in reporting, you need to
activate them once more on a data target (InfoCube or ODS object) level.
Otherwise, the attributes function as display attributes.
A characteristic that is used as a navigation attribute can also have its own
navigation attributes. These are called transitive attributes (navigation
attributes with two levels). You can activate these as well, thus making
them available for reporting.
Patni Internal

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:

If a characteristic InfoObjects is defined as Attribute Only, you can


only use this characteristic InfoObjects as a display attribute for another
characteristic.

The extensive use of navigation attributes leads to a large


number of tables and joins, which can reduce performance.
Time Dependent Attributes

Switch attributes (display or navigation attributes) to 'time-dependent' if a


validity area is required for each attribute value.
(External) Hierarchy
Hierarchies are used in analysis to describe alternative views of the data. A
hierarchy comprises of multiple nodes and leaves. The nodes stand in a
parent-child relationship and the hierarchy leaves are represented by the
characteristic values. On the Hierarchy tab page, you determine whether or
not the characteristic can have hierarchies, and if so, what properties these
hierarchies are allowed to have. If the With hierarchies indicator is set,
hierarchies can be created for this characteristic within SAP BW (choose
transaction RSH1). Alternatively, they can be loaded from SAP R/3 or flat
files.
SAP BW has a unique hierarchy implementation. Hierarchies are tree-like
structures on characteristics domain (e.g., ship to and bill to). In SAP BW,
hierarchies are a type of master data.
Key benefits of the SAP BW implementation of hierarchies are that:

Hierarchies are stored in a class of master data tables (/H***), which


are similar to master data and can therefore be used and referenced
in all of the InfoCubes within an SAP BW instance.
You can define multiple hierarchies against one single characteristic.
SAP BW supports multiple versions of a hierarchy, and internal and
external hierarchies.

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.

Figure 2.5: Creating Characteristic InfoObject - Hierarchy

A Version-Dependant Hierarchy

Hierarchies for a characteristic can be maintained in different versions.


These versions can then be compared with one another in a query. E.g. As
Patni Internal

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

Hierarchy version ACTUAL


Region NORTH
District 1
District 3

Region SOUTH
District 4

Region SOUTH
District 2
District 4
Table 2.1: Version-dependant Hierarchy

A Time-Dependent Entire Hierarchy


You determine here whether the entire hierarchy is allowed to be timedependent. In other words, there are versions for this hierarchy that is valid
for a specific time interval. The system automatically chooses the valid
version.
Hierarchy
01.01.2000 31.12.2005
Region NORTH
District 1
District 2
District 3

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

Example: During restructuring of an organization's sales districts for the


District characteristic, the hierarchy is made time-dependent. This enables
this restructuring to be compared for different times in a query.
Time-Dependent Hierarchy Structure

You determine here whether or not the hierarchy structure (a hierarchy


node) is to be time-dependent. The hierarchy is then constructed for the
current key date or for the key date specified in the query.
Example: During restructuring of an organization's sales districts, it was
found that an employee is assigned to different cost centers at different
times.
Time-Dependent Hierarchy Structure for Char. 'Cost Center'
Patni Internal

Page 26 of 205

SAP BW

Figure 2.6: Time-Dependent Hierarchy Structure for Char. 'Cost Center'

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:

You cannot create hierarchies for characteristics that are


referenced to other characteristics (Reference characteristic).
A characteristic can have more than one hierarchy.
If a characteristic is to have hierarchies; the maximum length
(of the characteristic value) with compounding is restricted to 32
instead of 60 characters.
Hierarchies can have a maximum of 98 levels.

Reverse +/ - signs for hierarchy nodes


This function can be used to influence the display behavior of nodes in the
query. For each hierarchy node, you can specify whether the +/ - sign for
the transaction data posted on this node is to be reversed or not in the
query display.

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.

Figure 2.7: Creating Characteristic InfoObject - Compounding

Note - Performance can be affected when "compounded" characteristics are


used extensively, particularly when a large number of characteristics are
included in a compounding. Compound attributes requires overhead, so you
should not use them unless it is absolutely necessary.
Some examples of compounding are:
Patni Internal

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.

Creating a Characteristic in the InfoObject Tree

1. In the initial screen of the Administrator Workbench, choose the


function area Modeling InfoObjects.
2. Create/maintain an InfoArea
InfoAreas constitute the uppermost evaluation criteria in the InfoObject
and data target tree. The InfoObject tree contains InfoAreas beneath
the initial InfoObjects node. Under an InfoArea node, you can find more
InfoAreas or InfoObject catalogs. You can create an InfoArea via the
context menu for the initial node, or using an InfoArea already in the
system.
3. Create/maintain an InfoObject Catalog with type characteristic.
InfoObject Catalogs are used to group InfoObjects together to provide
both a better overview of them and to arrange them logically according
to application-specific perspectives. An InfoObject Catalog has the type
characteristic or key figure. Under an InfoObject Catalog, there are
either characteristics/units/time characteristics or InfoObject tree key
figures. An InfoObject Catalog is created via the context menu for an
InfoArea.
4. Choose Create InfoObject via the context menu for the InfoObject
Catalog.
5. Enter a technical name (3-9 characteristics) and long description for
the characteristic (either a reference characteristic or a template
characteristic) and confirm your entries.
If you choose a "template characteristic", the "new" characteristic
assumes this characteristic's properties, which you can then edit. If you
choose "reference characteristic", the "new" characteristic assumes all
of this characteristic's technical properties (data type, length, master
data, conversion routine, number of type of "compounded"
characteristics, for example). It also assumes its business texts
(descriptions, display, text selection and person responsible for
example). Nevertheless, technical properties can only be changed in the
reference characteristic.
6. Maintain the tab pages
Patni Internal

Page 29 of 205

SAP BW

General
Business Explorer
Master data/texts
Hierarchy
Attributes
Compounding

When defining a characteristic, you need to enter at least the


description, data type and length. All other settings on the General and
other tab pages are optional.
7. Save and activate the new characteristic.

Activating the characteristic generates the objects in the Data Dictionary


(DDIC) that belong to it. These include the data element, domain and
master data tables for attributes/ texts/hierarchies. If attributes, texts or
hierarchies, or a combination there of are assigned to the characteristic,
this characteristic is called a Master data-carrying characteristic. A
characteristic is a SAP BW object that physically contains data in the
appropriate tables (master data and SID tables). Objects with these
properties are called data targets in SAP BW. In the same way, a
characteristic can also be an InfoProvider. Objects are called InfoProviders
in SAP BW when queries based on them can be defined/ executed.

Figure 2.8: SID Tables

Transactions RSD1 and RSD5 allow you to create InfoObjects without


assigning them to an InfoObject Catalog. Such InfoObjects are called as
"free" InfoObjects. These InfoObjects are then assigned to the InfoObject
Catalog
CHANOTASSIGNED
(non-assigned
characteristic)
or
KEYNOTASSIGNED (non-assigned key figure) depending on the type, under
Patni Internal

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.

Figure 2.9: Creating Key Figure InfoObject Type/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.

Figure 2.10: Creating Key Figure InfoObject Aggregation

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.

Note: Non-cumulative values always have summation as their default


aggregation. For time characteristics, they have an exception aggregation
other than summation. On the other hand, cumulatives using all
Patni Internal

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.

2.5.4. Additional Properties


This tab page is mostly used to change default settings for the key figure
display type (number of decimal places, display scaling and so on) in BEx.

Figure 2.11: Creating Key Figure InfoObject - Additional Properties

As with a characteristic, you are able to define a key figure as Attribute


Only, meaning that the key figure can only be used as a display attribute for
a characteristic.
Patni Internal

Page 34 of 205

SAP BW

2.5.5. Creating a Key Figure in the InfoObject Tree


1. In the initial screen of the AWB, choose the function area Modeling
InfoObjects
2. Create/Maintain an InfoArea within the InfoObject tree
3. Create / Maintain an InfoObject Catalog with type key figure within
the InfoArea
4. Choose Create InfoObject form the context menu of the
InfoObjectCatalog
Enter the technical name (3-9 characters) and a long description for the
key figure (either a reference key figure or a template key figure) and
confirm your entry. (You need a reference characteristic for an
Elimination of Internal Business Volume in the query.)
5. Maintain the tab pages
Type / Unit
Aggregation
Additional Properties

(If a key figure is defined with a reference, the additional tab page
Elimination also appears.)

6. Save and activate the key figure

Activating the key figure generates corresponding DDIC objects. As


mentioned above, if a key figure is defined with a reference, the additional
tab page Elimination appears in the InfoObject maintenance. On this tab
page, one or more characteristic pairs are specified, with reference to
which the key figure can be eliminated upon execution of a BEx query. The
characteristics in the pair must have the same reference characteristic.
Instead of a characteristic you may also use a navigation attribute. A typical
example of such a pair would be sending Cost center(0SEND_CCTR) and
receiving Cost center(0RECV_CCTR).

2.6.

InfoCubes

A cube is synonymous with a star schema, which means it consists of a fact


table and a surrounding group of dimension tables, all of which contain data
that logically belong together, and are linked relationally. Cubes are the
central objects, upon which reports and analyses are based in
multidimensional modeling. InfoCubes are the central objects of the multidimensional model in SAP BW. Reports and analyses are based on these. An
InfoCube describes a self-enclosed data set for a business area from a
reporting perspective. Queries can be defined and/ or executed on the basis
of an InfoCube. InfoCubes contain the transaction data in multidimensional
format. In SAP BW a cube is called an InfoCube.

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)

MultiProvider. Joining of several Basic and/or Remote Cubes (special


implementation of the join of one or more basic InfoCubes)

DemoCube. SAP-supplied InfoCube (as part of the business content)


to enable a complete data warehouse scenario to be implemented for
demonstration and evaluation purposes (prepackaged intellectual
capital)

Remote Cube. InfoCube whose transaction data are not managed in


SAP BW but managed in a remote system (to access remote OLTP
systems)

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

As already mentioned, a BasisCube consists of a quantity of relational tables


arranged together in a star schema.

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.

Facts and 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

A fact is a measure that is normally (cumulative) and answers the question


how much? or how many? A fact is referred to as a key figure in the SAP
BW extended star schema. Revenues and expenses are examples of typical
facts. Examples of non-cumulative facts include closing stock price, daily
movements, or inventory levels.
A factless fact is an artificial fact and does not represent a numerical
measurement. Factless facts are used as a counter to record a large number
of events (e.g., daily class attendance).
Fact Table
Facts, of course, reside in a fact table. A fact table is the central table in a
star schema. It contains key figures and dimension IDs that point to the
dimension tables. In a star schema, typically
The fact table is very large with small dimension tables.
The fact table has a relatively small number of columns (key
figures) and a large number of rows (records) where
associated dimension tables tend to have a large number of
columns (attributes) and small number of rows.
Dimensions and Characteristics
The dimensions and characteristics are key components of a
multidimensional model/star schema. The dimensions represent the points
in the star.
Dimension
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. Dimensions are stored in dimension tables.
The term dimension refers to dimension tables, and characteristics will be
used as the content of dimension tables.
As a value added to other data warehouses, SAP has predefined three
dimensions, time, unit and package, as reserved dimensions for the
InfoCubes in SAP BW.
It is important to note that the SAP BW InfoCube/star schema is limited to a
minimum of 4 and a maximum of 16 dimension tables:
A BasisCube usually has four dimension tables also called Reserved
Dimension.
1. Units dimension table This dimension exists if at least one key
figure is of type amount or quantity. Key figures of type Unit need
Patni Internal

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

BasisCube. Holds the time characteristics needed for analysis


4. A user-defined dimension for example material dimension table
It is important to note that the SAP BW InfoCube/star schema is limited to a
minimum of 4 and a maximum of 16 dimension tables:

Three standard/reserved dimensions (time, packet ID, and unit)


At least one dimension to be defined by the SAP BW administrator
The SAP BW system administrator can create up to 13 dimension
tables (computed by 16 3 reserved).

Figure 2.12: Structure of a BasisCube

Patni Internal

Page 38 of 205

SAP BW
Dimensions

A dimension in SAP BW is nothing but a grouping of logically related


characteristics under a single umbrella term. A maximum of 248
characteristics can be combined within a dimension.
Line Item Dimension

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.

Figure 2.13: Line Item Dimension

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

Remote cubes are SAPs alternative to OLTP reporting tools in SAP


BW.

There are two types of Remote Cubes in 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.

General Remote Cubes. A general Remote Cube is a Remote Cube


that allows the definition of queries with direct access to transaction
data in source systems other than SAP.

2.8.

Creating an InfoCube in the InfoProvider Tree

1. In the-initial screen of the Administrator Workbench, choose the


function area Modeling InfoProvider.
2. Create/maintain an InfoArea within the InfoProvider tree
3. Via the context menu (Right mouse click) for the InfoArea, choose
Create InfoCube
4. Select an InfoCube type
5. Specify a technical name (3-9 characters) and a description for the
InfoCube/Template InfoCube.
6. Via Create, you reach the initial screen of InfoCube maintenance.
7. Using the Characteristic tab page, transfer the active characteristics,
from the template list. You need at least one Characteristic.
Compounded and referenced InfoObjects are transferred
automatically.

Patni Internal

Page 40 of 205

SAP BW

Figure 2.14: Characteristics for Cube

8. Using 'Nav. attributes button, you can select the navigation


attributes for the characteristic.
9. Using the Time characteristics tab page, transfer the time
characteristics, from the template list. You need at least one Time
Characteristic.

Patni Internal

Page 41 of 205

SAP BW

Figure 2.15: Creating BasisCube - Time Characteristics

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

Figure 2.16: Creating BasisCube Key Figures

11. Define dimensions using the Dimensions button on Characteristics


tab page. Create the required dimensions. The Data Package, Time
and Unit (depending on the key figure references) are automatically
inserted. The system assigns the technical name for the dimensions.
It derives this from the technical name of the InfoCube. .

Patni Internal

Page 43 of 205

SAP BW

Figure 2.17: Defining Dimensions for a Cube

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.

Figure 2.18: Partitioning a Cube


Note:
Partitioning of the fact table is limited to 0CALMONTH or
0FISCPER.
After partitioning, physically there will be more than one fact
table.
Partitioning should be set up on creation of the InfoCube and
cannot occur after data have been loaded (partitioning cannot
occur if data are in the InfoCube.

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.

14. Save and activate the new InfoCube.


Upon activation of a BasisCube the corresponding DDIC objects like
dimension tables, fact table (F table, E table) are generated. Thus the
star schema gets technically realized.
Note: Except for the text table, hierarchy table and E tables, you can view
the various tables generated using the transaction LISTSCHEMA.
Note: A transactional InfoCube is a special BasisCube, especially developed
for Strategic Enterprise Management (SAP SEM). The system accesses data
in such a cube transactionally, in other words, data is written to the
InfoCube (possibly from more than one user at the same time) and instantly
read again when required. Standard BasisCubes are not suitable here. Use
Standard BasisCubes for pure read access (when reading reference data, for
example).

Patni Internal

Page 45 of 205

SAP BW

Technical Implementation of SAP BW Star


Schema

2.9.

As mentioned earlier, upon activation of InfoObjects and InfoCubes a


number of DDIC objects- mainly tables and views - get generated. These
DDIC objects are the way in which the SAP BW data model is realized
technically.

2.9.1. Master Data Tables


When a master data-carrying characteristic is activated, master data tables
(attributes, text, hierarchies) are generated in the characteristic
maintenance depending on the settings in the respective tab strip. In
multidimensional data modeling, master data are not part of the model.
They exist outside of the multidimensional structure. In SAP BW extended
star schema, the master data are share across InfoCubes, which provides for
consistency of master data across InfoCubes.
2.9.2. Text Table
A text table is created if the With texts checkbox is flagged prior to the
creation and subsequent activation of the InfoObject. You can select the
following properties here: (refer to Figure 2.18)
Short text
Medium-length text
Long text
Texts are language-dependent
Texts are time-dependent
The selection options affect the text table key. For example, in a timedependent and language dependent text table, the two fields LANGU
(language key) and DATETO (date valid to) belong to the text table key.
Only one text table is generated for each characteristic.

Patni Internal

Page 46 of 205

SAP BW

Figure 2.19: With Texts

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

Figure 2.20: Time-dependant Texts

Naming conventions in the text table:


/BIC/f<name of characteristic> (for customer-defined characteristics)
/BI0/T<name of characteristic> (for SAP standard characteristics)

2.9.3. Attribute Tables

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

Figure 2.21: Attribute Tables


Patni Internal

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:

Figure 2.22: OBJVER attribute

Step 1 shows the original data record for a master data-carrying


characteristic. If changes are made to the master data, the system
generates an additional data record (step 2), which has status M. You must
Patni Internal

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.

Figure 2.23: OBJVER attribute after Activating Master Data

Naming conventions in the attribute table:


/BIC/P<Name of characteristic> (for customer-defined characteristics that
have time-independent attributes)
/BIC/Q<Name of characteristic> (for customer-defined characteristics that
have time-dependent attributes)
/BI0/P<Name of characteristic> (for SAP standard characteristics that have
time-independent attributes)
/BI0/Q<Name of characteristic> (for SAP standard characteristics that have
time-dependent attributes)

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

Figure 2.24: With Hierarchies

Figure 2.25: Hierarchy table

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

Figure 2.26: Hierarchy Example

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

2.9.5. SID Tables

In the below example, the connection between master data-carrying


characteristics, navigation attributes, SID values and external hierarchies is
looked at in more detail.
Patni Internal

Page 53 of 205

SAP BW

2.9.6. S Table

The S table is generated when a characteristic is activated. With one


exception: When a characteristic is defined exclusively as an attribute. In
other words, this characteristic can only be defined as the attribute of a
master data-carrying characteristic in a different scenario. The graphic
shows the structure of an S table. The key of this table is the characteristic
for which the artificial key was generated. If the characteristic is
compounded, the key is also made up of the compounded characteristic.
The SID keys are automatically generated by the system when master data
is uploaded.
The following graphic illustrates the relationship between the S tables and
the tables belonging to the master data-carrying characteristic COSTC##.
The diagram has been simplified to make it easier to understand.

Figure 2.27: S Table Example

2.9.7. Table, Time Independent Navigation Attributes


The X table is only generated when at least one time-independent attribute
is defined as navigation attribute. The key of the X table of the navigation
attribute (naming convention S_<Name of attribute>) is the SID for the SID
table belonging to the characteristic whose attribute is used here as the
navigation attribute. The following graphic illustrates the structure of the
table. We can also look at the subject matter involved here using the
Patni Internal

Page 54 of 205

SAP BW
example of the profit center navigation attribute for the master datacarrying characteristic COSTC##. The graphic has been simplified.

Figure 2.28: X Table Example

2.9.8. Table, Time Dependent Navigation Attributes

The Y table is only generated when at least one time-dependent attribute is


defined as navigation attribute. The key of the Y table of the navigation
attribute (naming convention S_<Name of attribute>) is the SID for the SID
table belonging to the characteristic whose attribute is used here as the
navigation attribute. The following graphic illustrates the structure of the
table. We can also look at the subject matter involved here using the
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

Figure 2.29: Y Table Example

2.9.9. Changes to Characteristic InfoObject


You can make the following changes to a characteristic after master data
has been loaded:
Display attribute (time-independent) Navigation attribute (timeindependent)
Display attribute (time-independent) Navigation attribute (timedependent)
Display attribute (time-independent) Display attribute (time-dependent)
Display attribute (time-dependent) Navigation attribute (timedependent)
The illustrated steps are displayed graphically in the Figure below.

Patni Internal

Page 56 of 205

SAP BW

Figure 2.30: Changes to Attribute Tables

You can enhance the structure of master data-carrying


characteristics after loading master data. You must bear in mind that
you cannot delete fields of a structure containing data unless you
have already deleted this existing data. In other words, if you want
to remove the time-dependency of a display attribute, you must first
delete the content of the table for the characteristic.
SID Table, External Hierarchies

Providing that the With hierarchies indicator was set in characteristic


maintenance, the following SID tables are always generated with the H
table.
SID Table from Nodes

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

Figure 2.30: Structure of K and I Tables

Legend:
SID OSID LINKNO SVER PRED SUCC LISTNO FACTOR NTYPEID -

SID of node within the hierarchy


SID of node, original value
Link number
Version in key of inclusion table
Master data ID (predecessor)
Master data ID (successor)
Sequence of inclusion relationships
Factor with which the inclusion relationship enters the nodes
Internal ID for the node type

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

When defining an InfoCube, characteristic InfoObjects are selected to be


components of this InfoCube. They are then assigned to your user-defined
dimensions. After the InfoCube is activated, the dimension tables are
generated.
The columns of a dimension table do not consist of characteristic
InfoObjects but of SIDs belonging to the characteristics. The characteristics
were selected in the InfoCube definition and assigned to a dimension. DIMID consists of a unique INT4 key, as does the SID ID. When loading
transaction data into the BasisCube, the DIM ID values are allocated
uniquely, whereby each DIM ID value is uniquely assigned to a combination
of SID values for the different characteristics. As you can see from the
Figure 49 below the structure of a dimension table consists of a DIM ID
column and of up to 248 SID columns.

Figure 2.32: Dimension table after loading Transaction Data

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

2.9.10. Fact Tables

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.

Figure 2.33: F table Example

Naming conventions in the fact table:

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 Data Transfer Process in SAP BI


3.1.

Overview of Data Transfer Process

SAP Netweaver 2004s includes a new DataSource concept, changes in


InfoPackages, a new data agent called the data transfer process (DTP),
the removal of the InfoSource as a mandatory data staging layer, and the
consolidation of all data transformations into a single object called BI
transformations.

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.

3.1.2. Data flow in SAP Netweaver 2004s BI

Figure 1.1: Data flow in SAP Netweaver 2004s BI

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.

3.1.3. Key Benefits of DTP

Loading data from one layer to others except Infosources


Separation of delta mechanism for different data targets
Enhanced filtering in dataflow
Improved transparency of staging processes across data warehouse
layers (PSA, DWH layer, ODS layer, Architected Data Marts)
Improves performance: optimized parallelization
Enhanced error handling for DataStore object (error stack)
Repair mode based on temporary data storage

Patni Internal

Page 63 of 205

SAP BW

3.2.

Data Transfer Process Example

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:

Figure 1.2: 2004s BI - Enhanced Data Flow Concept

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.

Creating and Managing DTP

3.3.1. Creating a DTP

Figure 1.3.1: Creation of Data Transfer Process

Go to RSA1 transaction (Data Warehousing Workbench)


DTP is assigned to the target object
Define transformation for the target object , by right clicking on the
target object and selecting create transformation option
Once transformation is defined, DTP can be defined for the target
object by right clicking on the transformation

Patni Internal

Page 65 of 205

SAP BW

3.3.2. Tabs and Settings in DTP Extraction Tab

Figure 1.3.2: Extraction tab inside DTP

Two types of extraction mode Full and Delta


For delta loading, we need to define two DTPs one full and one
delta to load data from source to target
The filter function makes it possible to load a set of data to the data
target instead of the complete volume of data
Different data selections can be made via different DTPs for the
same or for different data targets
We can define the package size, whether the currency conversion
should be switched on or whether it is possible to load the data from
the change log of the DSO

Patni Internal

Page 66 of 205

SAP BW

3.3.3. Tabs and Settings in DTP Update Tab

Figure 1.3.3: Update tab inside DTP


In update tab we can decide the type of error handling. There are 3 types:
No Update, No Reporting Once errors occur, the whole data
package is terminated. The request is not released for reporting
Valid Records Update, No Reporting (Request Red) Valid records
are only updated but data is available for reporting only after
manual processing of the request
Valid Records Update, Reporting Possible (Request Green) Valid
records are updated and also available for reporting

Patni Internal

Page 67 of 205

SAP BW

3.3.4. Tabs and Settings in DTP Execute Tab

Figure 1.3.4: Execute tab inside DTP

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.

Error Handling of DTP

3.4.1. Error Handling Overview


The following flowchart illustrates how error handling works with the DTP.
We have the option in the Update tab of DTP where we can choose whether
error handling feature should be switched on or not.

Figure 1.4: Flowchart for error handling


If we choose option 2 or 3 in error handling it will work as follows:
Data is loaded via infopackage from source system to PSA table.
There is no error handling available for infopackage. In case of
invalid records data needs to be reloaded from the source system.
Data from PSA to data target can be loaded via DTP. As error
handling feature is switched on, the invalid records will be updated
into the error stack. The correct records will be updated into the
data target. After correcting the records in the error stack, these
corrected data records can be loaded to the data target via Error
DTP.
Patni Internal

Page 69 of 205

SAP BW

Error DTP is a special DTP which is responsible or loading data from


the error stack to the data target.

3.4.2. Error Handling Overview

3.5.

Possibility to choose in the scheduler to


Abort process when errors occur
Process the correct records but do not allow reporting on them
Process the correct records and allow reporting on them
Invalid records can be written into an error stack
In DSO we have overwrite as an update mode and hence sequence
of the data is very important. Hence, keys should be defined for error
stack to enable the error handling of DSO
Temporary data storage can be switched on/off for each sub step of
the loading process
Invalid records can be updated into data targets after their
correction
Error Stack in DTP

The following are some features of Error Stack:


Stores erroneous records
Keeps the right sequence of records for consistent DataStore
handling
Key of error stack defines which data should be detained from the
update after the erroneous data record
After correction, Error DTP updates data from error stack to data
target
Once the request in the source object is deleted, the related data
records in error stack are automatically deleted

Patni Internal

Page 70 of 205

SAP BW

3.5.1. Key of Error Stack


The key of the error stack should be as detailed as possible. If less fields are
defined as key of the error stack, more records will be updated into the
error stack. For example, if we select company code as error stack key and
one record of a particular company is wrong, all records belonging to this
company code will be written to the error stack. Thus, a detailed key leads
to a small amount of entries in the error stack. The key of the DSO is
defined as the initial key of the error stack by default. We can select all of
them or some of them as the key for error stack.

Figure 1.5.1: Key of Error Stack

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

3.5.2. Error Stack Example One Request

Figure 1.5.2: Error Stack Example


The Order Number field is the key for the error stack. During the
transformation, data record 02 of request 109882 is marked as containing
errors. In addition to the erroneous data record, all subsequent data records
for the request that contain the same key are written to the error stack. In
this example, this is data record 03. This ensures that when error records
are updated with the error DTP, the records are serialized correctly and
newer data is not inadvertently overwritten by older data.

Figure 1.5.3: Error Stack Example

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.

3.5.3. Error Stack Example Multiple Requests

Figure 1.5.4: Error Stack Example


The Order Number field is the key for the error stack. During the
transformation, data record 02 of request 109882 is marked as containing
errors. In addition to the erroneous data record, all subsequent data
records, including the following request that have the same key are written
to the error stack. In this example, data record 01 for request 109883 is
written to the error stack in addition to data record 02 for request 109882.

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.

Temporary Storage for DTP

3.6.1. Settings and options


Settings for temporary data storage:
Level of Detail
Tracing the erroneous records
Tracing transformation by package
Tracing transformation by record
Deletion of temporary storage
With request status green
If request is deleted
After X days

Figure 1.6.1: Temporary Storage for DTP

Patni Internal

Page 74 of 205

SAP BW

We can access the settings under the Goto menu.

It provides help for tracing the erroneous records and


transformations. Data records from different steps within the DTP
can be stored temporarily. Stores complete set of data (erroneous as
well as valid records) unlike the error stack. The scenario
recommended for using temporary data storage:
If the debugging mode is switched on
Trace the erroneous records
Trace transformation
We can trace incorrect data, incorrect transformations by package or
by record. We can also define when this temporary data storage
should be deleted. Also, we can decide for which loading step we
wish to define the temporary data storage.

3.6.2. Temporary Storage and Error Stack

Figure 1.6.2: Temporary Storage & Error Stack

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

3.7.1. Monitor Screen of DTP

Figure 1.7.1: Monitor Tab of DTP

This is integrated in InfoProvider management screen and integrated


in DTP maintenance
Additional information: duration of each step
Temporary storage access if activated
Error stack is displayed in DTP Monitor

Patni Internal

Page 76 of 205

SAP BW

3.7.2. Handling Error with DTP


Following are the steps to handle data records with error with DTP:
1) Failed status of DTP in DTP Process Monitor because of invalid character
in records. By clicking on Error Stack we can check error records.

2) Total of 3 records with error in source data.

Patni Internal

Page 77 of 205

SAP BW

3) Correcting erroneous records in Error Stack by clicking edit button on top


left.

4) Creating Error DTP from the update tab of standard DTP.

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

7) Schedule the Error DTP from Execute tab.

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.

Managing InfoCubes-Data Maintenance

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.

3.8.1. Maintaining InfoCube Data


As shown in the Figure 4.22, from the Administrator Workbench, right click
the concerned InfoCube, and then select Manage.

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.

Figure 4.23: Manage InfoCube: Contents

3.8.2.1. Display InfoCube Contents


Choose Contents tab, then click InfoCube content button, the following
screen is displayed

Patni Internal

Page 83 of 205

SAP BW

Figure 4.24: Display InfoCube Contents

In screen shown above, we specify conditions regarding what contents to be


displayed. Some of the options are:

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

3.8.2.2. Delete InfoCube Contents


Choose Contents tab, and then click Selective deletion button, the
following screen is displayed

Patni Internal

Page 84 of 205

SAP BW

Figure 4.25: Delete InfoCube Contents

In this pop-up window, we can specify the data to be deleted and how to
delete them by clicking Delete selection button.

Figure 4.26: Delete Selections

In this window, under Options block we can do the following:


Select Parall. Deg. during reconstruc to enter the number of parallel
processes to be used in reconstructing the table
Select Switch off logging drng recons to improve performance
without logging the changes
Select Display generated report to display the ABAP program used to
delete the data

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

Figure 4.27: Manage InfoCube: Performance

Note that the status light should always be green. If no index/statistics data
exist, the status lights will be red.

Delete Indexes (Immediately) to delete indexes. Now the status light


turns red
Repair Indexes (Immediately) to create the indexes

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

Figure 4.28: Delete Indexes

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

Rolling up aggregates will automatically repair the aggregate indexes


In the same way, we can check, delete, and create statistics.
If the DB Statistics status is red, click Refresh statistics
To automate this process, click Create Statistics

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:

Figure 4.29: Manage InfoCube: Requests

Table 4.8: Request Id QM 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

Figure 4.30: Manage InfoCube: Check Requests

A new session window opens and displays the requests 30 character request
number

Figure 4.31: Manage InfoCube: Check Requests Consistency

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.

Figure 4.26: Manage InfoCube: Rollup

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).

Figure 4.27: Compressing the InfoCube

This function comes with a disadvantage: Compressed data can no longer be


deleted from the InfoCube using request IDs. In other words, BasicCube data
can either be deleted via Selective Deletion or it can be deleted
completely.
For performance reasons, and to conserve storage space, we recommend
that you compress the BasicCube as soon as you know that the request was
loaded correctly and that no more data is to be deleted from the InfoCube.

Patni Internal

Page 92 of 205

SAP BW

Figure 4.28: Manage InfoCube: Collapse

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.7. Automating rollup and InfoCube compression:


You can also automate the rollup and compression of the InfoCube for newly
loaded data records. You can do this by calling up, from the context menu
for the InfoCube to be managed, Manage Environment Automatic
Request Processing. You can set the following indicators here:

Set quality status to OK


Roll up data in the aggregate
Compress after rollup

Figure 4.29: Manage InfoCube: Set Quality Status

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.

Figure 4.30: Manage InfoCube: Reconstruct

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.

Select the InfoCube, and then click

Patni Internal

Page 95 of 205

SAP BW

Figure 4.31: Monitor Button

Click
to continue. Leave Date Selection blank, as we want to
list the status of all data loads.

Figure 4.32: Date Selection

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

Figure 4.33: Monitor: Status

Click
under Status tab to display the error. The
message box is displayed.

Figure 4.34:Error Messages

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

Figure 4.35: Monitor: Details

To review the status of other data loads, we can click New Selection (F5)
button

Figure 4.36: Monitor: New Selection

Patni Internal

Page 98 of 205

SAP BW

Figure 4.37: Monitor: Selection Data Request

In the above screen, we can specify selection conditions to display the


status of the data loads.

Patni Internal

Page 99 of 205

SAP BW

4 Data Store Objects (DSO)


The ODS object played an important role in the former version of BI
warehouse management. This has been succeeded by the compatible but
superior object type Data Store Object in SAP NW 2004s.
Data Store Object offers certain performance improvements as well as
enhanced capabilities in analysis.
Enhanced capabilities at one glance:

Full compatibility to the former ODS Object No migration needed


DSOs can be used in analysis Regardless of settings and type
New Data Store Object Type Write optimized
Transactional ODS is now called as Data Store Object for Direct
Update.

Various Types of the Data Store Objects


1. Standard
2. Direct Update
3. Write-Optimized

4.1.

Data Store Object definition:

1. Context Menu:
Direct Access to display data
Additional Functions

Figure 5.1 Additional functions of DSO


Patni Internal

Page 100 of 205

SAP BW

2. New Data Store Object Settings:

Data Store Object Type: Can only be set/changed if there is no data


in the DSO.

Figure 5.2: New DataStore Object Settings

SID Generation upon Activation Replaces BEx Reporting and is


pure performance setting. Reporting is possible if this is not set.

Other settings are similar to those available in 3.X ODS.

Patni Internal

Page 101 of 205

SAP BW

4.2.

Data Store Object Types

4.2.1. Data Store Object Types Overview:


Data Store
Object
Type
Standard

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

4.2.2. Standard Data Store Object:

Figure 5.2.2: Standard DataStore Object

Patni Internal

Integration
into
Dataflow

Page 102 of 205

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:

Used to store the data to be updated in the Data Store


Object which has not been activated.
After activation data is deleted from this table
Technical Key: Request SID, Package ID, Record Number

Patni Internal

Page 103 of 205

SAP BW

Figure 5.2.2: Technical Keys Of Activation Queue


Active Data Table:

Structure same as the Data Store Object definition. Also


called as A-Table.
Technical Key Key fields defined in the DSO
When the request is activated data moves from Activation
Queue to this table.

Change Log:

Change history for delta mechanism from the Data Store


Object into other infoprovider
Key Fields Request GUID, Package ID, Record Number.

Patni Internal

Page 104 of 205

SAP BW

Figure 5.2.2: Structure of DSO

Standard DataStore Object - Activation


Performance Improvements of the activation process:

Figure 5.2.2: Performance Improvements of the activation process


Patni Internal

Page 105 of 205

SAP BW

The Activation Process features the following:

Single scan on the Activation Queue for all parallel activation


processes
Packages are stored in cluster No scan necessary at the restart
Activation Queue contains Request SID (instead of GUID) no join
with request SID necessary
Package fetch instead of single select

4.2.3. Write-optimized Data Store Object:

Figure 5.2.3: Settings Of Write optimized DSO

1. Definition:

The Data is stored simply in one version


Only one table exists Active Data Table with key and data fields of
its definition
Active Data Table is partitioned according to the Request ID.
There is no change log table - delta capabilities are not needed
o To access most recent data use a date field in the Data Store
Object definition
There is no SID generation during the data load- BEx-Reporting is
switched off.
It can be used for transformation upload scenarios. Also it is possible
to extract data.
There is direct reporting possible on this object without activation
Also Infoset can be used to join the Active Tables
Patni Internal

Page 106 of 205

SAP BW

Also it is possible to include this object into multiprovider

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:

This icon indicates that


this is Write-Optimized
DSO

4.2.4. Data Store Object for the Direct Update:

Figure 5.2.4: Settings Of DSO for Direct Update


Patni Internal

Page 107 of 205

SAP BW

1. Definition:

The Data is stored simply in one version


Only one table exists Active Data Table with key and data fields of
its definition
This type of the Data Store Object can be used for analysis processes
e.g. with the Analysis Process Designer (APD)
It can not be used for transformation upload scenarios there is no
loading into Data Store Object for direct update within BI. But it is
possible to extract data.
There is no direct reporting on this object possible yet instead you
may use an infoset to join the active tables.
Not possible to include the object into multiprovider.
The Data Store Object for direct update can be used for transactional
data.

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:

This icon indicates that


this is DSO for Direct
Update

Patni Internal

Page 108 of 205

SAP BW

4.3.

Data Store Object Administration

4.3.1. Overview

Figure 5.3: New Monitor Concept in DSO

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

Page 109 of 205

SAP BW

Figure 5.3: Header View

Details View: Displays all the relevant steps with timestamp of the transfer
process.

Figure 5.3: Details View


Patni Internal

Page 110 of 205

SAP BW

b) Logs for DSO Request Processing:

Figure 5.3: Logs for DSO

1. This log information


RSODSO_SHOWLOG

can

also

be

viewed

via

transaction

Parameters Required:
Request ID
Name of the Data Store Object

Patni Internal

Page 111 of 205

SAP BW

Figure 5.3: Transaction RSODSO_SHOWLOG

2. Different entry points are possible via transaction:


Activation of Data
Loading Data
Delete Data
Rollback of Data
All operations
3. All operations are also displayed when clicking on the icon within the
DSO administration Manage
View.
4. For each operation there is detailed information.

4.4.

DataStore Object Administration - Performance:

Following are some administration points to be noted for optimum


performance
1. SID Generation:

Do not mark the check box when there is no reporting


Time consuming characteristic SID generation is avoided within
activation.

1. Partitioning/Clustering

Patni Internal

Page 112 of 205

SAP BW

Database maintenance features for having better read-write and


delete access.
Write-optimized DSO is automatically partitioned.
Manual Partitioning according to OSS notes 565725 and 742243

3. Indexing:

If reporting selection criteria do not match the key specifications


secondary indices help to improve query response time.
Index maintenance can be done within the Data Store Object
definition.

4. Data Modeling Tips:

Only as many key fields as necessary


Reduce granularity as far as possible
Only as many data fields as necessary
Reduce information fields as far as possible
Load only as many data records as necessary

Patni Internal

Page 113 of 205

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

Page 114 of 205

SAP BW

Figure 6.1: MultiProvider Concept

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.

MultiProvider, Application Example

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

Page 115 of 205

SAP BW

Sales Order

ONUM : Order Number (C)


CUS : Customer (C)
PROD : Product (c)
OOAT : Order Date (C)
SALP : Sales Person (C)
OQTY : Order Quantity (K)
OPRI : Order Price (K)

Delivery

Billing

ONUM : Order Number (C)


CUS : Customer (C)
PROD : Product (c)

ONUM : Order Number (C)


CUS : Customer (C)
PROD : Product (c)

DDAT : Delivery Date (C)


DELP : Delivery Person (C)
DQTY : Delivered Quantity (K)
DPRI : Delivery Price (K)

BDAT : Billing Date (C)


BILP : Billing Person (C)
BQTY : Billing Quantity (K)
DPRI : Delivery Price (K)

Figure 6.2: Basic Cubes

You can now define a MultiProvider that includes these common


characteristics as well as the key figures of the BasisCubes involved. The
MultiProvider can now be used in queries.

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

ONUM : Order Number (C)


CUS : Customer (C)
PROD: Product (C)
OOAT : Order Date (C)
SALP : Sales Person (C)
OQTY : Order Quantity (K)
OPRI : Order Price (K)

Delivery
ONUM : Order Number (C)

Billing
ONUM : Order Number (C)

CUS : Customer (C)

CUS : Customer (C)

PROD: Product (C)

PROD: Product (C)

DDAT : Delivery Date (C)


DELP : Delivery Person (C)
DQTY : Delivered Quantity (K)
DPRI : Delivery Price (K)

BDAT : Billing Date (C)


BILP : Billing Person (C)
BQTY : Billing Quantity (K)
DPRI : Delivery Price (K)

Figure 6.3: MultiProvider

Patni Internal

Page 116 of 205

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

Figure 6.4: MultiProvider Queries

A key figure contained in a MultiProvider must be selected from at least one


of the InfoProviders involved. Generally, the key figure is supplied from
precisely one InfoProvider. However, there are some situations in which it
makes sense to select from more than one InfoProvider.
It is both desirable and sufficient for you to select from precisely one
InfoProvider involved in cases where a key figure, for example 0SALES
(sales) is stored redundantly in several InfoProviders (in other words,
entirely contained in all value combinations of the characteristics). If this is
not the case, the value appearing more than once in the MultiProvider
would be incorrectly added. However, if 0SALES is saved, say, as an actual
value in one InfoProvider and as a plan value in another, you must select
from several InfoProviders. This avoids overlaps in the data records (where
the revenue from several InfoProviders is distributed in disjointed form).

Patni Internal

Page 117 of 205

SAP BW

5.3.

Creating a MultiProvider

1. In the context menu for your InfoArea, right Click and choose Create
MultiProvider

Figure 6.5: Create MultiProvider

2. The following screen is displayed: Give the name of the MultiProvider,


Short Description and InfoArea Name, and then click on

Figure 6.6: Edit MultiProvider


Patni Internal

Page 118 of 205

SAP BW
In the subsequent window, you can select the objects involved in the MultiProvider
viz., InfoCubes/ODS Objectstab page and the click

Figure 6.7: Select Relevant InfoProviders

3. The template for maintaining the MultiProvider appears. In the template


you can see all the characteristics of the involved objects. Move
appropriate characteristics from Template to Structure.

Patni Internal

Page 119 of 205

SAP BW

Figure 6.8: Edit MultiProvider: Characteristics

4. Next, assign characteristics of chosen objects to each characteristics of


the MultiProvider. For that click
displayed.

Patni Internal

the next screen is

Page 120 of 205

SAP BW

Figure 6.9: Identification of Characteristics involved

5. Select the assignments or simply choose

. Confirm

your entries by choosing


6. To

assign

the

characteristics

to

the

dimensions,

choose,

. Choose Yes, to generate proposal. Allow the


dimensions to be created from a template. Use Assign tab to check the
assignment of characteristics to the dimensions. Choose

Patni Internal

Page 121 of 205

SAP BW

Figure 6.10: Define Dimensions

7. You now need a time characteristics. Choose the Time Characteristics


tab page. Transfer the appropriate time characteristics from Template
to Structure.

Patni Internal

Page 122 of 205

SAP BW

Figure 6.11: Edit MultiProvider: Time-Characteristics

8. Choose
. Assign a time characteristics of the
MultiProvider to a time characteristics of appropriate objects or simply
choose

. Confirm your entries by clicking

9. On the Key Figures tab, transfer all the proposed key figures into the
Structure from the Template.

Patni Internal

Page 123 of 205

SAP BW

Figure 6.11: Edit MultiProvider: Key Figures

10. On the Characteristics tab page, choose


if your
selected objects have navigation attributes. You have to select On/Off
. Then choose
in the
(I/O) column followed by
Characteristics tab page. Assign the navigation attributes by selecting
the assignments in the Equal To column (or simply choose
)
11. Check, save and activate, your MultiProvider.

Patni Internal

Page 124 of 205

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

Page 125 of 205

SAP BW

You frequently use attributes in queries.


You want to expedite reporting using characteristic hierarchies in which
you aggregate specific hierarchy levels.

6.1.1. Screen Info for an Aggregate


An aggregate is built of characteristics and navigation attributes from a
BasicCube. Both time-dependent attributes and hierarchies can be used in
aggregates. Compression takes place, using characteristics that are not used
in the aggregate. When you create and activate an aggregate for a
BasicCube, then fill it with data; the OLAP processor dynamically accesses
this aggregate. When navigating the different results remain consistent. For
the end user, the aggregate is transparent. New data is loaded for a defined
time period using logical data packages (requests) in an aggregate. After
this process, known as the roll-up, the new data is available for reporting.
Only one aggregate can be used for each query step. A Basic-Cube can have
more than one aggregate. If several aggregates are created for a BasicCube,
these aggregates are all checked when executing a query from the OLAP
processor. During this check, the OLAP processor reads all BasicCube
aggregates and chooses the aggregate that is suitable for the query
definition. The aggregate hierarchy is an exception. If the aggregate for a
hierarchy node from the OLAP processor is not read, the OLAP processor
likewise does not examine the rest of the hierarchy aggregates
Aggregates are defined in the following way* Inclusive; Compression is created using the characteristic
Exclusive; Compression is not created using the characteristic.
F Inclusive with a fixed value; Compression of characteristic with a
defined, fixed value.
H Hierarchy level; Compression of characteristic for a defined hierarchy
level.
The following tables exemplify how this works
Fact Table: Sales Data
Country
Germany
Germany
USA
India
USA
India
Aggregate Tables: Sales Data

Customer
Siemens
ABB
P&G
ABB
Colgate
Siemens

Sales
25
20
10
30
20
50

Country: *
Customer: Empty
Patni Internal

Page 126 of 205

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

Table 3.1: Aggregate Types

6.1.2. Properties at Aggregates

Technical properties, such as content and status properties, belong to the


properties of aggregates. This information is stored in the RSDDAGGRDIR
table.
Among other technical properties, the aggregate name that is generated by
the system is included. This name is unique and consists of 25 characters
(RSDDAGGRDIR table; AGGRUID field). For the database table, an aggregate
name made up of 6 whole numbers is created that is specified in a special
number range (from 100000).
Content and status properties can be indicated as follows. In order to use
aggregates for reporting, they all have to be active and filled. If the use of
one or more aggregates is prevented, three options are available:
Patni Internal

Page 127 of 205

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.

There is also the option of including several characteristics in an aggregate.


Combinations in the restrictions, such as fixed values or hierarchy levels,
are possible here. If the BasicCube uses a key figure, for which an exception
aggregation was defined, this characteristic has to be included in the
aggregate and defined as *. Restrictions are not permitted in this case (for
example, fixed value 'F'). The combination of structurally time-dependent
hierarchies and time-dependent characteristics is not possible.

6.1.3. Technical Construction of an Aggregate

Aggregates are represented in the system as an aggregate cube. This means


that each aggregate consists of two fact tables (E and F) and at least two
Dimension tables (package and customer-defined dimensions; the unit
dimension is not mandatory). The technical naming convention is the same
as that for a BasicCube. Instead of the technical name of the BasicCube for
the tables, the technical name for the aggregate for the database is used
here (remember, it is generated from a number range from 100000). The
technical construction of the aggregate differs in the following ways from
that of a BasicCube.
When up to fifteen characteristics are transferred into the aggregate, the
SAP BW system creates no "real" dimension. In this case, a line item
dimension is created. This refers to flat aggregates. The exception to this is
the data package and time dimensions.
If more than fifteen characteristics are transferred into an aggregate, the
SAP BW system proceeds in two different ways:
If two or more characteristics come from one BasicCube dimension, then
the DIM ID for the BasicCube is entered as a key in the fact table.
If only one characteristic comes from one BasicCube dimension, then the
SID is entered as a key in the fact table. Again, this concerns a line item
dimension.

6.1.4. Aggregate Selection


The selection of the aggregate to be created conforms to the queries that
were defined for the respective BasicCube. However, the question should
be asked here if the aggregates created are at all meaningful or useful for
business. Note the following points before creating an aggregate:

Patni Internal

Page 128 of 205

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

6.1.5. Roll-Up of Aggregates


Included in the roll-up is the loading of data into the aggregate. This occurs
as the BasicCube requests are loaded into the aggregate. A roll-up can
consist of one or more requests. The request ID controls the request in the
roll-up. This request ID is stored in the package dimension of the BasicCube.
A field in the RSDDAGGRDIR table, referred to as the Read Pointer, points
to the latest request, which was rolled up in the aggregate. Once the
request is rolled up in the aggregate, it becomes available for reporting.
The roll-up process can be automated in the Manage Data Targets screen by
following the menu, Environment Automatic Request Processing Roll
up data in the Aggregate.

Patni Internal

Page 129 of 205

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.

Figure 3.2: Request after Rolling Up

Steps to follow for Roll-Up:

1. A new request is written into the BasisCube leads to a new RNSID in


the fact table.
2. Roll-up the new request into the aggregate
3. During the roll-up, the read pointer is set to the new request. This
new request is now available for reporting.

6.1.6. Compression of Aggregates


You can automatically compress aggregates during the roll-up. This causes
the request(s) to be written into the E fact table of the aggregate cube
Patni Internal

Page 130 of 205

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.

Aggregates and Master Data Changes

If you change attributes or hierarchies from characteristics that were used


in aggregates, then it is necessary to make appropriate structure changes in
the aggregates. Because changes to these would invalidate the aggregates,
you cannot activate hierarchies or navigational attributes directly. You can
only mark them for activation. By doing so, two versions exist for navigation
attributes and hierarchies - an active and a modified version. The change
then occurs by means or a realignment run for hierarchies or attributes.
While the changes are made and realignment run in active, reporting
continues to use the old data until the aggregates are rebuilt.
Note the following with realignment runs:

Patni Internal

Page 131 of 205

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.

If characteristic data have been changed, we must activate the change


before BEx Analyzer can display the new data. To change the data entry,
select the row and then click

. Refer to figure:

Figure 3.3: Maintain Master Data

Patni Internal

Page 132 of 205

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.

Figure 3.4: Master Data Change

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

Page 133 of 205

SAP BW

Figure 3.5: Activate Master Data

The second way Apply Hierarchy/Attribute Change not only allows us to


activate master data but may also be applied for hierarchy changes.
Further, if the attribute you changed happens to be an aggregate.
Steps to follow:
Select Apply Hierarchy/Attribute Change on the tools menu (either from
InfoObjects or InfoProvider tree.

Patni Internal

Page 134 of 205

SAP BW

Figure 3.6: Apply Hierarchy/Attribute Change

Figure 3.7: Execute Hierarchy/Attribute Changes: InfoObject List

Patni Internal

Page 135 of 205

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.

Figure 3.8: Choose InfoObject from the List

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

Page 136 of 205

SAP BW

Figure 3.9: DATAFL field from the S Table

Patni Internal

Page 137 of 205

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.

BI Administration Cockpit purpose:


Simplifies BI specific administrative task and providing rich
information about all kinds of performance and about status of
operational task.
Supports BI administrators in status monitoring and performance
optimizing
A central point of access to status and statistical information to
provide an overview of objects and processes in BI systems.
Patni Internal

Page 138 of 205

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:

BI Administration Cockpit Scope


Support the BI administrator in:
Status tracking (Including context specific)
Performance optimization
Data quality controlling
Strategic administration
Drill Down to details
Patni Internal

Page 139 of 205

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.

Overview of Process Chains


Definition

A process chain is a sequence of processes that wait in the background for


an event. Some of these processes trigger a separate event that can start
other processes in turn.

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.

8.1.3. Data Load Cycle

Patni Internal

Page 140 of 205

SAP BW

Figure 1.1: Typical Data Load Cycle for Process Chain

8.1.4. Types of Process Chains

8.2.

Local Chain: This is the simple process chain.


Meta Chain: This is the main chain which contains one or more local
chains
Remote Chain: This is the process chain which is in some other
system than in BW

Structure of Process Chains

A process chain consists of a start process, individual application processes


and the so-called collection processes.
The start of the process chain is defined with the start process. All other
chain processes are scheduled to wait for an event.
The application processes are the actual processes. BW supports process
types of the following categories:

Load process and post processing processes


Data target administration processes,
Other BW processes
ABAP Program
Patni Internal

Page 141 of 205

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:

Easy creation of process chains via drag & drop


Creation of items

Figure 1.2: Transaction RSPC Process Chain Maintenance


Patni Internal

Page 142 of 205

SAP BW

8.2.1. Collector Processes

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.

8.2.2. Application processes

Application processes represent BW activities that are typically


performed as part of BW operations. Examples include:
Data Load
HACR
Aggregate Rollup
Reporting Agent Settings
Other special types of application processes are:
Start Variant a process that exists to trigger process chain
execution (It is part of every process chain)
ABAP program
Another process chain
Remote process chain
Operating system command
Customer built processes

Patni Internal

Page 143 of 205

SAP BW

8.2.3. Start Variant

Figure 1.3: Start variant configuration

The start variant can be used by just one process chain


Start variant helps in specifying the condition for the start of the
process chain

9 Generic R/3 Data Extraction


In this chapter we will see how to use generic R/3 data extraction
capability. Generic R/3 data extraction allows us to extract virtually any
R/3 data. In other words, Generic data extraction is a function in Business
Content that supports the creation of DataSources based on DB tables,
views or InfoSet queries.
In this chapter we will discuss how to load the appropriate R/3 data into the
new material characteristic ZMATERIAL. Its master data will be extracted
from MARA.
Fields

Data Type Length Decimal


Places
MANDT CLNT
3
0
Patni Internal

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

Table 8.1: MARA fields for ZMATERIAL Master Data

Fields

Data Type Length Decimal


Places
MANDT CLNT
3
0
SPRAS LANG
1
0
MATNR CHAR
18
0
MAKTX CHAR
40
0

Short Text
Client
Language Key
Material Number
Material Description

Table 8.2: MARA fields for ZMATERIAL Text

9.1.

Creating Views in R/3

First we need to create two views: ZMARA_ATTR Master data and


ZMARA_TEXT for texts.
To create a view for the master data, run the transaction SE11, enter a
name for the object, select the views option in the Dictionary objects
block, and then click

Figure 8.1: ABAP Dictionary: Initial Screen


Patni Internal

Page 145 of 205

SAP BW

Select the Database view option and then click

Figure 8.2: Choose View Type

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.

Figure 8.3: Maintain View

Then save, check and activate the view.


Similarly, you create ZMARA_TEXT. Refer to table 8.2 for fields.

Patni Internal

Page 146 of 205

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.

Creating DataSources in R/3.

Run transaction SBIW and click Maintain Generic DataSources, or you may
run transaction RSO2.

Figure 8.4: Maintain Generic DataSource

You select
is displayed

in the above screen. The next screen

Patni Internal

Page 147 of 205

SAP BW

Figure 8.5: Create DataSource

Patni Internal

Page 148 of 205

SAP BW
You enter a name ZMARA_ATTR as the name of the DataSource and then
click

. The next screen is displayed. Enter all the details in this


screen.

Figure 8.6: Save DataSource

the DataSource ZMARA_ATTR as local object. On saving a new


Save
window is displayed, check Material Number and click
the DataSource.

Patni Internal

Page 149 of 205

SAP BW

Figure 8.7: DataSource : Edit

Patni Internal

Page 150 of 205

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

Similarly, you create ZMARA_TEXT DataSource.


Once you have created ZMARA_ATTR and ZMARA_TEXT DataSources, the
next step is to replicate these DataSources in the SAP-BW, so that identical
structures of the DataSources are created in BW system.
Next step is to logon to SAP-BW system. Go to Modeling->Source System and
right click D47 Client 107 and select Replicate DataSources. As in the figure

Figure 8.8: Replicate DataSources

Upon Replicating DataSources, double click on D47 Client 107 another


window is displayed as shown in the figure.

Patni Internal

Page 151 of 205

SAP BW

Figure 8.9: DataSource is replicated

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.

Loading Data from R/3 into BW

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

Page 152 of 205

SAP BW

10
10.1.

Logistics Cockpit

What is Logistic Cockpit (LC)?

The Logistics Customizing Cockpit is the central administration tool for


extract structures. You use it to transfer Logistics transaction data from the
OLTP system into the BW system. The extract structures are filled by the
R/3 communication structures of the individual Logistics applications. Its a
new technique to extract logistics information and consists of a series of a
standard extract structures (that is, from a more BW perspective, standard
datasources), delivered in the business content
For extracting logistic transactional data from R/3, a new generation of
datasources and extractors, no longer based on LIS (Logistic Information
System) information structures, was developed starting from BW Release
2.0B and PI 2000.1 or PI-A 2000.1 (valid from R/3-Release 4.0B ).
The tools for the logistics extract structures can be found in the IMG for BW
(transaction SBIW (see Fig.1. below)): access into your OLTP system, choose
Customer-Defined DataSources -> Logistics -> Managing Extract Structures.
The Cockpit contains the following functions:

Maintaining extract structures

Maintaining DataSources

Activating updates

Controlling updates

Patni Internal

Page 153 of 205

SAP BW

10.2.

Logistic Cockpit Functions

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

Page 154 of 205

SAP BW

Fig.2: LC Delta Process for Sales Order Schedule Lines


2LIS_11_VASCL is the standard LC datasource to extract order schedule
lines related information. MC11VA0SCL represents its linked extract
structure. Remember that its possible to enhance that, but you cant
create new extract structures (on the same standard datasource). Within
LC (LBWE) (see Fig.3) a tool is provided that enables you to add fields
from the LIS communication structures (to the extract structure) without
having to do any modifications.

Fig.3: Logistic Cockpit customizing screen

Patni Internal

Page 155 of 205

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.

Fig.4: Maintenance screen


Its enough to highlight the row and click on the left-arrow: (every)
selected field is included automatically in a generated append structure
for the corresponding include structure of the extract structure When
you successfully complete this step, the traffic light icon turns red. This
indicates that you changed the structure.
At this point, you have to generate the datasource (see Fig.6): here you
can (among the other things) choose fields that can be selected .For
various reasons, it is not possible to offer all the fields contained in the
LIS communication structure for selection in the extract structure; these
fields are hidden It is also possible that a key figure is inverted (refer to
OSS Note 382779 Cancellation field in the datasource maintenance for
details).
After maintenance in this step, the traffic light turns yellow.

Patni Internal

Page 156 of 205

SAP BW

Fig.5: Datasource generation


Once you activate the update, data is written to the extract structure
and the traffic light then turns green. Our enhancement process is
completed and now you can schedule (if required by your delta method)
the delta job control process. i.e. select the job control process given
below and schedule the job providing the start date and print parameters
at the required frequency (see Fig.6)
In fact, scheduling timing process is very important and it should be
based on the basis of
1) The amount of activities on a particular OLTP system and on
E.g. A development system with a relatively low/medium of
new/modified/deleted documents may only need to run the V3 update
(explained later) on a weekly/daily basis. Instead, a full production
environment, with really many thousands of transactions everyday, may
have to be updated hourly; otherwise postings will queue and can affect
performance heavily.
2) The particular requirements related to the updating needs of data
displayed in BW reports.
e.g. If the reporting timing refers to a monthly periodic view,
successfully monthly scheduling the V3 update will ensure that all the
necessary information structures are properly updated when new or
existing documents are processed in the meanwhile.
Patni Internal

Page 157 of 205

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.

Fig.6: Scheduling the control job


One the job gets scheduled the records get pulled into the delta queue
(RSA7) in the OLTP system . This will be the source for delta requests
emerging from the corresponding BW system.

Fig.7: Delta Queue

Patni Internal

Page 158 of 205

SAP BW

11

Reporting and Analysis

11.1.SAP BW Business Explorer


The Business Explorer (BEx) is a SAP BW component that provides flexible
reporting and analysis tools that you can use for strategic analysis and
supporting the decision-making process in your organization. These tools
include querying, reporting and OLAP functions. The BEx enables a broad
range of users to access SAP BW information: Using the Enterprise Portal,
Intranet/Internet {Web Application Design) or using mobile end devices WAP
or I-mode enabled mobile telephones, and personal digital assistants).
The following is an overview of BEx functional areas:

Figure 9.1: BEx Functional Areas

11.1.1. Query, Reporting, and Analysis


The data basis of SAP BW is divided into self-contained business data targets
(InfoProviders). You analyze the data basis of SAP BW by defining queries
for data targets in the BEx Query Designer. You can determine the way in
which the data from your chosen data target is analyzed by selecting and
combining characteristics and key figures or reusable structures in a query.
Data analysis based on multi-dimensional data sources (OLAP reporting)
allows you to analyze more than one dimension of an InfoProvider (for
example, time, place, and product) at the same time. This means that you
can make any number of variance analyses (plan/ actual comparison and
business year comparison). The data, which is displayed in the form of a
pivot table, serves as the starting point for a detailed analysis, used to
answer a myriad of questions. Numerous interaction options such as sorting,
filtering, swapping characteristics, recalculating values, and so on, allow
you to flexibly navigate in the data at run time. You can also visualize the
data in graphics (bar charts or pie charts, for example). You can also
evaluate data geographically (for characteristics such as customer, sales
Patni Internal

Page 159 of 205

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.

11.1.2. Web Application Design


Web Application Design allows you to implement generic OLAP navigation in
Web applications and in Business Intelligence cockpits for both simple and
highly individual scenarios. These scenarios can be created using customerdefined interface elements using standard markup languages and Web
design APIs. Web Application Design encompasses a wide spectrum of
interactive Web-based Business Intelligence scenarios that you can modify
to suit your requirements using standard Web technology.
You can use the BEx Web Application Designer, the desktop application for
creating Web applications, to generate HTML pages that contain SAP BW
specific content such as various tables, charts or maps. You can have the
Web applications as URLs and access them from the Internet, Intranet, or
mobile devices. You can also save Web applications as iViews and integrate
them into an Enterprise Portal.
An assistant, the Web application wizard, has been integrated into the Web
Application Designer to support you when creating Web applications. It uses
an automatic step-by-step procedure and a simplified design process.

11.1.3. Formatted reporting


The integration of Crystal reports into SAP BW enhances the BEx functional
area by allowing you to create formatted reports. Formatted reports mainly
involve pixel-precise layout design and user-friendly printing options.

11.1.4. Mobile intelligence


You can use BEx Mobile Intelligence to call up the Web applications you
have created with the Web Application Designer. You can even do this when
away from your desk. The following devices are supported:

Patni Internal

Page 160 of 205

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)

11.2.Working with BEx


Using the SAP BW reporting functions, you can evaluate a dataset from an
InfoProvider according to various characteristics and key figures. To do this,
you define a query for your chosen InfoProvider in the BEx Query Designer.
You have various options for calling up the Query Designer:
. From the BEx Analyzer open dialog box
. As a separate program using Start Programs Business Explorer
Query Designer
. Using the Web Application Designer (see the BEx Web Application
Designer unit)
. With Crystal Reports

11.2.1. Functions of the BEx Query Designer


The following graphic gives an overview of the BEx Query Designer functions
that you can call from the Query Designer toolbar. The functions are
described within the context of query definition.

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

Page 161 of 205

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.

Condition: You use this function to define conditions for a query.


Note: For each characteristic, you can give limit conditions to the key figure
values, in order to determine, for example, all sales revenues above or
below a specified threshold value. The chosen characteristics are displayed
in the query with restricted key figures. Using the small arrow next to the
conditions symbol, you can change or create conditions.
Define Cells: This function is only available for queries with two
structures. You can define formulas and selection conditions for cells
explicitly. In this way, you control the values of cells that appear at the
intersections of structural components. This function enables you to access
individual cells in queries or to assign special values to these.
Query Properties: Choose this function if you want to change the
description of the query or define the settings for the result position,
display options, numeric display, zero display, and key date of the query.

Patni Internal

Page 162 of 205

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.

11.2.2. Creating a Query

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

Page 163 of 205

SAP BW

Figure 9.2: New Query: Select InfoProvider

Once you have selected the InfoProvider, the Query Designer is displayed as
shown in the following graphic.

Patni Internal

Page 164 of 205

SAP BW

Figure 9.3: Query Designer : New Query

The Query Designer is divided into six sub areas:


1. Directory tree of the selected InfoProvider.
Once you have selected the required InfoProvider, all available objects
(dimensions, key figures, structures) are display in the directory tree in the
left screen area of the Query Designer.
2. Columns
You define the columns of your report in this area.
3. Rows
You define the rows of your report in this area.
4. Free Characteristics
You transfer those characteristics into the free characteristics areas that
are not displayed in the first instance when you execute the query in the
BEx Analyzer or one the Web. You can then integrate these characteristics
through navigation steps. You can also use free characteristics for selecting
filter values in the report.

Patni Internal

Page 165 of 205

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.

Figure 9.4: 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

Page 166 of 205

SAP BW
query (in your roles, favorites). You can use Save Query As... to save
existing queries under a different name.

Figure 9.5: Save Query

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

Page 167 of 205

SAP BW

Figure 9.6: A Report in BEx Analyzer

11.3.1. Navigation within BEx Analyzer


The context menus available at various cells allow you perform operations
like Sort, Filter, Drill Down, Drill Across, and Remove Drill Down etc. that
help to analyze the data. The characteristics can be displayed as only Key,
or only Name, or both. You may use short or long descriptions for the
characteristics. The analyzer allows you to navigate back once you perform
such operations.
IF you do not want to display the values for a characteristic choose Remove
Drilldown from context menu for that characteristic in the filter area.
Drill Across option allows you to display the values of a characteristic in
columns.

11.3.2. Saving query as a workbook


You may save the generated report as a workbook using either of the
following options
Click on the Save button
and then choose Save as new workbook
Choose the menu path, Business Explorer Save Save as new workbook
Patni Internal

Page 168 of 205

SAP BW

Workbooks are used if we require more formatting options and need to


perform complex calculations (E.g. Using VBA Micros etc).

11.3.3. Changing the query


Depending on your current position in the Query Designer or Analyzer, you
have different options for changing a query:
If you have called the Query Designer, in the SAP BEx Query: Choose Query,
select a query.
You have two options for changing the query definition from a report in the
Analyzer:
Choose Change Query (Global Definition) : By doing this, you can change
the query definition.
Choose Change Query (Local View): Changes made to the query here
correspond to navigation in the report and are not saved in the query
definition.

11.3.4. Filtering Data in the Query Definition

It is often necessary to restrict (filter) characteristics to specific


characteristic values in your reports. For example, if you are interested in
the sales volume of a particular branch of a world-wide corporate group,
but the InfoProvider contains the sales volume for the entire organization,
you can restrict the query definition to the relevant branch, so that only the
key figure for this branch appear in the report.
You can restrict (filter) the characteristic values of a characteristic in the
Rows, Columns, Free characteristics, and in the Filter.
There are two ways of restricting characteristics:
By selecting a characteristic from the InfoProvider of the characteristic
(in the tree structure in the left part of the screen) and double-clicking
on the values icon, the selection menu for fixed values is displayed. You
can select single values or values from a value area. The fixed values
selected appear in the directory tree under Values. You can use Drag &
Drop to include these in your query definition.
You can also restrict a characteristic that you have already included in
the definition. Call the context menu for the characteristic and choose
Restrict. The Selection for ... dialog box appears. The following graphic
shows the selection dialog box for the Material characteristic.

Patni Internal

Page 169 of 205

SAP BW

Figure 9.7: Filtering data

A restriction on a free characteristic affects the entire query, even if the


free characteristic is not in the drilldown.
Characteristics in the global filter appear neither in the drilldown nor as
free characteristics in the analysis. You cannot navigate in the analysis
using the characteristic values in the filter. These characteristics are only
used to filter the data from the InfoProvider.

11.3.5. Including Text Elements in BEx Analyzer Reports


You have the option of displaying different text elements as additional
information in a query (for example, the author, last changed by,
InfoProvider, etc.). These text elements are referred to as the header
information of the query.
. Choose Layout and Display Text Elements.
. You can either display all or individual (General, Filters, Variables) text
elements. The text elements are displayed between the filter area and the
results area. You can move or delete individual text elements by moving or
deleting the corresponding cells in Microsoft Excel.

Author: User who defined the query.


Last Changed by: User who last changed the query definition. Navigation
steps are not recorded as changes to the definition.
InfoProvider: InfoProvider whose data is evaluated in the query.

Patni Internal

Page 170 of 205

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.

11.3.6. Properties of Key Figures

The various components of a query have specific properties that reproduce


important functions. You call the properties dialog box from the context
menu for the key figure for which you want to define properties, by
selecting Properties.
In the Properties of the Selection/Form dialog box for a structure part, you
can set a range of functions.

Patni Internal

Page 171 of 205

SAP BW

Figure 9.8: Properties of Key Figure

Description: You can change the automatically determined key figure


description here (basic key figure, restricted key figure, calculated key
figure) here.
Technical name
Display: You can assign a unique technical name to structure parts such
as key figures. This is optional. You can choose whether the key figure is
to be highlighted in the report here. You can hide key figures that you
only need for calculating formulas, and do not want to display in the
analysis. You can also mark as selection as constant so that this selection
can no longer be changed by navigation and filter at runtime.
Number Display: You can set the scaling factor in the Number Format
area. Caution: The scaling factor is not automatically displayed in the
report. You have to set the scaling factor display separately in the query
properties. You can define the number of decimal places here and
Patni Internal

Page 172 of 205

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.

11.3.7. Properties of Characteristics


The various components of a query have specific properties that reproduce
important functions. You call the properties dialog box from the context
menu for the characteristic for which you want to define properties, by
selecting Properties.
In the Characteristic Properties dialog box, you can make settings for a
range of functions that affect the key figures for this characteristic in the
query drilldown.

Figure 9.9: Properties for a Characteristic

Patni Internal

Page 173 of 205

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.

Cumulative: This function aggregates the values of the characteristic


values (the nth value is aggregated with the n+1 value).

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.

Display Hierarchy: You can display the characteristic hierarchically. You


make the necessary settings for this here.

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

Page 174 of 205

SAP BW

You can show Display Attributes in a report in the drilldown. However,


navigation steps are not possible. (For example, you cannot choose values
from a display attribute as a filter.) To include a display attribute in the
drilldown, open the index for the characteristic. Once in the Attributes
index, drag the required attribute into the query definition.
To select a display attribute of a characteristic that is already in the query
definition, from the context menu of the characteristic, choose Attributes.
In the Attribute Properties for a specific attribute for a characteristic, you
can set the display functions as key, name, and so on.
You can use Navigation Attributes for defining queries in reporting in the
same way as characteristics. They are displayed in the dimension of the
characteristic to which they belong.
In order to use an attribute as a navigation attribute, note the following:
1. You have to flag the attribute as a navigation attribute in the InfoObject
maintenance of the characteristic.
2. You have to select that attribute from the list of possible navigation
attributes in the InfoObject maintenance.
Note the following when using navigation attributes:
. Time-dependency of the navigation attribute
Navigational attributes enable you to view current data with characteristic
values from the past or view past data with current characteristic values.
. Navigation attributes used as characteristics.
. Slight loss in performance in comparison with using characteristics.

11.4.Restricted Key Figures


Restricted key figures are (basic) key figures of the InfoProvider that are
restricted (filtered) by one or more characteristic selections. The key figure
that is restricted by one or more characteristic selections can be a basic key
figure, a calculated key figure, or a key figure that is already restricted. By
using restricted key figures, you can focus the query result on certain
values. Unlike a filter, whose restrictions are valid for the entire query, for
a restricted key figure, only the key figure in question is restricted to its
allocated characteristic value or characteristic value interval. Scenarios
such as comparing a particular key figure for various time segments, or
plan/actual comparison for a key figure if the plan data is stored using a
particular characteristic, can be realized using restricted key figures.

11.4.1. Defining Restricted Key Figures


You can create restricted key figures at InfoProvider level, or locally in the
query definition. Restricted key figures that are defined at InfoProvider
level are available in every query definition of the InfoProvider in question.
Patni Internal

Page 175 of 205

SAP BW

1. To define a restricted key figure at InfoProvider level, from the Query


Designer choose Restricted Key Figure in the context menu on the lefthand side under Key Figure.
To define a restricted key figure at query level, use Drag &Drop to drag
the key figure to be restricted into a Query Designer directory. In the
context menu, choose Edit, or select the heading of the Rows or
Columns directory and use the secondary mouse button to choose New
Structure. Select the structure directory and use the secondary mouse
button to choose New Selection from the context menu. The New
Selection dialog box appears.
2. Enter a description of the restricted key figure into the text field.
3. If another key figure was selected, use Drag & Drop to choose the key
figure of the InfoProvider, and place it on the right-hand side of the
Selection window
4. Use Drag &Drop to move the characteristic whose characteristic value
you want to use to restrict the key figure to the right-hand side of the
Selection window.
5. From the context menu of the characteristic, choose Restrict.
6. Select the characteristic values you require for the restriction.
7. Confirm your entries by choosing OK.
8. For the definition at InfoProvider level, you enter a technical name in
the dialog box, and confirm your entry by choosing OK. The newly
defined key figure can be found in the Restricted Key Figures directory.
In the case of definition at query level, the new restricted key figure is
already part of the structure.

11.4.2. Selection Conditions for the Selection of Filter Values

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

Page 176 of 205

SAP BW

Figure 9.10: Defining a Restricted Key Figure

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.

Figure 9.11: A Report with a Restricted Key Figure

Patni Internal

Page 177 of 205

SAP BW

11.5.Calculated Key Figures


In the Query Designer, you can use a formula to calculate key figures that
are not in the InfoProvider by using basic key figures, restricted key figures,
and existing calculated key figures in the formula definition.

Defining Calculated Key Figures

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.

11.5.1. Defining Calculated Key Figures at InfoProvider Level

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

Page 178 of 205

SAP BW

Figure 9.12: Defining a Calculated Key Figure

The following snapshot of a report shows the use of the calculated key
figure defined above.

Figure 9.13: A Report with a Calculated Key Figure

Patni Internal

Page 179 of 205

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

Page 180 of 205

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

Page 181 of 205

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

Page 182 of 205

SAP BW

The Variable Wizard


The variable wizard takes you through a step-by-step process for defining a
new variable.
Introduction
The first dialog step in the variable wizard explains that instead of defining
fixed values for your query, you can define variables as placeholders that
are then filled with values at runtime. If you do not want to display this
step in the future, put a check in the Do not display this step in future box.
General Information
The type of variable is shown in the second dialog step. You determine the
variable type by calling up the variable wizard in a specific context.
Context-Sensitive Entries
The following appear differently, according to context:
Details
Default Values
Replacement Path
Characteristic
Currencies and Units
Patni Internal

Page 183 of 205

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

Page 184 of 205

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

Page 185 of 205

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

Page 186 of 205

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.

Selecting Variable Offsets


This function is only available for characteristic value variables of the type
single value or interval.
1. Select the relevant variable from the right Selection window.
2. Using the right mouse button, call the context menu and choose Specify
Variable Offsets.
3. In the Variable Offset dialog box, enter the required variable offset.
When using value ranges, specify the variable offset 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

Page 187 of 205

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.

Figure 91: Defining Exceptions in the Query Designer

Patni Internal

Page 188 of 205

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.

11.9.1. Exception Values

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

Page 189 of 205

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

Page 190 of 205

SAP BW

Figure x.x : A report with an Exception applied

11.9.2. Changing and Deleting Exceptions

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

Page 191 of 205

SAP BW

11.10.

Conditions

Sometimes it is desired to flexibly restrict a report so that only the most


important information is displayed. This should enable a more efficient
analysis of data when large amounts of data are analyzed. This is achieved
using conditions.
By defining you have the option of analyzing the query results in more
detail. You can analyze combinations of characteristics using ranked lists,
thereby displaying your ten best customers by sales revenue, for example.
By defining value limits you can display all key figure values above or below
a certain value. The data is restricted accordingly in the results area of the
query, so that you only see the area that interests you. You can define
multiple conditions for a query, and then activate or deactivate them in the
report itself to create different views of the data.

11.10.1. Defining Conditions


You can make restrictions in the Query Designer, using Condition. As a
prerequisite, you have to have created a query definition for which one or
more conditions can be defined.
In the dialog box that appears, you specify a meaningful Description and set
the condition to Active. If the condition has the status Active, it is used in
the report as soon as you execute the query. If you do not set the active
flag, you can activate the condition in the report itself. In the BEx Analyzer,
from the BW toolbar Layout Display Conditions you also have the option of
adding an additional line between the filter and results areas for each
condition and activating or deactivating the condition from there. There is
an item for Web applications that you can integrate into your template for
the same purpose.
You can set conditions for all characteristics, single characteristics and
characteristic combinations in the report drilldown, that is, in the results
area in the BEx Analyzer or in the table item.
Hint: If you restrict conditions for a report to Single Characteristic or
Combinations of Characteristics, you have to ensure that the characteristic
or the combination of characteristics is integrated into the report drilldown
for the restrictions defined to take effect.

Patni Internal

Page 192 of 205

SAP BW

Figure 97: Defining a Condition

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

Page 193 of 205

SAP BW

Greater than or equal to - Example: Incoming orders greater than or


equal to 1,000,000 EUR
Between - Example: Sales from/to, with the option of defining these
values using a variable request
Not Between - Example: Sales from/to excluded from display, with the
option of defining these values flexibly at runtime.

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

Page 194 of 205

SAP BW

Figure x.x : A report with a condition applied.

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.

11.10.4. Using Several Conditions in a Report

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

Page 195 of 205

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.

11.10.5. Changing and Deleting Conditions


To change existing conditions, in the Query Designer choose Condition
Change Condition. The Selection dialog box appears. Highlight the required
condition and confirm with OK. In the Define Condition dialog box, you can
add new conditions to the list, or highlight existing conditions to change or
delete them.
You can also delete conditions from the Selection dialog box by highlighting
the relevant conditions and choosing Delete to remove it from the list.
If you execute your report on the Web, you can create, change, activate
and deactivate conditions using the List of Conditions Web item. You can
delete a condition using the context menu only if you created the condition
in the Web application itself.

Patni Internal

Page 196 of 205

SAP BW

12

BEx Web Application Designer

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

Web Items Screen Area (1)


Web Template Screen Area (2)
Errors and Warnings Screen Area (3)
Properties Screen Area (4)
Patni Internal

Page 197 of 205

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

Page 198 of 205

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:

Data Provider Information


Text
Link
List of Exceptions
List of Conditions
Menu Bar
Properties Pane
Ticker
Context Menu
Script

Web Template Screen Area


The Web Template window contains the Web templates that you edit in the
design process and that form the basis of your Web applications.
Structure
In the upper section of the Web Template screen area, there are three tab
pages you can use to change the view of the Web template in the same
way that you do in an HTML editor.

Layout tab page


In the layout view, you have a visual focus and specify the layout of the
Web application. To do this, you use drag and drop to insert Web items
from the pool of Web items into your Web template. For more
information about other options and procedures for the layout of Web
templates, see Layout Design of Web Templates and Context Menu in
Web Templates.

Patni Internal

Page 199 of 205

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.

XHTML tab page


The XHTML view displays the XHTML that corresponds to the layout view.
Each element of the XHTML syntax has a different color.

Overview tab page


On the Overview tab page, all Web items, data providers, and commands
used in Web templates are listed. By selecting or deselecting
checkboxes, you specify which of these objects is listed. The objects are
listed vertically in the Web Item Name column. In the horizontal
alignment of the table, any data providers and reusable Web items
associated with the object listed are displayed. Using Sort Order, you
can specify how the used objects are to be listed:
o

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.

Web Template (Hierarchical)

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

Page 200 of 205

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.

Tab Page: Web Item Parameter

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.

Errors and Warnings Screen Area


The Errors and Warnings screen area is used to display errors and warnings
that are found when a Web template is being verified.
Integration
The errors and warnings that are displayed in this screen area refer to the
following possible checks of the Web template.
Verify
This check is performed automatically and by default every two
seconds. Within the verification, the internal structure of the Web
template is checked. You can change the refresh time for the
verification in the menu bar under Tools Settings.

Verification on the server


With this verification, which you trigger manually, additional
conditions for creating a correct Web template are checked on the
server side. Here for example, the system verifies whether a query
that is being used as a data provider exists. To trigger the
verification, on the menu bar for the Web Application Designer,
choose Web Template Verify on Server

Correct and format


During this verification, which you can trigger manually, the internal
structure of the HTML is checked. You can only trigger this
verification when you are in the XHTML view. From the Web
Application Designer menu bar, choose Edit Correct and Format.

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

Page 201 of 205

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

Page 202 of 205

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

Page 203 of 205

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.

12.3.Sample Web Dashboards

Patni Internal

Page 204 of 205

SAP BW

Sample Web Dashboard is as shown below:

Retail Price by Channel - AS

Web Report in Portal is as shown below:

Patni Internal

Page 205 of 205

Você também pode gostar