41
Define Source System Source System is the system from where data is extracted and stored in data warehouse. Following are the steps to Define a Source System in SAP BW 1) Execute transaction RSA1 2) Select Source System as shown below and right click to create 3) Select Source System Type as shown below. In this example, we are creating a source system for a flat file. Using this, we can load a .csv file to an infocube Similarly, a SAP R/3 or SAP BW system can be defined as source system. Server id, system id, background user, clients are some of the information required to define SAP source system. 4) Enter a name and description for source system 5) Source system is created as shown

CUBE CREATION

Embed Size (px)

Citation preview

Page 1: CUBE CREATION

Define Source System Source System is the system from where data is extracted and stored in data warehouse.

Following are the steps to Define a Source System in SAP BW

1) Execute transaction RSA12) Select Source System as shown below and right click to create

3) Select Source System Type as shown below. In this example, we are creating a source system for a flat file. Using this, we can load a .csv file to an infocube

Similarly, a SAP R/3 or SAP BW system can be defined as source system. Server id, system id, background user, clients are some of the information required to define SAP source system.

4) Enter a name and description for source system

5) Source system is created as shown

Page 2: CUBE CREATION

Create Data Source in SAP Data Sources are extraction structure. Data Sources are used to extract data from various source system.

In the below steps, we will see how to create a data source using a SAP table VBAK.1) Execute transaction RSO2

2) Enter data source name to be created

3) Press Create

4) Enter description of the data source

5) Enter the name of table or view on which data source has to be created. Data Source can also be created using a View, Info set or a Function Module.

Page 4: CUBE CREATION

11) To check whether data is getting extracted, execute transaction RSA3

12) Enter the name of data source as shown below and press 'Extraction'

13) An information message will appear stating no. of records fetched

Page 5: CUBE CREATION

14) Additional button 'Display list' will appear, press button

15) Select one of the data packet and double click to get records fetched

16) Data Source is ready to be used!

Replicate Data Sources Once the data source is created in source system, this has to be replicated into data warehouse. This way data source will be available for BW to extract data.

1) Execute transaction RSA12) Select Source System3) Right click the source system where data source was created earlier

Page 6: CUBE CREATION

4) Select Replicate Data Sources

5) Status will appear at bottom-left with replication status as shown

6) Once replication is done, a status message will appear

Customize SAP R/3 for SAP BW

SAP R/3 (OLTP) system needs to be customized so that data can be extracted in SAP BW. To extract data, one needs to activate the standard business content. For each application (e.g. SD, MM, etc.), there are data sources for extracting Master and Transactional data.

1) Log on to SAP R/3 system2) Execute transaction SBIW3) Go to 'Business Content DataSources'4) Click 'Transfer Application Component Hierarchy'

Page 7: CUBE CREATION

5) In the confirm prompt: 'Do you want content application Transfer Component Hierarchy', press 'Yes'6) Confirmation message will appear realted to transfer component hierarchy7) Repeat step 2 & 3, click 'Business Content DataSources'

Data Sources are extraction structure. They have list of fields. They are classified as Master Data Sources and Transactional Data Sources. Master data sources are divided in Attributes, Texts and Hierarchies.8) Select the SAP Application Component, mark the data source and select Activate Data Source

Naming Convention in SAP BW SAP BW has a naming convention related to its objects.

SAP BW prefixes /BIO/ to the names of Business Content database objects. It prefixes /BIC/ to the database objects created by users.

If a user creates characteristics type info object ZPRODUCT and activates it, information will be stored in following:

Data element: /BIC/IOZPRODUCTSID table: /BIC/SZPRODUCTMaster data table: /BIC/PZPRODUCTText table: /BIC/TZPRODUCTView: /BIC/MZPRODUCT

When an info cube ZSALES is created and activated, information will be stored in following:

View Fact table: /BIC/VZSALESFTransparent Fact table: /BIC/FZSALESDimension tables: /BIC/DZSALES1 to /BIC/DZSALESN where N being no. of dimensions/BIC/DZSALESP, /BIC/DZSALEST, /BICDZALESU for Data Packet, Unit & Time (maximum 16 dimensions possible, 3 reserved for P, T & U)

If a hierarchy is used in an info object ZDATE, following tables will be created:

Hierarchy table: /BI0/HZDATEHierarchy SID table: /BI0/KZDATESID hierarchy structure: /BI0/IZDATEHierInterval table: /BI0/JZDATE

Common SAP BW Transactions

Page 8: CUBE CREATION

Following are most commonly used SAP BW Transactions

