Using User Exit for Variables in BEx Reporting



Similar documents
Variable Exit in Sap BI How to Start

Data Source Enhancement Using User Exit

SAP Master Data Governance- Hiding fields in the change request User Interface

Business One in Action - How can we post bank fees and charges while posting Incoming or Outgoing Payment transactions?

Integrating Easy Document Management System in SAP DMS

Maintaining Different Addresses and Ids for a Business Partner via CRM Web UI

TM111. ERP Integration for Order Management (Shipper Specific) COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Alert Notification in SAP Supply Network Collaboration. SNC Extension Guide

Table of Contents. How to Find Database Index usage per ABAP Report and Creating an Index

Data Archiving in CRM: a Brief Overview

Understanding HR Schema and PCR with an Example

NetWeaver Business Client (NWBC) for Incentives and Commissions Management (ICM)

Enterprise Software - Applications, Technologies and Programming

Business Requirements... 3 Analytics... 3 Typical Use Cases... 8 Related Content... 9 Copyright... 10

SAPFIN. Overview of SAP ERP Financials COURSE OUTLINE. Course Version: 15 Course Duration: 2 Day(s)

Process Archiving using NetWeaver Business Process Management

Sending Additional Files from SAP Netweaver PI to third Party System

Budget Control by Cost Center

Consume an External Web Service in a Nutshell with good old ABAP

R/3 and J2EE Setup for Digital Signature on Form 16 in HR Systems

HR400 SAP ERP HCM Payroll Configuration

Log Analysis Tool for SAP NetWeaver AS Java

UI Framework Logo exchange without skin copy. SAP Enhancement Package 1 for SAP CRM 7.0

AC200. Basics of Customizing for Financial Accounting: General Ledger, Accounts Receivable, Accounts Payable COURSE OUTLINE

Third Party Digital Asset Management Integration

Integration of SAP Netweaver User Management with LDAP

How to Create a Support Message in SAP Service Marketplace

How to Add an Attribute to a Case, Record and a Document in NW Folder Management (ex-records Management)

Sample Universe on Microsoft OLAP Cube

UI Framework Simple Search in CRM WebClient based on NetWeaver Enterprise Search (ABAP) SAP Enhancement Package 1 for SAP CRM 7.0

Single Sign-On between SAP Portal and SuccessFactors

Portfolio and Project Management 5.0: Excel Integration for Financial and Capacity Planning

K in Identify the differences between the universe design tool and the information design tool

User Experience in Custom Apps

USDL XG WP3 SAP use case. Kay Kadner

BW Workspaces Use Cases

SAP NetWeaver BRM 7.3

How To Use the BPC Mass User Management Tool in BPC 10.0 NW

Integration of Universal Worklist into Microsoft Office SharePoint

LO Extraction Part 1: SD Application Short Overview

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

Mass Maintenance of Procurement Data in SAP

UI Framework Task Based User Interface. SAP Enhancement Package 1 for SAP CRM 7.0

Download and Install Crystal Reports for Eclipse via the Eclipse Software Update Manager

Quick Guide EDI/IDoc Interfacing to SAP ECC from External System

SAP Sustainability Solutions: Achieving Customer Strategies

How-to-Guide: Middleware Settings for Download of IPC Configuration (KB) Data from R/3 to CRM System

Duet Enterprise Add SAP ERP Reports and SAP BI Queries/Workbooks to Duet Enterprise Configuration

Configuring Single Sign-on for SAP HANA

Secure MobiLink Synchronization using Microsoft IIS and the MobiLink Redirector

Application Lifecycle Management

Compliant, Business-Driven Identity Management using. SAP NetWeaver Identity Management and SBOP Access Control. February 2010

ERP Quotation and Sales Order in CRM WebClient UI Detailed View. SAP Enhancement Package 1 for SAP CRM 7.0 CRM Sales - SFA

Business Process Change Analyzer in SAP Solution Manager 7.1

How to Schedule Report Execution and Mailing

SAP DSM/BRFPlus System Architecture Considerations

Accounts Receivable. SAP Best Practices

How To Use the ESR Eclipse Tool with the Enterprise Service Repository

Project Governance The Role Of The Business Process Owner

