How To...Custom BADI for rounding off values in SAP BUSINESSOBJECTS Planning and Consolidation, version for SAP NetWeaver.

Similar documents
How To... Promote Reports and Input Schedules Through Your System Landscape

How To... Master Data Governance for Material: BADI USMD_SSW_SYSTEM_METHOD_CALLER to create successor change request

How to Use Function Keys in Mobile Applications for Handhelds

How To Set up NWDI for Creating Handheld Applications in SAP NetWeaver Mobile 7.1

How To... Master Data Governance for Material: BADI USMD_SSW_PARA_RESULT_HANDLER to merge result of parallel workflow tasks

How To... Reuse Business Objects and Override Operations of a Business Object

How To... Configure Integrated Configurations in the Advanced Adapter Engine

SAP NetWeaver How-To Guide

How To Recover Login Module Stack when login to NWA or Visual Administrator is impossible

How To...Configure Integration of CUP with SPM

How To...Use a Debugging Script to Easily Create a Test Environment for a SQL-Script Planning Function in PAK

Simplified Configuration of Single System Update in Maintenance Optimizer

How-To... Add Sensitive Content into an Area

How To... Master Data Governance for Material: File Down- and Upload

SAP NetWeaver How-To Guide How to use Process Execution Manager Using SAP Test Data Migration Server

How To Generate XSD Schemas from Existing MDM Repositories

How To... Use the BPC_NW Mass User Management Tool

SAP NetWeaver How-To Guide

SAP - How-To Guide MDG Custom Object Data Replication How to Configure Data Replication for MDG Custom Objects (Flex Option)

SAP NetWeaver How-To Guide. SAP NetWeaver Gateway Virtualization Guide

How To... Configure Drill Through Functionality

MDM Syndicator Create Flat Syndication File

Setting Up an Environment for Testing Applications in a Federated Portal Network

Install TREX for CAF Version 1.00 March 2006

Visual Composer - Task Management Application

How to Set Up and Use the SAP OEE Custom UI Feature

How to do Breakdown Validation in SAP BPC 7.0 for the SAP NetWeaver Platform

SAP GRC Access Control: Configuring compliant user provisioning (formerly Virsa Access Enforcer) into CUA Systems

SAP Composite Application Framework. Creating a Content Package Object

How To Integrate the TinyMCE JavaScript Content Editor in Web Page Composer

How To Configure the Websocket Integration with SAP PCo in SAP MII Self Service Composition Environment Tool

Access Control 5.3 Implementation Considerations for Superuser Privilege Management ID-Based Firefighting versus Role-Based Firefighting Applies to:

Consuming Web Dynpro components in Visual Composer.

Process Control 2.5 Implementation Checklist

Do Exception Broadcasting

A Step-By-Step Guide on File to File Scenario Using Xslt Mapping

How To Customize the SAP User Interface Using Theme Editor

How to Create a New SAPUI5 Development Component

What s New / Release Notes SAP Strategy Management 10.1

Create Partitions in SSAS of BPC Version 1.00 Feb 2009

SAP Composite Application Framework. Creating an External Service type Callable Object in Guided Procedures

How to Set Up and Use the SAP OEE Custom KPI Andons Feature

configure an anonymous access to KM

Integrating a Web Service in a Composite Application. SAP Composite Application Framework

How To Extend User Details

How to View Dashboards in the Self Service Composition Environment with Additional Metadata

Data Validation in Visual Composer for SAP NetWeaver Composition Environment

Building a Tax Calculation Application

link SAP BPC Excel from an enterprise portal Version th of March 2009

Web Page Composer anonymous user access

How to Upgr a d e We b Dynpro Them e s from SP S 9 to SP S 1 0

Quick Reference Guide SAP GRC Access Control Compliant User Provisioning (formerly Virsa Access Enforcer): HR Triggers

How To Enable Business Workflow for SAP NetWeaver Gateway 2.0

SAP Composite Application Framework. Creating a Callable Object in Group: Miscellaneous

How To Configure IDoc Adapters

Configure SSO in an SAP NetWeaver 2004s Dual Stack

Cache Settings in Web Page Composer

Use Business Objects Planning and Consolidation (version for the Microsoft platform) BPF services in Xcelsius

Integrate a Forum into a Collaboration Room

How to... Build a Planning Function that Deletes Comments in BW

How to Browse an Enterprise Services Registry in Visual Composer

How To Troubleshoot SSL with BPC Version 1.01 May 2009

SAP How-To Guide. Master Data Governance for Material. How To... Adjust MDG Homepage. Applicable Releases: EhP6, MDG 6.1

