Using Rule Group in SAP-BI. Part - 1

Similar documents
Triggering the Process Chains at Particular Date using Events

Errors while Sending Packages from OLTP to BI (One of Error at the Time of Data Loads through Process Chains)

Using Customer Exit Variables in BW/BI Reports Part - 1

Using Customer Exit Variables in BW/BI Reports: Part - 14

Using Nested Exception Aggregation in BEx Reports- Scenario

Using Customer Exit Variables in BW/BI Reports: Part - 4

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

How to Create View on Different Tables and Load Data through Generic Datasource based on that View

Using Radio Buttons in Web Template

Open Hub Destination - Make use of Navigational Attributes

Using Query Extract to Export Data from Business warehouse, With Pros and Cons Analyzed

Step by Step Method for File Archival in BW

Database Statistics During ODS Activation

Material Master Archiving in Simple Method

Validity Table in SAP BW/BI

Step-By-Step guide to Virtual InfoCube Implementation

Step By Step: the Process of Selective Deletion from a DSO

Creation of Key Figures with Higher Decimal Place Precision

Role and Scope of ABAP in SAP BI

Loading the Data for Time Dependent Hierarchy in SAP BI

Changing the Source System Assignments in SAP BW Objects without Affecting the Data Modeling

Data Extraction & DS Enhancement in SAP BI Step by Step

DB Connect with Delta Mechanism

Replacement Path: Explained with an Illustrated Example

Process Chain Log Deletion

Extracting Missing Fields of Data Source Which Are Present In Their Extract Structure

To Check the Files/Reports in Application Server and Trigger Mail Alerts

Reading Enhanced DataSource fields for the Remote Cube

How to Display Result Row in One Line While Reporting On Multiproviderer

Standalone BW System Refresh

Open Text DocuLink Configuration - To Access Documents which are Archived using SAP

This article explains the steps to create a Move-in letter using Print Workbench and SAPScripts.

MDM Syndicator: Custom Items Tab

How to use Boolean Operations in the Formula as Subsidiary for IF Condition

Recreating BIA Indexes to Address the Growth of Fact Index Table

Extraction of Hierarchy into Flat File from R/3 and Loading in BW System

Data Mining: Scoring (Linear Regression)

Information Broadcasting Part 3 Scheduling the First Report

How to Work with F4 Input Help Effectively in BEX

Currency Translation in SAP BI Step by step Guide

Step by Step Procedure for DSO Creation

Load Info Cube in SCM 5.0 (BI 7.0)

POWL: Infoset Generation with Web Dynpro ABAP

Integration of Web Dynpro for ABAP Application in Microsoft Share Point Portal

ecatt Part 6 System Data Container

Linking Documents with Web Templates

MDM Import Manager - Taxonomy Data (Attribute Text Values) Part 3

Add /Remove Links on ESS Home Page in Business Package 1.5

Generate Export Data Source

Displaying SAP Transaction as Internet Application in Portal

Data Source Replication and Activation of Transfer Structures

Step by Step Guide on How to Use Cell Definition in BEx Query

SAP BW Copy Existing DTP for Data Targets

Purpose of Goods Receipt Message indicator in Purchase Orders

Data Flow During Different Update Mode in LO Cockpit

Easy Lookup in Process Integration 7.1

Limitation in BAPI Scheduling Agreement (SA) Create or Change

How to Create Top of List and End of List of the ALV Output in Web Dynpro for ABAP

Material Listing and Exclusion

Planning Functions and Characteristic Relationship in Integrated Planning

Analysis Process Designer (APD) Step by Step Business Intelligence

Routines in SAP BI 7.0 Transformations

Restricting F4 (Input Help) Values While Running a SAP BW Query

Server Connectivity and Data Load from Non SAP System to BW

Reporting Duplicate Entries

Step by Step Approach for End Routine with Look Up

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

Performance Tuning in SAP BI 7.0

Procedure to Trigger Events in Remote System Using an ABAP Program

Real Time Data Acquisition (RDA) Overview and Step-by-Step Guide (SAPI and Web Services)

SAP BI Analysis Authorization (Customer Exit Variables)

Data Mining: Decision Trees

Xcelsius Tricks Part 5 Create a Loading Bar in SAP Crystal Dashboard and Presentation Design (Xcelsius 2008)

Download SAP Query Output to Local/ Network Folders in Background

SAP Net Weaver 400s BI 7.0For more information, visit the Business Intelligence homepage.

Developing Crystal Reports on SAP BW

How to Create and Schedule Publications from Crystal Reports

How to Default Variant Created for Report Developed In Report Painter/Writer

Cut Over Activities Specific for LIS* Data Sources

Custom Process types Remote Trigger and End Time

Steps to Activate ALE Delta for Custom Master Datasource Created on ZTable

SMT (Service Mapping Tool)

SAP BI BO Unit/Currency Logic for Unknown Units Case Study

Customized Transaction to Trigger Process Chain from Failed Step

Methods of Selecting BOM Variant Parts in Variant Configuration

DB Partitioning & Compression

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Transfer Material Attributes (Material Type) from R/3 to SAP GRC Global Trade Services (GTS)

SAP BusinessObjects Translation Manager Functionality and Use

Data Inconsistency in the Cube and Aggregate

Graphical Mapping Technique in SAP NetWeaver Process Integration

How to Reference External JAR Files in Web Dynpro DC in SAP NW Portal 7.3

Template Designer: Create Automatic PDF Documents for Attachment or Print Purpose

Web Dynpro: Coloring Table Conditionally

Financial Statement Version into PDF Reader

Explore to the Update Tab of Data Transfer Process in SAP BI 7.0

How to Configure User Status in mysap SRM

