Friday, 8 June 2012

BW Business Content


One of the BW's strongest selling points is its Business Content. Business Content
contains standard reports and other associated objects. For example, BW provides you,
the sales manager, with the following standard reports:

Quotation Processing

   •  Quotation success rates per sales area
   •  Quotation tracking per sales area
   •  General quotation information per sales area

Order Processing
   •  Monthly incoming orders and revenue
   •  Sales values
   •  Billing documents
   •  Order, delivery, and sales quantities
   •  Fulfillment rates
   •  Credit memos
   •  Proportion of returns to incoming orders
   •  Returns per customer
   •  Quantity and values of returns
   •  Product analysis
   •  Product profitability analysis

Delivery
   •  Delivery delays per sales area
   •  Average delivery processing times

Analyses and Comparisons
   •  Sales/cost analysis
   •  Top customers
   •  Distribution channel analysis
   •  Product profitability analysis
   •  Weekly deliveries
   •  Monthly deliveries
   •  Incoming orders analysis
   •  Sales figures comparison
   •  Returns per customer
   •  Product analysis
   •  Monthly incoming orders and revenue

Administrative and Management Functions
   •  Cost center: plan/actual/variance
   •  Cost center: responsible for orders, projects, and networks
   •  Order reports
   •  WBS Element: plan/actual/variance
   •  Cost center: plan/actual/variance
   •  Cost center: hit list of actual variances
   •  Cost center: actual costs per quarter
   •  Cost center: capacity-related headcount



BW ARCHITECTURE

     BW is an end-to-end data warehousing solution that uses preexisting SAP technologies.
BW is built on the Basis 3-tier architecture and coded in the ABAP (Advanced Business
Application Programming) language. It uses ALE (Application Link Enabling) and BAPI
(Business Application Programming Interface) to link BW with SAP systems and non-
SAP systems.

1.3.1 BW Architecture
Figure 1.3 shows the BW architecture at the highest level. This architecture has three
layers:
    1. The top layer is the reporting environment. It can be BW Business Explorer
        (BEx) or a third-party reporting tool. BEx consists of two components:
            o BEx Analyzer
            o BEx Browser
        BEx Analyzer is Microsoft Excel with a BW add-in. Thanks to its easy-to-use
        graphical interface, it allows users to create queries without coding SQL
        statements. BEx Browser works much like an information center, allowing users
        to organize and access all kinds of information. Third-party reporting tools
        connect with BW OLAP Processor through ODBO (OLE DB for OLAP).

    2. The middle layer, BW Server, carries out three tasks:
            o Administering the BW system
            o Storing data
            o Retrieving data according to users' requests

               We will detail BW Server's components next.

    3. The bottom layer consists of source systems, which can be R/3 systems, BW
        systems, flat files, and other systems. If the source systems are SAP systems, an
        SAP component called Plug-In must be installed in the source systems. The Plug-
        In contains extractors. An extractor is a set of ABAP programs, database tables,
        and other objects that BW uses to extract data from the SAP systems. BW
        connects with SAP systems (R/3 or BW) and flat files via ALE; it connects with
        non-SAP systems via BAPI.
        The middle-layer BW Server consists of the following components:

               
            o Administrator Workbench, including BW Scheduler and BW Monitor
            o Metadata Repository and Metadata Manager
            o Staging Engine
            o PSA (Persistent Staging Area)
            o ODS (Operational Data Store) Objects
            o InfoCubes
            o Data Manager
            o OLAP Processor
            o BDS (Business Document Services)
            o User Roles
           
                          Figure 1.3. BW ARCHITECTURE


Administrator Workbench maintains meta-data and all BW objects. It has two
components:
   •   BW Scheduler for scheduling jobs to load data
   •   BW Monitor for monitoring the status of data loads
This book mainly focuses on Administrator Workbench.
Metadata Repository contains information about the data warehouse. Meta-data
comprise data about data. Metadata Repository contains two types of meta-data:
business-related (for example, definitions and descriptions used for reporting) and
technical (for example, structure and mapping rules used for data extraction and
transformation). We use Metadata Manager to maintain Metadata Repository.
Staging Engine implements data mapping and transformation. 
Triggered by BWScheduler, it sends requests to a source system for data loading. 
The source system then selects and transfers data into BW.

PSA (Persistent Staging Area) stores data in the original format while being imported
from the source system. PSA allows for quality check before the data are loaded into their
destinations, such as ODS Objects or InfoCubes.

ODS (Operational Data Store) Objects allow us to build a multilayer structure for
operational data reporting. They are not based on the star schema and are used primarily
for detail reporting, rather than for dimensional analysis.

InfoCubes are the fact tables and their associated dimension tables in a star schema.
Data Manager maintains data in ODS Objects and InfoCubes and tells the OLAP
Processor what data are available for reporting.