SDN Contribution HOW TO CONFIGURE XMII BUILD 63 AND IIS 6.0 FOR HTTPS

Configure UD Connect on the J2EE Server for JDBC Access to External Databases

Enterprise Portal Logon Page Branding

Configure TREX 6.1 for Efficient Indexing. Document Version 1.00 January Applicable Releases: SAP NetWeaver 04

SAP MII: Leveraging the Data Buffering Feature for Connection Error Handling.

Extract Archived data from R3

Create Monitor Entries from a Transformation routine

WDA - Custom themes for Web Dynpro ABAP applications without SAP Enterprise Portal integration

Installation Guide Business Explorer

Transport in GP. How-to Guide Beginning with SAP NetWeaver 2004s SPS06. Version 2.00 January 2006

How to Translate a Visual Composer Model Part I

Visual Composer Build Process

Preview of Web Services Reliable Messaging in SAP NetWeaver Process Integration 7.1

View Time Security for crystalreports.com

Create Monitor Entries from an update routine

How To... Transport Forum Content Between SAP NetWeaver Systems

How to Fast-Switch Integration Scenarios between SAP PI Runtimes Part II: Web Dispatcher

How To Develop a Simple Web Service Application Using SAP NetWeaver Developer Studio & SAP XI 3.0

How-To Use the SAP BusinessObjects Planning and Consolidation(BPC) Toolkit for LoadRunner

Work with Variables in SAP NetWeaver Visual Composer Version 1.00 May 2006

SOA Security Scenarios: WebAS Java, Message Level Security with no Transport Guarantee

Handle. How-to Guide SAP NetWeaver 2004s. Version 1.00 Sept 2006

Monitoring System Landscapes Using the DBA Cockpit

Using Business Graphics

Value Help in Web Dynpro ABAP - Tutorial.

Consuming Directory API in ABAP

How to Install SAP Netweaver 2004s ABAP Edition on Your Local PC

How To Create Publications with SAP NetWeaver MDM Using MDM Publisher- Advanced Topics

Send Multiple IDocs Within One XI Message

Building a Composite Business Process from Scratch with SAP NetWeaver BPM Guide 2

SAP Centralized Electronic Funds Transfer 1.8

Introducing SAP Enterprise Services Explorer for Microsoft.NET

Extracting Product Attributes in XML using Web Service

How To Set Up and Use the SAP ME Work Instructions Feature

Authentication of a WS Client Using a SAP Logon Ticket

Working with Select Options in Web Dynpro for ABAP

Line Items in BI Integrated Planning

Transcription:

SAP BusinessObjects EPM RIG How-To Guide How To...Custom BADI for rounding off values in SAP BUSINESSOBJECTS Planning and Consolidation, version for SAP NetWeaver. Applicable Releases: SAP BusinessObjects Planning and Consolidations, version for SAP NetWeaver, version 7.0, SP02 and higher. Version 1.00 August 2009

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, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iseries, pseries, xseries, zseries, z/os, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/os, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. 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. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mysap, mysap.com, xapps, xapp, SAP NetWeaver, 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 in several other countries all over the world. 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. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. SAP NetWeaver How-to Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP NetWeaver. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. Any software coding and/or code lines / strings ( Code ) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent. Disclaimer Some components of this product are based on Java. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java Source Code delivered with this product is only to be used by SAP s Support Services and may not be modified or altered in any way.

Document History Document Version Description 1.00 First official release of this guide

Typographic Conventions Type Style Example Text Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation Icons Icon Description Caution Note or Important Example Recommendation or Tip Example text Emphasized words or phrases in body text, graphic titles, and table titles Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation. <Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 orenter.

Table of Contents 1. Business Scenario...1 2. Background Information...1 3. Prerequisites...1 4. Step-by-Step Procedure...2 4.1 Importing the transports...2 4.2 Creating BADI implementation...2 5. Implementation...6 6. Error Messaging...9

1. Business Scenario During typical planning scenarios records may be require to be rounded off to fewer decimals or to integers. 2. Background Information This How To Guide (HTG) describes the procedure for implementing a Business Add-In (BADI) that establishes a new keyword in script logic for rounding off values as per the decimals specified by the user in the parameters. 3. Prerequisites SAP BusinessObjects Planning and Consolidation version for SAP NetWeaver 7.0 SP02 or higher ABAP programming skills (desirable but necessary) Access to SAP NetWeaver transaction codes: SE20, SE19, SE20, SE38, STMS September 2009 1

