SAP BI Data Modeling
SAP BI Data Modeling
Author:
Saravanakumar Krishnamoorthy
(saravana.krishnamoorthy@wipro.com)
April 2010
SAP BI Data Modeling
Introduction
Create a simple BI data model with InfoObjects (characteristics, key figures) and an
InfoCube for storing data in the BI system.
In our scenario, the "container" for the revenue data is an InfoCube. It consists of key
figures and characteristics. The key figures provide the transaction data to be analyzed,
in our case sales figures and amounts. The characteristics are the reference objects for
the key figures; in our scenario these are Product, Product Group and Channel. They
contain the master data, which remains unchanged over a long period of time. The
master data of the characteristics in this scenario can be attributes and texts.
We create the data model in the following steps:
Creating Key Figures
Creating Characteristics
Creating InfoCubes
Map the source structure of the data in the BI system and define the transformation of
the data from the source structure to the target format. In this way we will be able to
define the data flow in the BI system.
The structure and properties of the source data are represented in the BI system with
DataSources. In our scenario, we need DataSources to copy master data for the
characteristic Product as well as sales data from the relevant file to the entry layer of
the BI system.
The transformations define which fields of the DataSource are assigned to which
InfoObjects in the target and how the data is transformed during the load process
We create the necessary objects for defining the data flow in the following steps:
Creating DataSources for Master Data of Characteristic "Product
Creating DataSources for Transaction Data
Creating Transformations for Master Data from Characteristic Product
Creating Transformations for InfoCubes
The load processes are executed using InfoPackages and data transfer processes.
The InfoPackages load the data from the relevant file into the DataSource, and the data
transfer processes load the master data from the DataSource into the characteristic
Product or the transaction data into the InfoCube. When the data transfer process is
executed, the data is subject to the corresponding transformation. For the
characteristics Product Group and Channel, we show that it is also possible to load
small amounts of master data directly in the BI system instead of from the source. In
this case neither DataSources and transformations nor InfoPackages and data transfer
processes are required.
We create the necessary objects for loading data in the following steps:
Creating Master Data Directly in the System
Loading Master Data for Characteristic "Product"
Loading Transaction Data
SAP BI Data Modeling
Creating Key Figures
Steps to Create Key Figures:
...
1. Log onto the BI system with a user that has sufficient authorizations for executing the
scenario.
2. Start the Data Warehousing Workbench in the SAP menu by choosing Modeling ---->
Data Warehousing Workbench: Modeling.
Various functional areas are displayed at the left in the Data Warehousing Workbench.
In the functional area Modeling We can display different views on the objects used in
the Data Warehouse, such as InfoProviders and InfoObjects. These views show the
objects in a tree. We call the functions for the relevant object from context menus (right
mouse button).
3. Under Modeling, choose InfoObjects.
The InfoObject tree is displayed.
4. From the context menu at the root node InfoObjects of the InfoObject tree, choose
Create InfoArea.
5. On the next screen, enter a technical name and a description for the InfoArea.
The InfoArea is displayed in the InfoObject tree. It is used to group our InfoObjects.
6. In the context menu of the InfoArea, choose Create InfoObject Catalog.
7. On the next screen, enter a technical name and description, and select Key Figure as
the InfoObject Type.
8. Choose Create.
We go to the screen for InfoObject catalog editing.
SAP BI Data Modeling
9. Activate the InfoObject catalog.
The InfoObject catalog is displayed in our InfoArea. It is used to group our key
figures.
10. Perform the following procedures to create each of the key figures.
a. Choose Create InfoObject... in the InfoArea for our InfoObject catalog for key
figures.
b. Enter the required data on the next screen:
We can give our own technical name and description. The technical name should with Z.
c. Choose Continue.
d. The key figure maintenance screen appears. There we have to give data type and
currency type.
The information on the tab page is as follows for the key figure Revenue:
e. Activate the InfoObject.
f. These key figures are displayed in our InfoObject catalog.
SAP BI Data Modeling
Creating Characteristics
Steps to create Characteristics:
...
1. In the Modeling area of the Data Warehousing Workbench, choose InfoObjects.
2. In the context menu of our InfoArea, choose Create InfoObject Catalog.
3. On the next screen, enter a technical name and a description.
4. Select Char. as InfoObject Type.
5. Choose Create.
We go to the screen for InfoObject catalog editing.
6. Activate the InfoObject catalog.
The InfoObject catalog is displayed in our InfoArea. It is used to group our key
characteristics.
7. Perform the following procedure for the characteristics.
a. Choose Create InfoObject... in the InfoArea of our InfoObject catalog for
characteristics.
b. Enter the required data on the next screen:
We can give our own technical name and description. The technical name should with
Z.
c. Choose Continue.
d. The characteristic maintenance screen appears. There we have to give data type and
currency type.
The information on the tab page is as follows for the characteristic Product:
e. Go to the Master data/texts tab page.
i. Select with master data and with texts if they are not already selected.
ii. In the field below Character is InfoProvider, enter the technical name of
our InfoArea and confirm our entry.
The system sets the indicator Character. is InfoProvider.
iii. For the characteristic Product: Select the indicator Medium length text
exists and deselect Short text exists.
The information on the tab page is as follows for the characteristic Product:
SAP BI Data Modeling
For the characteristic Product: Go to the tab page Attribute.
iv. Add the following InfoObjects as attributes. Note the order:
1. ZD_PRGOUP - Product Group
2. 0CURRENCY - Currency Key (the currency key is a shipped
InfoObject of BI Content)
3. ZD_PRICE - Price
v. Activate the attribute Product Group (ZD_PRGROUP) by choosing
Navigation Attribute On/IOff as navigation attribute.
vi. Select the key figure Texts of char. for this attribute.
f. Activate the InfoObject.
e. These characteristics are displayed in our InfoObject catalog and can be used to
define the InfoCube.
The characteristic Product contains the display attributes Price and Currency and the
navigation attribute Product Group.
We will create the master data for characteristics Product Group and Channel directly in the
BI system later on. We will load the master data for characteristic Product into the BI system
later.
SAP BI Data Modeling
Creating InfoCubes
Steps to create Infocubes:
...
1. We are in the Modeling functional area of the Data Warehousing Workbench.
2. Choose InfoProvider.
The InfoProvider tree is displayed. The InfoArea created previously in the InfoObject
tree is also displayed in the InfoProvider tree. It contains the characteristics that were
defined as InfoProvider and is used to group further objects.
3. In the context menu of the InfoArea, choose Create InfoCube.
4. In the next screen, enter ZD_SALES as the technical name under InfoCube and Sales
Overview as the description.
5. Select Standard InfoCube as InfoProvider Type and choose Create.
We go to the screen for InfoCube editing.
6. Choose Create New Dimensions in the context menu of the folder Dimensions.
7. Enter Product as the description for the new dimension and choose Create Another
Dimension.
8. Enter Sales Organization as the description for the new dimension and choose
Continue.
The dimensions are inserted.
9. In the toolbar in the left area, choose InfoObject Catalog.
10. On the next screen, select our InfoObject catalog for characteristics as the template
and choose Continue.
The InfoObject catalog is displayed in the left area with the characteristics We created.
11. Assign the characteristics to the dimensions.
12. Choose InfoObject Direct Input in the context menu of the dimension Sales
Organization.
13. On the next screen, enter the characteristic 0DOC_NUMBER (Sales Document) and
choose Continue.
The characteristic Sales Document is a shipped InfoObject of BI Content.
14. Expand the folder Navigation Attributes. Activate the navigation attribute Product Group
(ZD_PROD__ZDPGROUP) by setting the indicator in column On/Off.
SAP BI Data Modeling
15. If it does not yet exist, add the following time characteristics of BI Content to the
dimension Time. To do this, choose of InfoObject Direct Input in the context menu of
the dimension Time, enter the required data, and choose Continue.
16. Choose of InfoObject Direct Input in the context menu of the folder Key Figures and
enter the following key figures which have been created earlier:
17. Delete Dimension1, which is not required, if it exists. To do so, choose Delete in the
context menu of the dimension.
18. Activate the InfoCube.
19. We created the InfoCube Sales Overview. We can now create the required objects for
loading data.
Creating DataSources for Master Data of
Characteristic "Product"
We create DataSources for Master Data of the characteristic Product. The DataSources are
required to copy the master data attributes (values) and texts for the characteristic Product from
the file to the BI system.
Steps to create DataSource for master Data:
Perform the following procedure for the attributes and texts for characteristic Product.
1. We are in the Modeling functional area of the Data Warehousing Workbench.
SAP BI Data Modeling
2. Choose DataSources.
3. From the toolbar in the right screen area, choose Choose Source System.
4. In the menu option File, select the source system with the technical name PC_FILE.
A hierarchical tree of the DataSources for this source system is displayed. The
DataSources are structured semantically by application component.
5. Select Create application component... from the context menu at the root node of the
DataSource tree.
6. On the next screen, enter a technical name and a description for the application
component.
The application component is used to group our DataSources for this scenario.
7. In the context menu of our application component, choose Create DataSource.
8. Enter the required data on the next screen.
Enter the technical name and description for the attributes and texts.
9. Choose Transfer.
The DataSource maintenance screen appears.
10. Enter the required data on the tab page General Info. and page Extraction
The information on the tab page is as follows for attributes:
SAP BI Data Modeling
The information on the tab page is as follows for texts:
12. Select the tab page Proposal and choose Load Examples.
13. Using the data in the file, the system creates a field proposal for the DataSource.
14. Go to the Fields tab page.
In the dialog box, choose Yes.
The field list of the DataSource is copied from the Proposal tab page.
15. Make the following changes and enhancements:
For the attribute:
i. Change the data type of the field PRICE from DEC to CURR and confirm our
entry.
ii. Under Curr/Unit enter CURRENCY for the referenced currency/unit field
For the texts:
i. Change the data type of the field LANGUAGE from CHAR to LANG and
confirm our entry.
ii. Select Language Field as the field type for the field LANGUAGE.
The field list for attributes is as follows:
SAP BI Data Modeling
The field list for texts is as follows:
16. Activate the DataSource.
17. Go to the tab page Preview and check the data before the actual load process by
choosing Read Preview Data.
18. We created the master data DataSources for characteristic Product. At activation, a table is
created for each DataSource in the entry layer of the BI system, the persistent staging area
(PSA), and the source data is stored there during the transfer.
Creating DataSources for Transaction Data
We create a transaction data DataSource to copy the sales data from the file to the BI
system.
Steps to create DataSource for Transaction Data:
1. In the Modeling area of the Data Warehousing Workbench, choose DataSources.
2. In the context menu of our application component, choose Create DataSource...
3. In the next screen, enter ZD_SALES for DataSource and select Transaction Data as
the Data Type DataSource.
4. Choose Transfer.
The DataSource maintenance screen appears.
5. On tab page General Info. enter Sales Data as Short description.
6. Go to the tab page Extraction and give the required information.
SAP BI Data Modeling
7. Go to tab page Proposal and choose Load Example Data to create a proposal for
the DataSource.
9. Go to the Fields tab page.
In the dialog box, choose Yes.
The field list of the DataSource is copied from the Proposal tab page.
10. Make the following changes and enhancements:
a. Change the data type for the following fields from CHAR to...
FIELD DATA TYPE
CALENDARDAY DATS
QUANTITY QUAN
UNIT UNIT
REVENUE CURR
CURRENCY CUKY
b. Under curr/unit, enter UNIT as the name of the referenced currency/unit field
for the field QUANTITY and CURRENCY for the field REVENUE.
c.Change the Format for the field REVENUE from internal to external.
11. Activate the DataSource.
12. Go to the tab page Preview and check the data before the actual load process by
SAP BI Data Modeling
choosing Read Preview Data.
13. We created the DataSource for the sales data. At activation, a table is created for the
DataSource in the entry layer of the BI system, the Persistent Staging Area (PSA), and the
data is stored there during the transfer.
Creating Transformations for Master Data of
Characteristic "Product"
We create transformations for the attributes and texts of characteristic Product (ZD_PROD).
Steps to create Transformations for Master data :..
1. We are in the Modeling functional area of the Data Warehousing Workbench.
2. Choose InfoProvider.
3. Choose Create Transformation... from the context menu at the symbol for texts
under our InfoObject Product (ZD_PROD).
4. Select object type DataSource as source of the transformation and select our
DataSource for texts ZD_PROD_TEXTS and source system PC_FILE.
5. Choose Create Transformation.
The maintenance screen for the transformation appears. The fields of the DataSource
are displayed at the left and the rule group with the target InfoObjects at the right.
6. With the mouse, connect the DataSource fields with the target InfoObjects as follows:
7. Activate our transformation.
8. Exit from the transformation maintenance screen.
9. Choose Create Transformation... from the context menu at the symbol for attributes
under our InfoObject Product (ZD_PROD).
10. Select object type DataSource as source of the transformation and select our
DataSource for attributes ZD_PROD_ATTRIBUTES and source system PC_FILE.
11. Choose Create Transformation.
The maintenance screen for the transformation appears.
12. With the mouse, connect the DataSource fields with the target InfoObjects
13. Activate our transformation.
14. We created the transformations for the master data for characteristic Product and have now
completed all preparation for creating and executing the load processes for the attributes and
texts of characteristic Product.
Creating Transformations for InfoCubes
Steps to create Transformations for Infocubes:
...
1. Go to the Data Warehousing Workbench; in the Modeling area choose InfoProvider.
2. In the context menu of our InfoCube, choose Create Transformation...
3. On the next screen, select object type DataSource as source of the transformation, and
select the DataSource for transaction data ZD_SALES and source system PC_FILE.
SAP BI Data Modeling
4. Choose Create Transformation.
The maintenance screen for the transformation appears. The fields of the DataSource
are displayed at the left and the rule group with the target InfoObjects at the right.
5. With the mouse, connect the DataSource fields with the target InfoObjects as follows:
Fields UNIT and CURRENCY are automatically assigned.
6. Activate our transformation.
7. We created the transformation for the sales data and have now completed all preparations
for creating and executing the load process for the sales data.
Creating Master Data Directly in the System
Steps to create Master Data:
1. In the Modeling area of the Data Warehousing Workbench, choose InfoObjects.
2. In the InfoObject catalog for characteristics, choose Maintain master data from the
context menu of our InfoObject Product Group (ZD_PGROUP).
3. Choose Execute.
4. Choose Create.
5. Enter DS10 as Product Group and Computer as the Short description and choose
Continue.
6. Repeat steps 4 and 5 with the following values:
PRODUCT GROUP DESCRIPTION
DS20 Accessories
DS30 Hardware
7. Save our entries and return to the InfoObject tree.
8. Repeat steps 2-7 for the characteristic Channel (ZD_CHAN) with the following values:
CHANNEL DESCRIPTION
1 Internet
2 Fax
3 Phone
4 Other
9. The following characteristics are filled with values.
Product Group (ZD_PGROUP)
Channel (ZD_CHAN) with values.
SAP BI Data Modeling
Loading Master Data for Characteristic
"Product"
We create InfoPackages for the characteristic Product and execute them in order to load the
master data attributes and texts from the file in the entry layer of the BI system into the
Persistent Staging Area (PSA). We create data transfer processes and execute them in order
to load the data from the PSA into the master data tables of the characteristic. The defined
transformations are executed at this time.
Steps to Load Master Data for Characteristics:
...
1. Go to the Data Warehousing Workbench; in the Modeling area choose InfoProvider.
The attributes and texts are displayed with transformation and DataSource in our
InfoArea below the characteristic Product.
2. Perform the following steps, first for the attributes of the characteristic and then for the
texts of the characteristic.
a. From the context menu of the DataSource, choose Create InfoPackage...
b. On the next screen, enter a description for the InfoPackage and choose
Save.
The InfoPackage maintenance screen for the scheduler appears.
c. Go to the tab page Schedule and choose Start.
d. To check the load process, choose Monitor in the toolbar of the InfoPackage
maintenance screen.
e. On the next screen, select the date and choose Execute.
The monitor for the load process is displayed.
f. Select the load process for our DataSource from the tree at the left of the
screen.
If we cannot find the load process directly, change the tree with Configure
Tree so that the DataSource and the data are displayed below the status. The
load process (request) is displayed below the date.
We can display the status of the individual process steps during the load
process on the tab page Details.
SAP BI Data Modeling
g. Exit from the InfoPackage maintenance screen.
h. From the context menu for the DataSource, choose Create Data Transfer
Process...
The system displays a generated description, the type, source and target of the
data transfer process.
i. Choose Continue.
j. The data transfer process maintenance screen appears.
k. On the Extraction tab page, select extraction mode Full.
l. Activate the data transfer process.
m. Select the tab page Execute and choose Execute.
n. Confirm the next dialog box.
The data transfer process monitor appears.
The monitor displays the status of the load process. We can display the status
of the individual process steps during the load process on the tab page Details.
If the status is yellow, refresh the status display for the load process with
Refresh Request.
SAP BI Data Modeling
3. We successfully loaded the data into the master data and text table of characteristic Product.
The data is now available for the analysis.
Loading Transaction Data
We create an InfoPackage and execute it in order to load the sales data from the file in the
entry layer of the BI system into the Persistent Staging Area (PSA). We create a data transfer
process and execute it in order to load the sales data from the PSA into the InfoCube Sales
Overview. The defined transformation is executed at this time.
Steps to Load Transaction Data:
1. Go to the Data Warehousing Workbench; in the Modeling area choose InfoProvider. The
transformation and the DataSource are displayed in the InfoArea below the
InfoCube Sales Overview.
2. In the context menu of the DataSource, choose Create InfoPackage...
3. On the next screen, enter a description for the InfoPackage and choose Save.
The InfoPackage maintenance screen for the scheduler appears.
4. Go to the tab page Schedule and choose Start.
SAP BI Data Modeling
5. To check the load process, choose Monitor in the toolbar of InfoPackage
maintenance.
6. On the next screen, select the date and choose Execute.
The monitor for the load process is displayed.
7. Select the load process for our DataSource from the tree at the left of the screen.
If we cannot find the load process, change the tree with Configure Tree so
that the DataSource and the data are displayed below the status. The load
process (request) is displayed below the date.
We can display the status of the individual process steps during the load process on
tab page Details.
8. Exit the InfoPackage maintenance screen.
9. From the context menu of the DataSource, choose Create Data Transfer Process....
The system displays a generated description, the type, source and target of the data
transfer process.
10. Choose Continue.
11. The data transfer process maintenance screen appears.
12. Go to tab page Extraction and select extraction mode Full.
13. Activate the data transfer process.
14. Go to tab page Execute and choose Execute.
SAP BI Data Modeling
15. Confirm the next dialog box.
The data transfer process monitor appears.
The monitor displays the status of the load process. We can display the status of the
individual process steps during the load process on tab page Details. If the status is
yellow, refresh the status display for the load process with Refresh Request
16. We successfully loaded the sales data into InfoCube Sales Overview. The data is now
available for the analysis.