Sie sind auf Seite 1von 10

Rule Groups in Transformation

Applies to:
SAP BI 7.0

Summary
This article demonstrates how to use the Rule Group functionality in Transformation Rules. It is explained
with the help of an example where data is the source system is modeled as a Key Figure Model and while
loading it into Business Warehouse it is converted into Account Model using Rule Groups in Transformation.
Author: Chintan Doshi
Company: A Public Sector Company, NYC
Created on: 12 April 2008

Author Bio
Chintan Doshi is a BI Consultant and has been involved in numerous BI implementations in North America.
At present he is working with a Public Sector Company in NYC where he is the SAP BI Specialist.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 1
Rule Groups in Transformation

Table of Contents
Business Scenario: .............................................................................................................................................3
Introduction to Rule Group..................................................................................................................................3
Step by Step Solution .........................................................................................................................................4
Related Content..................................................................................................................................................9
Disclaimer and Liability Notice..........................................................................................................................10

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 2
Rule Groups in Transformation

Business Scenario:
DataModel in the source system is a KeyFigure Model where each KPI is represented as a separate field. In
Business Warehouse you decide to model the same data using the Account Model.
Records in source system: Actual and Plan Amount are represented as separate fields.
Company Code Account Fiscal period / Year Actual Amount Currency Plan Amount Currency
1000 5010180001 01/2008 100 USD 400 USD
1000 5010180001 02/2008 200 USD 450 USD
1000 5010180001 03/2008 300 USD 500 USD
Records in business warehouse: Single KeyFigure represents both Actual and Plan Amount. They are
differentiated using the characteristic Version (Version = 010 represents Actual Amount and Version = 020
represents Plan Amount in this example).
Company Code Account Fiscal period / Year Version Amount Currency
1000 5010180001 01/2008 010 100 USD
1000 5010180001 02/2008 010 200 USD
1000 5010180001 03/2008 010 300 USD
1000 5010180001 01/2008 020 400 USD
1000 5010180001 02/2008 020 450 USD
1000 5010180001 03/2008 020 500 USD

Introduction to Rule Group


Rule Group as the name infers it is a group of transformation rules.
Few key points about Rule Groups:
9 A transformation can contain multiple rule groups.
9 A default rule group is created for every transformation called as Standard Group. This group
contains all the default rules.
9 Standard rule group cannot be deleted. Only the additional created groups can be deleted.
Note: Concept of rule groups in transformations in same as update rule grouping in SAP BW versions 3.X.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 3
Rule Groups in Transformation

Step by Step Solution


1. Create Transformation between DataSources and the InfoCube.

2. Default Transformation which is created is always assigned to the Standard Rule Group. In this
example we will make use of Standard Rule Group to derive the actual amount.
3. Set version to constant 010 (to represent actual amount).

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 4
Rule Groups in Transformation

4. Map source field representing the actual amount to the KeyFigure in InfoCube.

5. Create a new Rule Group (Click the drop down in the box which says Rule Group and select New
Rule Group)

6. Specify the description for the New Rule Group and hit enter.

7. Set version to constant 020 (to represent plan amount). System will display a pop-up as shown in
figure below. New Rule Group is created as a reference of the Standard Rule Group. If we select
‘No’ here than the change we do here will also apply to the referenced Rule Group (in this case the
Standard Rule Group). Selecting ‘Yes’ will create a copy of the original rule removing the reference
to the original rule. Select ‘Yes’ and set the version to the required value.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 5
Rule Groups in Transformation

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 6
Rule Groups in Transformation

8. Map source field representing the actual amount to the KeyFigure in InfoCube.

9. Save and activate the transformation.


10. By clicking pull down in the Rule Group box you can any time navigate between the two rule groups.

11. Load the data to the InfoCube.


12. Figure below shows the data in PSA (resembling the source data)

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 7
Rule Groups in Transformation

13. If you check the request monitor of the DTP there it can be seen that 3 records from the source were
converted into 6 records while updating the InfoCube.

14. Finally figure below shows the content of the InfoCube after data load.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 8
Rule Groups in Transformation

Related Content
http://help.sap.com/saphelp_nw2004s/helpdata/en/f8/7913426e48db2ce10000000a1550b0/frameset.htm

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 9
Rule Groups in Transformation

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this
document.

SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


© 2008 SAP AG 10

Das könnte Ihnen auch gefallen