4. Step-by-Step Procedure 4.1 Importing the transports This How-To Guide has a transport associated with it. Send the transports to your organization s BASIS administrator and have him/her import the transport into the system where you want to implement the How-To Guide solution. Download the transports. These transports contain the following series of objects: ZCL_SL_BPC_SL_ROUND Implementation Class After your BASIS Administrator successfully loads the transports into your system verify that the objects exist and all objects are active. 4.2 Creating BADI implementation 1. Log on to SAP GUI and go to transaction se19. 2. Provide the Enhancement Spot as UJ_CUSTOM_LOGIC and click on Create Impl.. 3. In the next screen provide the name of the implementation as ZROUND and short text as Rounding off the values. Please do not enter anything in the field Composite Enhancement September 2009 2

Implementation and click the green check mark. NOTE: You will need a developer key to be able to create this implementation. 4. Provide your package name and click on Save button in the bottom. 5. In the next screen, provide name for BADI Implementation as ZROUND and Implementation Class as ZCL_SL_BPC_SL_ROUND. Choose BADI Definition as BADI_UJ_CUSTOM_LOGIC from the drop down. 6. Click the green check mark to continue. If prompted, please provide the package name for the implementation class similar to step 4 above. 7. Within the Enhancement implementation, expand the BADI implementation and double click on filter values. September 2009 3

8. Click on Create filter combination. 9. Double click on the???? under the value 1 column and enter ROUND and click OK. 10. Save the implementation and activate. September 2009 4

September 2009 5

5. Implementation After the BADI has been correctly implemented; the user can create script logic that calls the BADI to perform the record transfers. To call the BADI from script logic, use the following format: *START_BADI ROUND QUERY = OFF WRITE=OFF DECIMALS = 0 *END_BADI In the above example the number of decimals is 0. This means that this example will convert the value to an integer. This is a user defined parameter. Hence if it is desired to round off the value to 2 decimal places, then this parameter should say DECIMALS = 2. Please include the additional statements QUERY = OFF and WRITE=OFF to enhance overall BADI performance. Notes: 1. Scoping statements can be used to limit the number of records processed in the BADI call 2. There is no need for adding a *COMMIT statement to post records into the database, the execution of the BADI performs function this automatically. 3. Valid parameters that can be used with this BADI: QUERY Format: QUERY=ON or- QUERY=OFF DO NOT USE open/closed quotation marks around ON or OFF. Default is QUERY=ON, for this BADI please make sure you use QUERY=OFF. WRITE Format: WRITE=ON - or - WRITE=OFF DO NOT USE open/closed quotation marks around ON or OFF. Default is WRITE=ON, for this BADI please make sure you use WRITE=OFF. DECIMALS Format: DECIMALS=<number of decimals> Please be sure to enter a non-negative integer value for the number of decimals September 2009 6

Example scenarios for using ROUND : 1. The values 12.34 and 12.67 have to be rounded off to integers. Use the keyword ROUND to round off the values to integers. These values need to be scoped first. For example, let us assume that the data region TIME = 2009.JAN, CATEGORY = PLAN, P_ACCT = VALIDATION and RPTCURRENCY = LC contains only the two values we want to round off viz. 12.34 and 12.67. In that case the script logic can be as follows: *XDIM_MEMBERSET TIME = 2009.JAN *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI ROUND DECIMALS=0 QUERY=OFF WRITE=OFF *END_BADI This would round off the value 12.34 to 12 and 12.67 to 13. September 2009 7

2. The values 23.1267 and -43.1234 have to rounded off to 2 decimal places. Use the keyword ROUND to round off the values to integers. These values need to be scoped first. For example, let us assume that the data region TIME = 2009.FEB, CATEGORY = PLAN, P_ACCT = VALIDATION and RPTCURRENCY = LC contains only the two values we want to round off viz. 23.1267 and -43.1234. In that case the script logic can be as follows: *XDIM_MEMBERSET TIME = 2009.FEB *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI ROUND DECIMALS=2 QUERY=OFF WRITE=OFF *END_BADI This would round off the value 23.1267 to 23.13 and -43.1234 to -43.12. September 2009 8

6. Error Messaging This BADI has incorporated several error messages to help the user navigate the process: Message 1: The following error message will be displayed if no decimals are specified or a non-integer value is specified in the decimals: Message 2: The following error message will be displayed if a negative value is specified in the decimals: Message 3: The following error message will be displayed if QUERY=OFF is not specified in the BADI parameters. September 2009 9

Message 4: The following error message will be displayed if WRITE=OFF is not specified in the BADI parameters. September 2009 10

www.sdn.sap.com/irj/sdn/howtoguides