OLAP Processor is the analytical processing engine. It retrieves data from the database,
and it analyzes and presents those data according to users' requests.

BDS (Business Document Services) stores documents. The documents can appear in
various formats, such as Microsoft Word, Excel, PowerPoint, PDF, and HTML. BEx
Analyzer saves query results, or MS Excel files, as workbooks in the BDS.

User Roles are a concept used in SAP authorization management. BW organizes BDS
documents according to User Roles. Only users assigned to a particular User Role can
access the documents associated with that User Role.




Thursday, 7 June 2012

3.10. Summary


In this chapter, we loaded the data described in Chapter 1 into the characteristics and InfoCube we created in Chapter 2Figure 3.2 shows the many ways in which data can flow into a destination in BW. In this chapter, we followed the path linked via solid lines. The rest of this book will discuss the other paths.

Figure 3.2. DATA FLOW

3.9. Create an InfoPackage to Load Transaction Data


Now we are ready to create an InfoPackage to load the transaction data. In this InfoPackage, we will specify how and when to load data.

Work Instructions

1.
Right-click Source System – demo: flat file, and then select Create InfoPackage….

SCREEN 3.66
2.
Select DataSource InfoSource Demo: IC_DEMOBC, enter a description for the InfoPackage, and then click  to continue.

SCREEN 3.67
3.
Under the Select data tab, note the fields we selected in Screen 3.56. We can use the selection condition on 0CALDAY to load 1999 data first, 2000 data second, and 2001 data last. If we do not enter anything, all of the data will be loaded together in one data load request. Because we do not have a large volume of data, we load them all together.

SCREEN 3.68
Note
0CALDAY (Calendar day) is the characteristic in Screen 2.28 that represents the Transaction Date in Table 1.4. We also included it in the InfoSource definition.
4.
Under the External data tab, select options as shown in the screen, and enter a file name with a path. The file contains the data fromTable 3.3.

SCREEN 3.69
5.
Under the Data targets tab, select the option Select data targets, and then select the first row for our InfoCube IC_DEMOBC.

SCREEN 3.70
Note
If the InfoSource appears in the update rules for other InfoCubes, all of the InfoCubes will be listed in the table. We can then specify into which InfoCubes we want to load the data.
6.
Under the Schedule tab, select the option Start data load immediately, and then click  to load the data.

SCREEN 3.71

3.8. Creating Update Rules for the InfoCube


Before creating an InfoPackage to load the transaction data, we must define rules for the InfoCube IC_DEMBC that determine how data will be updated. In BW, these rules are called update rules.

Work Instructions

Step 1.
Select Data targets under Modelling in the left panel, right-click InfoCube – demo: Basic Cube, and select Create update rules in the right panel.

SCREEN 3.63
Step 2.
In the Data source block, select the option InfoSource, enter the newly created IS_DEMOBC, and then click  to move to the next screen.

SCREEN 3.64
Step 3.
Accept the default update rules. Click  to check the update rules. If they are valid, click  to activate them.

SCREEN 3.65
Note
Section 9.2, “Preparing to Load Data into the ODS Object, Then into an InfoCube,” describes how to use ABAP to define an update rule.

3.7. Creating an InfoSource for Transaction Data


In Section 3.3, we used BW's default simple one-to-one mappings for characteristic data. In this section, we will write a transfer rule in the ABAP language.

Table 1.4 lists the material per unit sales price and quantity sold. It does not provide any sales revenue data, however. To improve future query performance, it is recommended that we calculate the sales revenue and save this result in the fact table, rather than calculate the sales revenue during a query run. The database design in Figure 1.1 reflects this idea, and the following procedure shows how to implement it.

3.6. Entering the Master Data, Text, and Hierarchy Manually


Using the procedure given in Section 3.5, we can not only display characteristic data, but also enter new data and change existing data. In this section, we use a different technique. First, we show how to enter master data and texts for characteristic IO_SREG. Then, we describe how to create a hierarchy for IO_SREP.

3.6.1. Master Data and Text

Work Instructions

Step 1.
Select InfoObjects under Modelling in the left panel, right-click Sales region, and then select Maintain master data in the right panel.


SCREEN 3.28
Step 2.
Click OK to display master data.

SCREEN 3.29
Step 3.
Click OK to create a record.

SCREEN 3.30
Step 4.
Enter data in the fields and click  to continue.


SCREEN 3.31
Step 5.
Repeat Steps 3 and 4 to enter two more records, and then click  OK to save the data into the database.

