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.

Work Instructions

Step 1. In the Administrator Workbench: Modelling window, select InfoSources under Modelling in the left panel, right-click Application Component demo, and then select Create InfoSource….

 

 

SCREEN 3.48

graphics/03fig48.gif

Step 2. Select the option Transaction data, and then click graphics/continue.gif to continue.

 

 

SCREEN 3.49

graphics/03fig49.gif

Step 3. Enter a name and a description, and then click graphics/continue.gif to continue.

 

 

SCREEN 3.50

graphics/03fig50.gif

Step 4. The InfoSource is displayed but is not active yet. Double-click the InfoSource to create a communication structure.

 

 

SCREEN 3.51

graphics/03fig51.gif

Note

In Section 3.3, we skipped this step. BW created a communication structure for us automatically based on the characteristic attribute information.

A communication structure is needed here so that the data passed by an InfoPackage can feed multiple InfoCubes. See the note for Screen 3.70.

Step 5. Enter InfoObjects as shown, and then click graphics/activate.gif to save and activate the communication structure

 

 

SCREEN 3.52

graphics/03fig52.gif

Result

You have created the communication structure. A status message Communication Struct. IS_DEMOBC activated will appear at the bottom of Screen 3.52. Now we can clearly see that an InfoSource is simply a communication structure.

Next, let's create the transfer rules.

Work Instructions

Step 1. In the Administrator Workbench: Modelling window, right-click the InfoSource demo: IC_DEMOBC, and then select Assign DataSource….

 

 

SCREEN 3.53

graphics/03fig53.gif

Step 2. Enter SS_DEMOFF in the field Source system, and then click graphics/continue.gif to continue.

 

 

SCREEN 3.54

graphics/03fig54.gif

Step 3. Click graphics/yes.gif to pass the message.

 

 

SCREEN 3.55

graphics/03fig55.gif

Step 4. BW proposes a transfer structure based on the information of the communication structure. Under the Trans. structure tab, check four fields in the Selection column. You can use these four fields as selection conditions when loading data using an InfoPackage.

 

 

SCREEN 3.56

graphics/03fig56.gif

Note

A transfer structure maps DataSource fields to InfoSource InfoObjects.

Step 5. Under the Transfer rules tab, the simple one-to-one mappings appear in the left table, called Communication str./Transfer rules. Click graphics/characteristic.gif at the intersection of IO_REV and Tp to replace the one-to-one mapping with an ABAP transfer rule for the sales revenue calculation.

 

 

SCREEN 3.57

graphics/03fig57.gif

Step 6. In the pop-up window, select the option @9WQLocalA, and then click graphics/attribute.gif to create an ABAP transfer rule.

 

 

Note

The first option, graphics/characteristic.gif InfoObject, is the default – the simple one-to-one mapping. The second option, graphics/one.gif, allows us to specify a constant. The third option, @9WQLocalA, enables us to define an ABAP transfer rule.

SCREEN 3.58

graphics/03fig58.gif

Step 7. Enter a name for the Transfer routine, select the option All fields, and then click graphics/continue.gif to continue.

 

 

SCREEN 3.59

graphics/03fig59.gif

Note

In BW, the ABAP transfer rule is called a transfer routine.

Step 8. Scroll down the ABAP routine, to the right of RESULT = enter TRAN_STRUCTURE-/BIC/IO_PRC * TRAN_STRUCTURE-/BIC/IO_QUAN. The statement should appear as shown on line 68. This ABAP statement specifies how we calculate IO_REV, the RESULT, from IO_PRC and IO_QUAN.

Click graphics/check.gif to check the ABAP routine. If it is valid, click graphics/save.gif to save it.

 

 

SCREEN 3.60

graphics/03fig60.gif

Step 9. Click graphics/continue.gif to return to the main screen.

 

 

SCREEN 3.61

graphics/03fig61.gif

Step 10. The cell icon changes from graphics/characteristic.gif to graphics/to.gif. Click graphics/activate.gif to activate all transfer rules.

 

 

SCREEN 3.62

graphics/03fig62.gif

Result

You have created transfer rules. A status message Transfer rules IS_DEMOBC_AH activated will appear at the bottom of Screen 3.62.

Part I. Guided Tours

Business Scenario and SAP BW

Creating an InfoCube

Loading Data into the InfoCube

Checking Data Quality

Creating Queries and Workbooks

Managing User Authorization

Part II. Advanced Topics

InfoCube Design

Aggregates and Multi-Cubes

Operational Data Store (ODS)

Business Content

Generic R/3 Data Extraction

Data Maintenance

Performance Tuning

Object Transport

Appendix A. BW Implementation Methodology

Object Transport

Appendix B. SAP Basis Overview

Object Transport

Appendix C. Glossary

Appendix D. Bibliography



SAP Bw. A Step-By-Step Guide
Sap Bw: a Step By Step Guide for Bw 2.0
ISBN: B000LZM8CM
EAN: N/A
Year: 2002
Pages: 106

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net