Using Nested Exception Aggregation in BEx Reports- Scenario

Similar documents
Developing Crystal Reports on SAP BW

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

Using Radio Buttons in Web Template

Step by Step Method for File Archival in BW

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

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

Creation of Key Figures with Higher Decimal Place Precision

Replacement Path: Explained with an Illustrated Example

Using Rule Group in SAP-BI. Part - 1

Step by Step Procedure for DSO Creation

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

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

Hierarchy in Business Objects with Expanded Hierarchy Logic

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

DB Connect with Delta Mechanism

Database Statistics During ODS Activation

Linking Documents with Web Templates

MDM Syndicator: Custom Items Tab

Information Broadcasting Part 3 Scheduling the First Report

Process Chain Log Deletion

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

Graphical Mapping Technique in SAP NetWeaver Process Integration

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

Currency Translation in SAP BI Step by step Guide

How to Work with F4 Input Help Effectively in BEX

Implying Security on Business Object XI 3.1 Universe having SAP BW as Source

Validity Table in SAP BW/BI

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

Triggering the Process Chains at Particular Date using Events

SAP BW vs. SAP BusinessObjects Web Intelligence Functionalities

Displaying SAP Transaction as Internet Application in Portal

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

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

Step-By-Step guide to Virtual InfoCube Implementation

Recreating BIA Indexes to Address the Growth of Fact Index Table

Easy Lookup in Process Integration 7.1

Load Info Cube in SCM 5.0 (BI 7.0)

Standalone BW System Refresh

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

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

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

Data Flow During Different Update Mode in LO Cockpit

POWL: Infoset Generation with Web Dynpro ABAP

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

All about Compression

Material Listing and Exclusion

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

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

Data Mining: Scoring (Linear Regression)

BW Reconciliation. Applies to: Summary. Author Bio

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

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

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

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

Planning Functions and Characteristic Relationship in Integrated Planning

Open Hub Destination - Make use of Navigational Attributes

Generate Export Data Source

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

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

Creation of Sets in SAP-ABAP, How to Read them INI SAP-ABAP Reports

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

Material Master Archiving in Simple Method

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

How to Check BW system Before Go-Live

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

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

Data Mining: Decision Trees

How to Broadcast BEx Workbooks using BW Pre-calculation Server and through Process Chains

Freely Programmed Help- Web Dynpro

ecatt Part 6 System Data Container

Data Source Replication and Activation of Transfer Structures

Purpose of Goods Receipt Message indicator in Purchase Orders

How to Display Traffic Lights for Exceptions in BI Web Reports

List of Values in BusinessObjects Web Intelligence Prompts

SDN Community Contribution

Analysis Process Designer (APD) Step by Step Business Intelligence

Server Connectivity and Data Load from Non SAP System to BW

Deploying BusinessObjects Explorer on Top of a SAP BI Query

Solution to the Challenges in Pivoting

Data Extraction & DS Enhancement in SAP BI Step by Step

Financial Statement Version into PDF Reader

How to Configure User Status in mysap SRM

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

Data Inconsistency in the Cube and Aggregate

Managing Transports in SAP BW 3.5 and BI 7.0

Routines in SAP BI 7.0 Transformations

Loading the Data for Time Dependent Hierarchy in SAP BI

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Table Row Popup in Web Dynpro Component

SAP BusinessObjects Translation Manager Functionality and Use

Dynamically Enable / Disable Fields in Table Maintenance Generator

SAP BI Analysis Authorization (Customer Exit Variables)

How to Create and Schedule Publications from Crystal Reports

Role and Scope of ABAP in SAP BI

A Step-by-Step Guide on IDoc-ALE between Two SAP Servers

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

Creating Rules in Process Composer and using them in Process

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

Step by Step Approach for End Routine with Look Up

Reading Enhanced DataSource fields for the Remote Cube

Transcription:

Using Nested Exception Aggregation in BEx Reports- Scenario Applies to: SAP BW 3.x & SAP BI Net Weaver 2004s. For more information, visit the Business Intelligence homepage. Summary The Objective of this article is to explain the necessity of Nested Exception Aggregation in BEx reports with a scenario. Author: Company: KVS VaraPrasad Cognizant Technology Solutions (India). Created on: 25 October 2011 Author Bio KVS VaraPrasad is working as a SAP BW consultant with Cognizant Technology Solutions. He has got rich experience on various BW Implementation/Support Projects in both SAP BW 3.5 and SAP BW 7.0. 2011 SAP AG 1

Table of Contents SAP BW 3.x & SAP BI Net Weaver 2004s. For more information, visit the Business Intelligence homepage.. 1 Summary... 1 Author Bio... 1 Purpose:... 3 Report Requirements:... 3 Counting total number of deliveries:... 4 How to create IF then ELSE Conditions in Calculated Key Figures:... 12 Counting On-time Deliveries:... 12 Counting Late Deliveries:... 14 Counting Early Deliveries:... 15 Nested Exception Aggregation:... 17 Nested Exception Aggregation on On-time Deliveries CKF:... 18 Nested Exception Aggregation on Deliveries Late CKF:... 19 Nested Exception Aggregation on Deliveries Early CKF:... 20 Related Content... 22 Disclaimer and Liability Notice... 23 2011 SAP AG 2

Purpose: This article addresses the requirement of Nested Exception aggregation in BW/BI Reports; In this article I m going to explain the following list: How to use the formula variables with replacement path as processing type. How to use IF ELSE condition in the calculated Keyfigures. How to create and use Nested Exception Aggregation. Report Requirements: In some sales based reports, Users wants to see the Total number of deliveries, On-time deliveries, early deliveries and Late Deliveries for particular time period. To display the data as per above requirements we have to create Calculated Keyfigures to count the delivery numbers based on Actual Delivery Date and Requested Delivery Date of Delivery number. On-time Delivery: An On-time Delivery is a delivery number whose Actual Delivery Date is equal to Requested Delivery Date. Late Delivery: A Late Delivery is a delivery number whose Actual Delivery Date is greater than Requested Delivery Date. Early Delivery: An Early Delivery is a delivery number whose Actual Delivery Date is less than Requested Delivery Date. 2011 SAP AG 3

Counting total number of deliveries: To count the delivery numbers we need a formula variable to hold the Delivery number for each record and that formula should process with Replacement path with Delivery number (0DELIV_NUMB) as reference Characteristic. Step 1: Create a Calculate Key Figure - Number of Deliveries Step 2: Give the Description and technical names as Number of Deliveries and CKF_NO_DEL_1 respectively and create a new Formula Variable to hold the Delivery numbers. 2011 SAP AG 4

Step 3: Create ZVAR_DEL_NUMB formula variable Description: Type of Variable: Processing by: Reference Characteristic: Delivery Number Formula Replacement Path Delivery (0DELIV_NUMB) Set the Replacement Path attributes with below settings: 2011 SAP AG 5

This formula is not ready for input (Don t Check Variable is Ready for Input) Set the Dimension as Number (Delivery number is numerical field): 2011 SAP AG 6

Step 4: Drag and drop the Delivery Number (ZVAR_DEL_NUMB) formula variable into the Detail view of Number of Deliveries (CKF_NO_DEL_1) Calculated Key Figure. Use default aggregation type Standard Aggregation as Exception Aggregation 2011 SAP AG 7

Comparing Date values: Create two different formula variables with Replacement Path as processing type and having Actual Delivery Date and Requested Delivery Dates as reference characteristics. Formula variable with Actual Delivery date as reference characteristic: Description: Technical Name: Type of Variable: Processing by: Reference Characteristic: Actual Delivery Date Formula VAR_ACT_DEL_DATE_FORM Formula Replacement Path Actual Delivery Date (0ACT_DL_DTE) In the Replacement Path tab, select the Replace Variable with attribute as InfoObject and replace with Key value. The Off set values for date field starts with 0(Zero) and the length should be 8. 2011 SAP AG 8