Supporting SAP POS Best Practices Setting Log File Sizes and Retention

LO Extraction Part 2 Database Update Logic

BW362. SAP BW powered by SAP HANA COURSE OUTLINE. Course Version: 10 Course Duration: 5 Day(s)

AP Integration with BRFplus VERSION V APRIL SAP AG

SAP Central Process Scheduling (CPS) 8.0 by Redwood

SAP Service Tools for Performance Analysis

Intelligent Business Operations Chapter 1: Overview & Strategy

Query, Read, Create and Update CLOUD FOR CUSTOMER ODATA SERVICE QUERY, READ, CREATE AND UPDATE

SAP Business ByDesign Reference Systems. Scenario Outline. SAP ERP Integration Scenarios

Sales Planning Detailed View. SAP Enhancement Package 1 for SAP CRM 7.0 CRM Sales - SFA

SAP Portfolio and Project Management

Configuring Distribution List in Compliant User Provisioning

OData in a Nutshell. August 2011 INTERNAL

SAP Cloud Strategy - Timeless Software. Frank Stienhans on behalf of Kaj van de Loo SAP

Production Subcontracting (External Processing) SAP Best Practices

How to Set Up an Authorization for a Business Partner in Customer Relationship Management (CRM) Internet Sales: Sample Case

Unified Service Description Language Enabling the Internet of Services

SOP through Long Term Planning Transfer to LIS/PIS/Capacity. SAP Best Practices

Fixed Asset in SAP Business One 9.0

How to Configure Access Control for Exchange using PowerShell Cmdlets A Step-by-Step guide

Installation Guide Customized Installation of SQL Server 2008 for an SAP System with SQL4SAP.VBS

Run SAP like a Factory

SAP NetWeaver BPM Tutorial for Beginners: My Name and Age BPM Tutorial

SAP How-To Guide: Develop a Custom Master Data Object in SAP MDG (Master Data Governance)

Supplier Master Data Governance

SAP HANA Cloud Integration Document Version: Template Guide for SAP Sales and Operations Planning

BICS Connectivity for Web Intelligence in SAP BI 4.0. John Mrozek / AGS December 01, 2011

RUN BETTER Become a Best-Run Business with Remote Support Platform for SAP Business One

Thread Dump Viewer for SAP NetWeaver AS Java

Next Generation Digital Banking with SAP

Finding the Leak Access Logging for Sensitive Data. SAP Product Management Security

Microsoft Excel 2007 & SAP Business Explorer Compatibility

SAP BusinessObjects Increasing Stability by Setting Limits on Max. Retrievable Cells from SAP BW into Web Intelligence using BICS

Learning Series: SAP NetWeaver Process Orchestration, secure connectivity add-on 1c SFTP Adapter

Ariba Network Integration to SAP ECC

Analyzing Sales Data for Choosing Forecast Strategies

Delta Queue Demystification

How To Configure MDM to Work with Oracle ASM-Based Products

Methodology to Implement SAP Process Integration

Learning Series: SAP NetWeaver Process Orchestration, business to business add-on EDI Separator Adapter

Transcription:

Using User Exit for Variables in BEx Reporting Applies to: SAP BI system & BEx. For more information, visit the Business Intelligence homepage. Summary To describe the process followed to use a user exit for complex reporting in BEx. This involves a significant amount of ABAP coding Author: R. Prem Kumar Company: SAP Created on: 31 May 2009 Author Bio The author works for SAP. His expertise includes SAP BI and ABAP 2009 SAP AG 1

Table of Contents Introduction...3 Goal...3 Graphical view...3 Scenario 1...3 RESULT...6 Scenario 2...6 RESULT...7 Related Contents...8 Copyright...9 2009 SAP AG 2

Introduction To describe the process followed to use a user exit for complex reporting in BEx. This involves a significant amount of ABAP coding Goal This document describes how to use the user exit EXIT_SAPLRRS0_001 for handling variables created with type customer exit in the query designer for a complex BEx report Graphical view Scenario 1 Let us consider a scenario where a characteristic variable of type customer exit is to be populated with a value based on the value entered by the user in another input variable during selection In the following screen shots the scenario considered is, the user would input a date for the variable ZICCALDAY. Inside the user exit, this value needs to be captured and we would have to derive the previous fiscal year and should be passed to the customer exit variable ZVCPREYRCAL The variable ZVCPREYRCAL is created on the info-object 0FISCYEAR(Fiscal Year). 2009 SAP AG 3

