Reporting Duplicate Entries

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

Using Radio Buttons in Web Template

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

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

Database Statistics During ODS Activation

Implementing Customer Exit Reporting Variables as Methods

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

Data Extraction & DS Enhancement in SAP BI Step by Step

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

Recreating BIA Indexes to Address the Growth of Fact Index Table

DB Connect with Delta Mechanism

Step by Step Method for File Archival in BW

Procedure to Trigger Events in Remote System Using an ABAP Program

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

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

Easy Lookup in Process Integration 7.1

SAP BW Copy Existing DTP for Data Targets

POWL: Infoset Generation with Web Dynpro ABAP

SMT (Service Mapping Tool)

Step by Step Procedure for DSO Creation

Standalone BW System Refresh

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

Process Chain Log Deletion

MDM Syndicator: Custom Items Tab

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

Linking Documents with Web Templates

SAP BI Analysis Authorization (Customer Exit Variables)

Routines in SAP BI 7.0 Transformations

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

Information Broadcasting Part 3 Scheduling the First Report

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

Table Row Popup in Web Dynpro Component

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

SDN Community Contribution

Reading Enhanced DataSource fields for the Remote Cube

Role and Scope of ABAP in SAP BI

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

Material Master Extension for New Plant

Download SAP Query Output to Local/ Network Folders in Background

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

Dynamically Enable / Disable Fields in Table Maintenance Generator

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

How to Work with F4 Input Help Effectively in BEX

ecatt Part 6 System Data Container

Triggering the Process Chains at Particular Date using Events

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

SAP BI Global Report Variable user exit modularization

Custom Process types Remote Trigger and End Time

Maintaining Roles and Authorizations in BI7.0 - RSECADMIN

Customizing Characteristic Relationships in BW-BPS with Function Modules

Material Listing and Exclusion

Freely Programmed Help- Web Dynpro

How to Create and Schedule Publications from Crystal Reports

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

Material Master Archiving in Simple Method

ABAP Code - Recipients (Specific Format) SAP BW Process Chain

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

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

Common Queries/Errors while working with Adobe Print PDF Forms

Customized Transaction to Trigger Process Chain from Failed Step

How to Write Inverse Routine with Expert Routine

Data Mining: Scoring (Linear Regression)

Limitation in BAPI Scheduling Agreement (SA) Create or Change

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

Cut Over Activities Specific for LIS* Data Sources

List of Values in BusinessObjects Web Intelligence Prompts

Step-By-Step guide to Virtual InfoCube Implementation

Web Dynpro: Coloring Table Conditionally

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

About ITAB Duplicate_Key (SAP lrsaods) Runtime Error

Developing Crystal Reports on SAP BW

Graphical Mapping Technique in SAP NetWeaver Process Integration

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

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

Replacement Path: Explained with an Illustrated Example

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

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

Creating Custom SU01 Transaction Code with Display and Password Reset Buttons

Analysis Process Designer (APD) Step by Step Business Intelligence

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

Validity Table in SAP BW/BI

Displaying SAP Transaction as Internet Application in Portal

Data Mining: Decision Trees

Currency Translation in SAP BI Step by step Guide

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

Comparison Terms and SPL Check Logic

Generate Export Data Source

Performance Management in Data Loading: an Overview

Open Hub Destination - Make use of Navigational Attributes

Hierarchy in Business Objects with Expanded Hierarchy Logic

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

Step by Step Guide to Enhance a Data Source

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

Web Dynpro ABAP: Dynamic Table

BPM Multi Line Container in Integration Process

Program to Find Where used List of a Query for Web Template (3.5), Work Books and RRI

Solution to the Challenges in Pivoting

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

Deploying BusinessObjects Explorer on Top of a SAP BI Query

Applies To:...1. Summary...1. Table of Contents...1. Procedure..2. Code... Error! Bookmark not defined.0

Transcription:

Applies to: SAP BI 7.0 and above. For more information, visit the Business Intelligence Homepage. Summary It is a common reporting requirement to display duplicate entries based on a characteristic. This document gives an alternative way to achieve this requirement by use of a customer exit variable. Author: Rahul Rajagopalan Nair Company: Infosys Technologies Ltd Created on: 09 Feb 2010 Author Bio Rahul Rajagopalan Nair has been working for Infosys technologies limited for past 2.2 years and has experience in SAP BI 7.0 implementations. 2010 SAP AG 1