Don t Check the Variable is ready for Input Set the Dimension as Date in the Currency/Unit tab 2011 SAP AG 9

Similarly create another formula variable with Requested Delivery date as reference characteristic: Description: Technical Name: Type of Variable: Processing by: Reference Characteristic: Requested Delivery Date Formula VAR_REQ_DEL_DATE Formula Replacement Path Requested Delivery Date (0DSDEL_DATE) In the Replacement Path tab, select the Replacement Variable with attribute as InfoObject and Replaced with Key value. The Off set values for date field starts with 0(Zero) and the length should be 8. 2011 SAP AG 10

Don t Check the Variable is ready for Input Set the Dimension as Date in the Currency/Unit tab Now we can compare Acutal Delivery date with Requested Delivery date value by using logical operators example: =, <,>, <=,>=.. Date Difference = Actual Delivery Date Formula (VAR_ACT_DEL_DATE_FORM) - Requested Delivery Date Formula (VAR_REQ_DEL_DATE). 2011 SAP AG 11

How to create IF then ELSE Conditions in Calculated Key Figures: General IF ELSE Condition: IF <Condition> <Statements> (is true) (Execute the statements block) ELSE IF<Condition> <Statements> ELSE IF<Condition> <Statement> IF ELSE Condition Example: We can write IF then Else statement for different comparisons in Calculated KeyFigure / Formula. Example: (A ==B)*C + (A>B) *D + (A<B) * E Statements gives different results for different values of A & B. Case 1: IF A == B is True The Statement becomes (1) * C + (0) * D + (0) * E Result is C. Case 2: IF A > B is True Then the statement becomes (0) * C + (1) * D + (0) * E Result is D Case 3: If A < B is True Then the statement becomes (0) * C + (0) * D + (1) * E Result is E. Counting On-time Deliveries: To count On-time Deliveries we have to compare Actual Delivery Date with Requested Delivery date. If both dates are same then only we should consider that delivery number. Create a new calculated keyfigure On-Time Del (CKF_ON_TIME_2) and drag and drop the Actual Delivery Date and Requested Delivery date formula variables into the Detail view. 2011 SAP AG 12

Formula to count On-time Deliveries: On-Time Deliveries = ([VAR_ACT_DEL_DATE_FORM] Actual Delivery Date == [VAR_REQ_DEL_DATE] Requested Delivery Date) * [CKF_NO_DEL_1] Number of Deliveries Set the Exception Aggregation value to TOTAL and Reference Characteristic Requested Delivery date. Exception Aggregation as Total : As the name signifies, this function is used to aggregate the result of a key figure in a different manner than standard OLAP functionality. It works same as Standard Exception Aggregation but summarized keyfigure with respect to the Reference Characteristic. Similarly create Late deliveries and Early deliveries calculated keyfigures to count Late and Early deliveries. 2011 SAP AG 13

Counting Late Deliveries: Create a new Calculated Keyfigure Deliveris Late (CKF_DEL_LATE_4) and drag and drop required formula variables into the Detail view of CKF. Formula to count Late Deliveries: Deliveries Late = ([VAR_ACT_DEL_DATE_FORM] Actual Delivery Date > [VAR_REQ_DEL_DATE] Requested Delivery Date) * [CKF_NO_DEL_1] Number of Deliveries Set the Exception Aggregation value to TOTAL and Reference Characteristic Requested Delivery date (0DSDEL_DATE) 2011 SAP AG 14

Counting Early Deliveries: Create a new Calculated Keyfigure Deliveris Early (CKF_DEL_EARLY_6) and drag and drop required formula variables into the Detail view of CKF. Formula to count Early Deliveries: Deliveries Early = ([VAR_ACT_DEL_DATE_FORM] Actual Delivery Date < [VAR_REQ_DEL_DATE] Requested Delivery Date) * [CKF_NO_DEL_1] Number of Deliveries Set the Exception Aggregation value to TOTAL and Reference Characteristic Requested Delivery date (0DSDEL_DATE) 2011 SAP AG 15

