Creating an InfoSource for Transaction Data - SAP BW

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 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 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….
Work Instructions

Step 2. Select the option Transaction data,and then clickWork Instructions to continue.
Create Info source

Step 3. Enter a name and a description,and then clickWork Instructions to continue.
Create Info source transaction data

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

Note: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.

Step 5. Enter InfoObjects as shown,and then clickInfoObject to save and activate the communication structure
Info source IS_DEMOBC transaction dat change

You have created the communication structure. A status message Communication Struct. IS_DEMOBC activated will appear at the bottom of Screen. 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….
Work Instructions

Step 2. Enter SS_DEMOFF in the field Source system,and then clickWork Instructions to continue.
Transaction data-Info source Assign Source system

Step 3. Click Yesto pass the message.
pass the message.

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.
Infosource IS_DEMOBC (Transaction dat) change

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. ClickTransfer rules 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.
INFOSourceIS_DEMOBC(transaction dat change)

Step 6. In the pop-up window,select the option @9WQLocalA,and then clickpop-up window, to create an ABAP transfer rule.

Note:The first option,Transfer rulesInfoObject,is the default—the simple one-to-one mapping. The second option,allows us to specify a constant. The third option,TR@9WQLocalA, enables us to define an ABAP transfer rule.
ABAP transfer rule

Step 7. Enter a name for the Transfer routine,select the option All fields,and then clickWork Instructions to continue.
Transfer routine for Info object

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.

Clicki2 to check the ABAP routine. If it is valid,clicksave to save it.
Transfer routine change routine

Step 9. Click Work Instructionsto return to the main screen.
return to the main screen.

Step 10. The cell icon changes fromTransfer rules tosi. Click InfoObjectto activate all transfer rules.
activate all transfer rules.

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

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

SAP BW Topics