Now lets see how to use the user exit EXIT_SAPLRRS0_001 As a first step we need to create a project using T-code CMOD In this example a project by the name /ATB/CA0 is created Assign the enhancement RSR00001 & click on Components 2009 SAP AG 4

Choose the function exit EXIT_SAPLRRS0_001 Activate the Project. Double click on the function exit EXIT_SAPLRRS0_001, this will open the function module Please note that, alternatively once the project is activated with the required function exit, this can also be displayed in the t-code for Function modules se37 Double click on the include ZXRSRU01, to open the editor where the required coding can be done In the above function module (exit) the import parameter I_VNAM holds the variable (i.e name of the variable) The import parameter I_T_VAR_RANGE holds all the variables and its values that were created in the BEx report 2009 SAP AG 5

The import parameter I_STEP can hold values 1 or 2 or 3. This is a very important parameter, as this identifies, the step in which the required variable is to be processed, If I_STEP = 1, the variable needs to be processed before the report s selection screen appears, an example for this would be like, if some default values are to be populated to the selection screen variables before user input, I_STEP = 1 can be used. This would be explained in scenario 2 If I_STEP = 2, the variable is to be processed after the report s selection appears (ie after user input). An example for this step is explained in scenario 1 of this document I_STEP = 3, is used for validation purpose, error messages can be raised here The export parameter E_T_RANGE is the one to which the calculated value needs to be passed Using the ABAP statements CASE, ENDCASE & WHEN the code for the desired variable can be executed See below the example code : DATA: LS_T_VAR_RANGE TYPE RRS0_S_VAR_RANGE, LV_CALDAY TYPE SY-DATUM, LV_FISCYEAR like T009B-BDATJ CASE i_vnam. WHEN 'ZVCPREYRCAL'. IF i_step = 2. READ TABLE i_t_var_range INTO LS_T_VAR_RANGE WITH KEY vnam = 'ZICCALDAY'. LV_CALDAY = LS_T_VAR_RANGE-high. CALL FUNCTION 'DATE_TO_PERIOD_CONVERT' EXPORTING I_DATE = LV_CALDAY * I_MONMIT = '00' I_PERIV = 'V3' IMPORTING * E_BUPER = LV_POSTPER E_GJAHR = LV_FISCYEAR. LV_FISCYEAR = LV_FISCYEAR - 1. ls_range-low = LV_FISCYEAR. ls_range-opt = 'EQ'. ls_range-sign = 'I'. APPEND ls_range TO e_t_range. ENDIF. WHEN 'Variable1 WHEN 'variable2 ENDCASE. Result Based on the code written above, when the user inputs a date in the variable ZICCALDAY and executes the report, previous fiscal year is calculated and is passed to the variable ZVCPREYRCAL Scenario 2 Let us consider a scenario where a characteristic variable of type customer exit & ready for input is to be populated with a default value when the report is executed & when the selection screen appears In the following sample code the scenario considered is, when the selection screen appears for a report the variable ZICCALDAY should have a default value of yesterday s date. Please note to achieve this I_STEP = 1 should be used, as described earlier 2009 SAP AG 6

See below the example code : DATA: LV_CALDAY TYPE SY-DATUM. CASE i_vnam. WHEN 'ZICCALDAY'. IF i_step = 1. LV_CALDAY = SY-DATUM - 1. ls_range-low = '00000000'. ls_range-high = LV_CALDAY. ls_range-opt = 'EQ'. ls_range-sign = 'I'. APPEND ls_range TO e_t_range. ENDIF. Result Based on the code written above, when the selection screen appears the variable ZICCALDAY would have a default value of sy-datum 1 Please note, similar to the steps explained above, formula variables of type customer exit & text variables of type customer exit can also be used 2009 SAP AG 7

Related Contents For more information, visit the Business Intelligence homepage. 2009 SAP AG 8

Copyright Copyright 2009 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iseries, pseries, xseries, zseries, eserver, z/vm, z/os, i5/os, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. 2009 SAP AG 9