Result of Default Aggregation Standard Exception Aggregation : If we are not using Exception Aggregation as Total then the Calculated Key figures uses Standard Aggregation then the report result is as below: Report Result: Place Actual Delivery date and Requested Delivery dates in the columns of BEx designer of the report for detail analysis of above error, then the report result will be as follows: 2011 SAP AG 16

Report result: As per above screenshot, we can understand that On-time, Delivery Late and Delivery Early are not summarized at Actual, Requested Delivery date levels. In order to get summarized result we have to use TOTAL as an Exception Aggregation type with respect to dates. Here we need nested exception aggregation to get correct results. i.e first we have to create one Calculated Keyfigure with TOTAL Exception aggregate with reference to Requested Delviery date and then create another Calculated Key Figure/Formula and call the earlier CKF(with Requested Delivery date as reference cahracteristic) into this and set the TOTAL Exception aggregation with reference characteristic Actual Delivery Date. Nested Exception Aggregation: If we need multiple exception aggregations or reference characteristics, we can nest formulas and calculated key figures in one another and specify an exception aggregation for each formula or calculated key figure. Necessity of Nested Exception Aggregation: As highlighted in the above screen shot, the results of the On-time deliveries, Deliveries Late and Deliveries early with the Actual Delivery Dates are X. If we create one level of exception aggregation with reference to Requested Delivery date then we get below result (Detail level): As per the result, the deliveries are not aggregated along with Actual Delivery Date ( X value in result columns). To avoid this situation we need one more level of Calculated Key Figures/Formula with Exception Aggreateion on current Calculated KeyFigures. 2011 SAP AG 17

Nested Exception Aggregation on On-time Deliveries CKF: Create New Calculate KeyFigure Deliveries On-Time (CKF_DEL_ON_TIME_3) and drag and drop the On- Time Del (CKF_ON_TIME_2) into the Detail View. Set the Exception Aggregation to Total and Actual Delivery date (0ACT_DL_DTE) as Reference Characteristic: 2011 SAP AG 18

Nested Exception Aggregation on Deliveries Late CKF: Similarly Create New Calculate KeyFigure for Late Deliveries (CKF_LATE_DEL_5) and drag and drop the Deliveries Late (CKF_DEL_LATE_4) into the Detail View. Set the Exception Aggregation to Total and Actual Delivery date (0ACT_DL_DTE) as Reference Characteristic 2011 SAP AG 19

Nested Exception Aggregation on Deliveries Early CKF: Create new Calculate KeyFigure Early Deliveries (CKF_EARLY_DEL_7) and drag and drop the Deliveries Early (CKF_DEL_LATE_4) CKF into the Detail View. Set the Exception Aggregation to Total and Actual Delivery date (0ACT_DL_DTE) as Reference Characteristic 2011 SAP AG 20

Drag and drop the Deliveries On-Time (CKF_DEL_ON_TIME_3), Late Deliveries (CKF_LATE_DEL_5) and Early Deliveries (CKF_EARLY_DEL_7) Calculated Key Figures into the Rows and Company code into the Coulumns. Report result (Summarized Level): 2011 SAP AG 21

Related Content http://help.sap.com/saphelp_nw70/helpdata/en/75/21054da1392649948e5b94e4fc4bce/frameset.htm http://help.sap.com/saphelp_nw70/helpdata/en/03/6ba03cc24efd1de10000000a114084/content.htm http://help.sap.com/saphelp_nw04/helpdata/en/6f/56853c08c7aa11e10000000a11405a/content.htm http://help.sap.com/saphelp_nw70/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/content.htm 2011 SAP AG 22

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. 2011 SAP AG 23