1) SBIW: Data Transfer to SAP BW2) RSA1: Admin Workbench Modelling3) RSZV: Maintain Variable for BEx Analyser4) RSSM: BW Authorization5) RSO2: Maintain Generic Data Sources6) RSA7: BW Delta Queue Maintenance7) RSA3: Data Extractor Check8) RSA5: Installation of Data Sources from Business Content9) LISTCUBE: To display content of Info Providers10) RSCUSTA: Set User ID for Source System Communication11) RSKC: Permitted Characters12) SNUM: Number ranges for Transfer Structure13) SM62: Define Event14) RSMO: Evaluation of Requests

General SAP Transactions:

1) SE11: ABAP Dictionary (Create, Change, Display Table, View, Data Elements, etc.)2) SE16: Data Browser for Table and View3) SU01: User Maintenance4) PFCG: Role Maintenance5) SPRO: Customizing6) SE80: Object Navigator7) SE93: To check transaction codes available8) STMS: Transport Management9) SE09: Transport Organiser

Customize SAP BW for SAP R/3 SAP BW system needs to be customized for SAP R/3 so that data can be smoothly extracted in SAP BW. Transfer of global setting, exchange rates, replication of data sources are common setting need to be done while setting up SAP BW system.

1) Create User ID for Source System Communicationa) Execute transaction SU01b) Create user ID RFCUSER, type SYSTEM with profile S_BI-WHM_RFC and S_BI-WX_RFC

2) Set User ID for Source System Communicationa) Transaction RSCUSTAb) Set “BW User ALE” as RFCUSER

Page 9: CUBE CREATION

3) R/3 Source Systema) Transaction RSA1b) Go to Source Systems and Create source system for R/3 and Replicate DataSources

4) Copying Global Settings from R/3a) Right-click R/3 Source System and choose Transfer Global settings

5) Copying Exchange Rates from R/3a) Right-click R/3 Source System and choose Transfer Exchange rates

6) Flat file Source Systema) Transaction RSA1b) Go to Source Systems and Create source system for Flat file

7) BW Source Systema) Transaction RSA1b) Go to Source Systems and Create source system for BW and Replicate DataSources

8) Maintain Source System IDa) Transaction RSA1

Page 10: CUBE CREATION

b) Menu Tools -> Asgnmt of Srce Syst to Srce Syst IDXBPCLNT100 -> BPXEPCLNT100 -> EPPCFLATFILE -> FT

9) Define source system mappingsa) Transaction RSA1b) Menu Tools -> Mapping of the Source System NamesXEDCLNT100 -> XEPCLNT100XBDCLNT100 -> XBPCLNT100

10) Permitted Charactersa) Transaction RSKCb) Maintain permitted characters

11) Activate BEx Historya) Transaction SPROb) Go to SAP NetWeaver -> SAP Business Information Warehouse -> Reporting-relevant Settings -> General Reporting Settings in Business Explorer -> Activate Personalization in BEx)c) Choose option “Activate BEx History” and Execute

12) Number ranges for Transfer Structurea) Transaction SNUMb) Enter object name “BI_TS” and Click on “Number Ranges”c) Choose “Change Intervals”d) Add new interval “01” (Not 1), from number “0000000001” to number “9999999999” Save and exit

13) Object Changeability Transaction RSA1a) Go to Transport Connection) Click on button “Object Changeability”b) Set the following objects as “Changeable Original”• ISIP – InfoPackage• RSPC – Process Chain• RSPT – Process Chain Starter• RSPV – Process Variants

Open Hub Service using SAP BW 3.5 Open Hub Service functionality in SAP BW is mainly used with InfoSpoke. InfoSpoke is an object for exporting data. InfoSpoke is defined using a data source (from which data is extracted), extraction mode and destination (where data will be stored).

In this section, we will see, how data is extracted from SAP BW InfoCube to a .csv file on a desktop.

Page 11: CUBE CREATION

1) Execute transaction RSA1, 'Tools' -> Open Hub Service -> Edit InfoSpoke

2) Enter name of InfoSpoke and press 'Create'

3) Enter short description and select the Data Source as 'InfoCube'

4) Select Extraction Mode as 'Full'

Page 12: CUBE CREATION

5) Go to 'Destination' tab, enter short description. In this example, we will be exporting data in a .csv file, select the 'File' and chose 'Directory'

6) Go to 'InfoObjects' tab, select the InfoObjects you would like to have in your exported file

Page 13: CUBE CREATION

7) Go to 'Selection' tab, enter if you want a particular selection criteria, in this example there is no selection used.

8) Activate the InfoSpoke by pressing 'Activate' button

9) After activation, source structure will appear as follows

Page 14: CUBE CREATION