Solution to the Challenges in Pivoting

Setting up Connection between BW and R/3 for Data Load

Step by Step Guide How to Use BI Queries in Visual Composer

Transcription:

Applies to: SAP BW 7.X. Summary This article gives clear picture about how to use Rule Group (s) using Rule Type Routine in SAP-BI. Author: Surendra Kumar Reddy Koduru Company: ITC Infotech India Ltd. (Bangalore/INDIA) Created on: 06 July 2009 Author Bio Surendra Kumar Reddy Koduru is a SAP BI consultant currently working with ITC Infotech India Ltd (Bangalore/INDIA). He has got rich experience and worked on various BW/BI implementation/support projects. 2009 SAP AG 1

Table of Contents Introduction:... 3 Live Scenarios:... 3 Steps:... 3 Code - 1:... 8 Code - 2:... 10 Related Content... 12 Copyright...Error! Bookmark not defined. 2009 SAP AG 2

Introduction: This article describes about the Rule Group using Rule Type Routine in SAP-BW. A Rule Group is a group of transformation rules. It contains one transformation rule for each key field of the target. A transformation can contain multiple rule groups. Live Scenarios: In some cases the requirement is like below. Based on some Characteristics values, we need to populate/load the data into different Key Figures in InfoCube. Eg: Here I m explaining one simple scenario using Flat File DataSource. The data in Flat File is like below Based on Movement Type and Flag, I want to load the data into two Key Figures in InfoCube. The conditions are: 1. If Movement Type = 101 or 102 AND Flag = A then load the data into 0AMOUNT KeyFigure in InfoCube. 2. If Movement Type = 101 or 102 or 103 AND Flag = Q then load the data into 0BUDGETPROP KeyFigure in InfoCube. Steps: Create InfoCube with following Objects. 2009 SAP AG 3

Create Flat File DataSource like below. Here in the following screen, in Fields tab we have only Amount Key Figure only. Because we are getting data from DataSource for AMOUNT Field only. But our requirement is, based on the above two conditions we need to split and load the data into Two different Key Figures in InfoCube. 2009 SAP AG 4

Note: Here I m not displaying all Tabs of DataSource. Create Transformations. 2009 SAP AG 5

By default Standard Group will create by system. Here, I modified the Standard Group based on Movement type and Flag. 2009 SAP AG 6

See the Rule Details. 2009 SAP AG 7

Here the Rule type is Routine. Based on Movement type and Flag, we need to load the data to 0AMOUNT Key Figure in InfoCube. Select Rule Type Routine and it will open the Code window, write the following code. Code - 1: Write the following Code. See the routine Code: (Marked in Violet color) DATA: MONITOR_REC TYPE rsmonitor. *$*$ begin of routine - insert your code only below this line *-*... "insert your code here *-- fill table "MONITOR" with values of structure "MONITOR_REC" *- to make monitor entries... "to cancel the update process * raise exception type CX_RSROUT_ABORT.... "to skip a record * raise exception type CX_RSROUT_SKIP_RECORD.... "to clear target fields * raise exception type CX_RSROUT_SKIP_VAL. 2009 SAP AG 8

IF ( SOURCE_FIELDS-MOVETYPE EQ '101' OR SOURCE_FIELDS-MOVETYPE EQ '102') AND SOURCE_FIELDS-/BIC/FLAG EQ 'A'. RESULT = SOURCE_FIELDS-AMOUNT. ENDIF. *$*$ end of routine - insert your code only before this line *-* Create New Rule Group with name RG2, and map Amount Field from DataSource to 0BUDGETPROP InfoObject, for reference please look into the following figure. And see the details of the Rule Group RG2. 2009 SAP AG 9

Select Rule Type Routine and it will open the Code window, write the following code. Code - 2: Write the following Code. See the routine Code: (Marked in Violet color) DATA: MONITOR_REC TYPE rsmonitor. *$*$ begin of routine - insert your code only below this line *-*... "insert your code here *-- fill table "MONITOR" with values of structure "MONITOR_REC" *- to make monitor entries... "to cancel the update process * raise exception type CX_RSROUT_ABORT.... "to skip a record * raise exception type CX_RSROUT_SKIP_RECORD.... "to clear target fields * raise exception type CX_RSROUT_SKIP_VAL. IF ( SOURCE_FIELDS-MOVETYPE EQ '101' OR SOURCE_FIELDS-MOVETYPE EQ '102' OR SOURCE_FIELDS-MOVETYPE EQ '103') AND 2009 SAP AG 10

SOURCE_FIELDS-/BIC/FLAG EQ 'Q'. RESULT = SOURCE_FIELDS-AMOUNT. ENDIF. *$*$ end of routine - insert your code only before this line *-* If you see the two Rule Groups, i.e. Standard and RG2, you can find the Fields and InfoObjects mapping differences In Standard Rule Group, we mapped Amount field to 0AMOUNT, and in Rule Group RG2, Amount Field is mapped to 0BUDGETPROP. Create Data Transfer Processes Create InfoPackage and then execute. ( i.e. InfoPackage & Data Transfer Processes). After successful data load, check the data in InfoCube. 0CALMONTH and 0CALYEAR InfoObejcts are not mapped in Transformations, so it is showing blank in the InfoCube Note: For newly created/modified objects please follow the steps: Check. Save. Activate. 2009 SAP AG 11

Related Content How to use Customer Exit Variables in BW Reports: Part 2 How to use Customer Exit Variables in BW Reports Part - 1 Triggering the Process Chains at particular Date using Events Calculating the Ageing of the Materials How to trigger the Process Chains in BW from ECC How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License For more information, visit the Business Intelligence homepage. 2009 SAP AG 12

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. 2009 SAP AG 13