Table of Contents Scenario... 3 Employee Master Data... 3 STEP 1: Create Customer Exit Variable... 5 STEP 2: ABAP Code for Variable.... 6 Before you start... 6 STEP 3: Global Restriction... 8 Related Content... 9 Disclaimer and Liability Notice... 10 2010 SAP AG 2

Scenario Every employee in an organization has a National Insurance Number for identification. It is mandatory for an organization to maintain a record of this information for all its employees. It is a serious offence if two employees in an organization have the same National Insurance Number. The task of the BW reporting team is to generate a report that identifies the employees that have duplicate NI Numbers. Employee Master Data The report has to be generated on the Employee Master Data. The employee master data contains various details of the employee Name, Age, Date of Joining, Job and Location etc. The National Insurance Number is one of the master data navigational attributes. 2010 SAP AG 3

The below query is used to report the employees along with their NIN details. Query: Report: Duplicates Duplicates It can be observed that the report has two sets of duplicate NI Numbers, DS345677F and TR234567Y. 2010 SAP AG 4

To create a report that displays duplicates, the following steps need to be carried out: Create Customer Exit Variable ABAP Code for Variable. Global Restriction STEP 1: Create Customer Exit Variable Create a variable of type Customer exit on NI Number. Description Technical Name Customer Exit The variable must be of type Multiple Single Values and should not be ready for user input. Multiple Single Values Optional Not Ready for Input 2010 SAP AG 5

STEP 2: ABAP Code for Variable. Before you start Ensure you have ABAP development rights Identify the Project/Enhancement Component used for Customer Exit Variables The below code is used to populate the Customer exit variable built on characteristic NI Number. "Structure TYPES : BEGIN OF TY_EMPLOYEE, /BIC/ION_EMPL TYPE /BIC/PION_EMPL-/BIC/ION_EMPL, /BIC/ION_NIN TYPE /BIC/PION_EMPL-/BIC/ION_NIN, END OF TY_EMPLOYEE. DATA : "Internal Table IT_EMPLOYEE TYPE STANDARD TABLE OF TY_EMPLOYEE. DATA : "Work Area WA_EMPLOYEE TYPE TY_EMPLOYEE. DATA : "Previous NI Number LV_PR_NI TYPE /BIC/PION_EMPL-/BIC/ION_NIN, "Current NI Number LV_CR_NI TYPE /BIC/PION_EMPL-/BIC/ION_NIN. CASE I_VNAM. WHEN 'ZDUP_NIN'. "Variable Name CASE I_STEP. WHEN 1. "Pre Processing "Read Master Data Table "Select all valid NI Numbers SELECT /BIC/ION_EMPL /BIC/ION_NIN FROM /BIC/PION_EMPL INTO TABLE IT_EMPLOYEE WHERE /BIC/ION_NIN NE '' AND OBJVERS EQ 'A'. "Sort by Internal table by NI Number SORT IT_EMPLOYEE BY /BIC/ION_NIN ASCENDING "Important Step /BIC/ION_EMPL ASCENDING. "Clear Variables CLEAR LV_PR_NI. "Previous NI Number CLEAR LV_CR_NI. "Current NI Number LOOP AT IT_EMPLOYEE INTO WA_EMPLOYEE. "Store the current NI Number LV_CR_NI = WA_EMPLOYEE-/BIC/ION_NIN. "Check if the Current and previous NI IF LV_CR_NI EQ LV_PR_NI. "Set the filter values L_S_RANGE-SIGN = 'I'. L_S_RANGE-OPT = 'EQ'. L_S_RANGE-LOW = LV_CR_NI. APPEND L_S_RANGE TO E_T_RANGE. ENDIF. 2010 SAP AG 6

"Store the current NI Number as previous value LV_PR_NI = WA_EMPLOYEE-/BIC/ION_NIN. ENDLOOP. ENDCASE. ENDCASE. 2010 SAP AG 7

STEP 3: Global Restriction Include the Customer Exit Variable in the query definition as shown below: Query Structure: Output: Duplicates Only 2010 SAP AG 8

Related Content Customer Exit Variables Alternative method to Report Duplicate Entries Reporting Duplicate Records For more information, visit the Business Intelligence homepage. 2010 SAP AG 9

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. 2010 SAP AG 10