10) Go back and display the InfoSpoke, press 'Dialog' button

11) Data will be exported to .csv file which will be stored at desktop

12) Go to InfoSpoke Monitor to check status of export

Page 15: CUBE CREATION

13) Data is exported as the monitor status is green

14) Check the exported file at desktop

Running a Query (BEx) for Data Extraction Data Warehouse is setup based on reporting requirements of business users. Hence, Reporting is a crucial functionality of any data warehousing solution.

SAP BW provides easy to use graphical functionality named Business Explorer (BEx) to create and execute queries to retrieve data from InfoProviders e.g. InfoCubes, Operational Data Store etc..

Business Users can directly execute the pre-defined queries whenever they want to get the information available in business warehouse.

We will see how to execute a already defined BEx query in this section.

Page 16: CUBE CREATION

1) Go to 'Start', select 'Business Explorer', select 'Analyzer'

2) Following bar will appear with Microsoft Excel

3) Open the query to be executed and press 'Refresh' button (3rd from left in the above bar)

4) Following window will appear with system to be connected, select the system (system details from the below screen are earsed)

5) Enter user id and password to connect to SAP system

Page 17: CUBE CREATION

6) Based on query definition, a selection window will appear (if defined), press execute button

7) System will display status bar for the query. Display report will look like this.

Operational Data Store (ODS) using SAP BW 3.5 ODS consists of 'Key fields' and 'Data fields'. Data fields can also contain characteristics e.g. customer, product etc..

ODS is not used for multi-dimensional analysis like Infocube. The data from ODS can be updated with delta update into a Infocube. The data in ODS is stored in a transparent table. There is no fact or dimensional table created for ODS.

Following are the steps to create an ODS:

1) Execute transaction RSA1, select the InfoArea under which you would like to create ODS. Right click the InfoArea, select 'Create ODS Object'

Page 18: CUBE CREATION

2) Enter ODS Object 'Name' and 'Description', press 'Create'

3) Check the box against 'BEx Reporting' to enable ODS for BEx reporting, press 'InfoObject Catalog' button to get the InfoObjects which you would like to add to ODS

4) Select the characteristics (InfoObjects) which you would like to add as 'Key fields' or 'Data fields', drag and drop the InfoObjects in respective folders as shown below.

Page 19: CUBE CREATION

5) You can also insert an InfoObject into to fields folders by right clicking the folder

6) Add '0CALMONTH' as 'Key field'

7) Add Key Figures as 'Data fields' as shown below, check and activate the ODS, system will display message related to ODS activation

8) Press 'Back', you can see ODS as shown

Page 20: CUBE CREATION

Now define InfoSources, Transfer Rules, Update Rules, Info Package as discussed in Infocube Creation Steps.

9) Below is the Extraction Structure created based on ODS

We will see more details about ODS in coming sections... thanks for your patience!

Infocube Creation Step 1 using SAP BW 3.5 Infocube uses concept of star schema. Infocube is created using Characteristics and Key Figures.

Characteristics are levels on which reporting has to be performed. For example, Product, Customer and Location

Key Figures are measures used for characteristics. For example, sales quantity for a product, customer and location combination

We will see how Infocube is created using Infocube creation step 1, 2 and 3.

Logon to SAP and Execute transaction RSA1

1) Create an Info Area

1a) Select the 'Info Provider' and right click

Page 21: CUBE CREATION

1b) In the next screen, give a technical name to Info Area with Description

2) Create an Info Object Catalog for Characteristics and Key Figures

2a) In the above image, at the left hand side, press 'Info Objects'2b) Locate the Info Area created in step 3 and right click2c) Select 'Create Info Object Catalog'

2d) In the next screen, give a name to Info Object Catalog and select 'Char.' and press create2e) Activate the Info Object Catalog for characteristics created in step 2d)2f) Create another Info Object Catalog for key figure by selecting 'Key Figure'

3) Create Info Objects as Characteristics and Key Figures3a) Select the Info Object Catalog for Characteristics and right click3b) Select Create Info Object, name the Info Object and select the data type3c) Activate the Info Object

Page 22: CUBE CREATION

3d) Similarly, select Info Object Catalog for Key Figure and right click

3e) Select Create Info Object, name the Info Object, Select data type and activate

Page 23: CUBE CREATION

4) Create an Info Cube4a) Select 'Info Provider' in the left hand section, locate the Info Area and right click to create Info Cube

4b) Give a name and description to the Info Cube and select as Basic Cube4c) Select the Info Objects as Characteristics by clicking the transfer button and press 'Dimensions' to define dimension

Page 24: CUBE CREATION

4d) Define Dimensions based on Characteristics