SCREEN 3.32
Result
You have entered data into IO_SREG. A status message Data has been saved will appearat the bottom of Screen 3.32.

                Repeat the same procedure to enter data into IO_SOFF.
                3.6.2 Hierarchy
                Table 1.3 is actually a hierarchy. It should look like the hierarchy depicted in Figure 3.1
                when we visualize the table data.
                                                                                                         
                           Figure 3.1. TIME-DEPENDENT HIERARCHY STRUCTURES
                This hierarchy indicates the Denver office was in the Midwest region before January 1,
                2000. On and after January 1, 2000, the Denver office was part of the West region. In
                BW, a hierarchy such as the one in Figure 3.1 is called a time-dependent hierarchy
                structure. Section 7.4, "InfoCube Design Alternative III— Time-Dependent Entire
                Hierarchies," will discuss another type of hierarchy called a time-dependent entire
                hierarchy.
                The following procedure describes how to create a time-dependent hierarchy structure for
                IO_SREP.
                Work Instructions
                                                                                                      
                      Step 1. To create a hierarchy for IO_SREP, we must specify hierarchy properties
                      in the IO_SREP definition. To modify the IO_SREP definition, double-click
                      InfoObject Sales representative ID.
                      SCREEN 3.33
                      Step 2. Under the Hierarchy tab, select the option with hierarchies, and then
                      select the option Hierarchy structure time-dependent.
                      Next, click     to check it. If it is valid, click to activate the modification.
                           Note
                           The activation will create three database tables for this hierarchy:
                           /BIC/HIO_SREP (hierarchy table), /BIC/KIO_SREP (hierarchy SID
                           table), and /BIC/IIO_SREP (SID hierarchy structure).
                           Besides DataSources for master data (IO_SREP_ATTR) and texts
                           (IO_SREP_TEXT), IO_SREP will work with a third DataSource,
                           IO_SREP_HIER. With IO_SREP_HIER, we can use an InfoPackage to
                           load hierarchy data as well.
                           Section 7.4, "InfoCube Design Alternative III— Time-Dependent Entire
                           Hierarchies," gives an example of Entire hierarchy is time-dependent.
                                                                                                     
                      SCREEN 3.34
                      Step 3. In the Administrator Workbench: Modelling window, right-click the
                      characteristic InfoObject Sales representative ID, and then select Create
                      hierarchy....
                      SCREEN 3.35
                                                                                               
                      Step 4. Enter a name and a description, and then click to continue.
                      SCREEN 3.36
                                                                                          
                      Step 5. Right-click IO_SREP hierarchy, and then select Insert characteristic
                      node....
                      SCREEN 3.37
                                                                                                  
                      Step 6. Enter IO_SREG, and then click         to continue. Here we use IO_SREG
                      data to create the hierarchy nodes.
                      SCREEN 3.38
                      Step 7. Select all three regions, and then click     to continue.
                      SCREEN 3.39
                      Step 8. Three regions are displayed under IO_SREP hierarchy.
                      To assign offices to each region, right-click one of the regions and repeat Steps 5,
                      6 (enter IO_SOFF instead of IO_SREG), and 7. This screen shows that Denver,
                      Los Angeles, and Seattle will be assigned to the West region.
                      SCREEN 3.40
                                                                                                      
                      Step 9. Because the Denver office is already assigned to the Midwest region, we
                      see this message. As noted in Chapter 1, the Denver office was part of the
                      Midwest region before January 1, 2000. For this reason, we need to put the
                      Denver office in two places.
                      Select the option Copy duplicated node, and then click     to continue.
                      SCREEN 3.41
                                                                                                    
                      Step 10. Now we need to specify the valid date periods for the Denver office.
                      Right-click the first Denver in the Midwest region, and then select Change
                      node(s)....
                      SCREEN 3.42
                                                                                                    
                      Step 11. Enter dates in Valid from and To, and then click to continue.
                      SCREEN 3.43
                                                                                             
                      Step 12. Repeat Steps 10 and 11 to specify valid dates for the Denver office in the
                      West region.
                      SCREEN 3.44
                                                                                                     
                      Step 13. Next, we assign sales representatives to each sales office.
                      At the hierarchy leaf level, we can either insert IO_SREP values following the
                      previous steps or right-click an IO_SOFF value, such as Atlanta in the East
                      region, and then select Sales rep. ID insert.... We take the second approach.
                      SCREEN 3.45
                                                                                                     
                      Step 14. After assigning sales representatives to each sales office, click to
                      save the hierarchy. Now we need to activate the hierarchy before we can use it.
                      SCREEN 3.46
                                                                                                    
                      Step 15. In the Administrator Workbench: Modelling window, right-click the
                      newly created hierarchy IO_SREP hierarchy, and then select Activate.
                      SCREEN 3.47
                                                                                                 
Result
You have created the hierarchy. Its color will change from gray to green.
Now that we have loaded and entered all characteristic data, it is time to load the
transaction data.

3.5. Checking Loaded Characteristic Data


Before we check the loaded characteristic data, let's confirm that the load operation was successful.

Work Instructions


Step 1.
Click OK to view the status of the data load. It leads us to BW Monitor.
                                           SCREEN 3.22
Step 2.
Click OK to view the status of all data loads triggered by this Info-Package.
                                      SCREEN 3.23
Step 3.
Green lights  in the left panel indicate that the data have been loaded successfully.
                                             SCREEN 3.24              
 Result: The data are now in IO_MAT. Next, we will display the IO_MAT ontents to verify that the data have been loaded correctly.
Work Instructions:
    The loaded characteristic data can be displayed in many ways. The next set of steps describes one of them.
Step 1. Right-click the characteristic Material number, and then select Maintain
master data.
Note : The two under Material number indicate the InfoPackages we created in Section 3.4.
                                            SCREEN 3.25
 Step 2. Click     to display the contents.
                                            SCREEN 3.26
 Note:To see only some of the data in IO_MAT, we can use the text fields in                           this screen to specify selection conditions. For example, the selection conditions in this screen specify that a maximum of 1,000 entries with texts in English will be displayed.
                                                                                                   
Result: The loaded data—both master data and texts—are displayed in Screen 3.27; they are correct.
                                               SCREEN 3.27
Chapter 4 discusses how to check data quality in an InfoCube.

3.4. Creating InfoPackages to Load Characteristic Data


BW uses InfoPackages to define how to select data, and when to transfer and load the data. In BW, a characteristic can consist of three data components:

  • Master data, or attributes as they are sometimes called
  • Text
  • Hierarchy

    "BW Star Schema," discusses master data, texts, and hierarchies and explains their relationships to characteristics.

                    Each part requires an InfoPackage. This section describes how to create InfoPackages to load master data and text. The next section covers entering master data and text manually
          Work Instructions:
    Step 1. Right-click Source System – demo: flat file, and then select Create infoPackage....
                                                                 SCREEN 3.16
    Step 2. Select the DataSource Material number (Master data), enter a description
    for the InfoPackage, and then click  ok  to continue.
                                                                 SCREEN 3.17                                                                                                     
     Step 3. Click the External data tab. Select options as shown in the screen. Enter a            file name with a path. The file contains the data given in Table 3.1.
                                                                    SCREEN 3.18                                                                                                       
        Note :The data file can reside on a front-end computer (or Client workstation as it is called here) or one of the application servers in the SAP Basis three-tier architecture. In our example, IO_MAT_ATTR.CSV resides in our front-end computer. For better loading performance,it is recommended that you place data files in application server computers.
                          
    Step 4. Click the Schedule tab, select the option Start data load immediately, and                      then click  ok  to load data.
                                                               SCREEN 3.19
                                                                                                           
       Result :The staging engine starts to load the data. A status message Data was requested will appear at the bottom of Screen 3.19.
                        
    Note : To schedule the loading operation for a later date or to execute loading periodically, select the option Start later in bckgrnd proc, and then click .A pop-up window appears, as shown in Screen 3.20. You can set up a background  process to start the data loading job based on the criteria specified in Screen 3.20. The same window is used in R/3 for background job scheduling. In essence, BW Scheduler is embedded in InfoPackages.
                                                                     SCREEN 3.20
    Table                                                                                                                                               3.1. MATERIAL NUMBER—MASTER DATA
                    MAT001                          TEA
                    MAT002                          COFFEE
                    MAT003                          COOKIE
                    MAT004                          DESK
                    MAT005                          TABLE
                    MAT006                          CHAIR
                    MAT007                          BENCH
                    MAT008                          PEN
                    MAT009                          PAPER
                    MAT010                          CORN
                    MAT011                          RICE
                    MAT012                          APPLE
                                                                                                                                                         Table 3.1.MATERIAL NUMBER—MASTER DATA
                    MAT001                               TEA
                    MAT013                               GRAPEFRUIT
                    MAT014                               PEACH
                    MAT015                               ORANGE
    By repeating this procedure and selecting DataSource Material number (Texts) (Screen
    3.21), we can load the texts in Table 3.2.
                                                                 SCREEN 3.21


       Table 3.2. MATERIAL NUMBER—TEXTS
                    E        MAT001                        Ice tea
                    E        MAT002                        Hot coffee
                    E        MAT003                        Fortune cookie
                    E        MAT004                        Computer desk
                    E        MAT005                        Dining table
                    E        MAT006                        Leather chair
                    E        MAT007                        Wood bench
                    E        MAT008                        Black pen
                    E        MAT009                        White paper
     Table                                                                                 
    3.2. MATERIAL NUMBER—TEXTS
    E         MAT001                      Ice tea
    E         MAT010                      America corn
    E         MAT011                      Asia rice
    E         MAT012                      New York apple
    E         MAT013                      Florida grapefruit
    E         MAT014                      Washington peach
    E         MAT015                      California orange
    The first column specifies the language of the texts, with "E" indicating English.