4e) Assign dimensions to characteristics, for assigning, select the characteristics check box and place cursor at dimension and press assign

4f) Select 0Calmonth and 0Calweek as time characteristics

Page 25: CUBE CREATION

4g) Select the required Key Figures and activate the cube

In the following section we will be discussing following:

5) Create Info Source6) Assign Info Source to Data Source7) Define Communication Structure and Transfer Rules8) Define Update Rules9) Define Info Pack10) Load data and check data in Info Cube

Infocube Creation Step 2 using SAP BI 7.0 Infocube uses concept of star schema. Infocube is created using Characteristics and Key Figures.

Characteristics are levels on which reporting has to be performed. For example, Product, Customer and Plant.

Key Figures are measures used for characteristics. For example, sales quantity for a product, customer and location combination.

In this section, we will see how to create InfoCube using SAP BI 7.0.

The InfoCube creation process is some what different and is similar to ODS creation process of SAP BW 3.5. Navigation is also different as screens opens with-in RSA1.

10) Select the InfoArea and right click, select 'Create InfoCube'

Page 26: CUBE CREATION

11) Enter name and description of the InfoCube and press 'Create'

12) The screen is very different from SAP BW 3.5, the screen is similar to ODS creation screen in SAP BW 3.5. There are folders available for Dimensions, Navigation Attributes and Key Figures

Right click 'Dimension 1' to assign a characteristics to Dimension 1

Page 27: CUBE CREATION

13) Enter the characteristics and press 'Continue'

14) To create new dimensions, right click 'Dimensions' folder and press 'Create New Dimensions'

Page 28: CUBE CREATION

15) Press 'Continue' button to create new dimension or press 'Create' to create more than one dimension at a time

16) Select 'Time' dimension and right click to add time characteristics '0CALMONTH'

Page 29: CUBE CREATION

17) Similarly, add Key Figure to 'Key Figure' folder by right clicking

18) Check the InfoCube for any inconsistencies and activate the InfoCube

19) InfoCube will be created as shown

In the next section we will see how to create Transformation between InfoCube and DataSource

Infocube Creation Step 3 using SAP BI 7.0 In this section, we will see how to create transformation.

20) Replicate the data source, select the source system, right click and select 'Replicate DataSources'

Page 31: CUBE CREATION

24) System will propose the mapping, incase system does not propose, select the InfoObject and drop for mapping

25) For 0CALMONTH, a constant will be used in this case, define the constant

26) After defining, press 'Transfer Values'

27) Check and activate the transformation

Page 32: CUBE CREATION

In the next section, we will see how to create Data Transfer Process and load data in InfoCube

Infocube Creation Step 4 using SAP BI 7.0 In this section, we will see how to define Data Transfer Process and load data in InfoCube using SAP BI 7.0. Data Transfer Process makes the transfer processes in the data warehousing layer more transparent.

28) Now define, Data Transfer Process as shown

29) Enter the source of DTP

30) Activate the DTP after maintaing the required settings

Page 35: CUBE CREATION

35) Check the data in InfoCube

Process Chain Creation using SAP BW 3.5 Process chains are used extensively in SAP Business Warehousing for executing loads, running reports etc. sequentially or parallel.

There can be number of steps with in a process chain. You can also decide what has to be done incase a particular step fails. In case of failure you can decide to sent notification email to concern person who can correct the issue.

In this section we will see how to create a process chain using SAP BW 3.5. Using this process chain we will load data in Infocube.

1) Execute transaction RSPC

2) Press 'Create', enter 'Name' and 'Description' of the process chain, press 'Continue'

Page 36: CUBE CREATION

3) First step in the process chain will be a 'Start' step, press 'Create' to create a process variants

4) Enter 'Name' and 'Description' of the process variant

5) 'Save' process variant and go back, 'Change selections' is used to schedule the process chain, we will revisit this again later

6) Press 'Continue'

7) Select the InfoPackage which is used to load data in Infocube, drag InfoPackage to right panel

8) Select the process variants as InfoPackage using fucntion key F4

Page 37: CUBE CREATION

9) Select the InfoPackage ZAAA and press 'Continue'

10) Following steps will be added in the process chain

11) Join 'Start' step with step 'Indexes' by selecting

'Start' step and dragging the line to 'Indexes' 12) Go back to 'Start' step and right click to 'Maintain Variant'

Page 38: CUBE CREATION

13) Select 'Immediate' to schedule the process chain immediately

14) 'Check' the process chain and 'Activate' the process chain

15) Execute the process chain, enter the server name in the following screen

Page 40: CUBE CREATION

follows, incase there is any failure, the status will appear as cancelled