enhancements in sap bw

23
Know-How Network Call March 31, 2004 Gary Nolan Platinum Consultant SAP America, Inc. Enhancements in SAP BW

Upload: venkatesh-yellamelli

Post on 28-Dec-2015

67 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Enhancements in SAP BW

Know-How Network Call March 31, 2004

Gary NolanPlatinum Consultant SAP America, Inc.

Enhancements in SAP BW

Page 2: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Agenda

Overview: Userexits/Enhancements11

Methods of Enhancement22

Common Enhancements33

Troubleshooting44

22

Page 3: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Enhancements – Definition

Enhancement – a.k.a. Userexit – Predetermined places in code created by SAP and delivered empty to allow customers to create additional functionality that may not be provided as part of thestandard code.

•Gives SAP customers the ability to adapt SAP to suit specific requirements

•Migration across systems available through transport system

•Does not require a modification to standard code – code will not be overwritten during upgrade

•Analysis is needed on upgrade and patch to determine effects on existing userexits

•Support/Troubleshooting of userexits much more difficult than standard functionality

•It is highly recommended that clear documentation and test plan are prepared for use during upgrade and patch application

33

Page 4: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Methods of Enhancement

There are two main methods of enhancements

nCustomer / Function Enhancementn Defined / created in transaction SMOD / CMODn Two level landscape

nBADI – Business Add-in n Defined / created in transaction SE18 / SE19n Multi-level landscapen Newer (as of R/3 version 4.6A)

n Customer enhancement (CMOD) functionality is being converted toBADIsn Not all BW CMOD enhancements have been converted to BADIsn CMOD enhancements can be migrated to BADIs via transaction SPAUn As long as the exit is not replaced by SAP there is no need to convert a

CMOD exit to a BADI

44

Page 5: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Customer Enhancement Transaction - CMOD

Steps to Create an Customer Enhancement

Transaction: CMOD

Create a Project

Select Enhancement i.e. RSR00001

Choose Component i.e. EXIT_SAPLRRS0_001

Double-click on include i.e. ZXRSRU01 within the Exit

Add or change coding

Activate the Project (Do not forget this step!)

55

Page 6: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

BADI Enhancement

Steps to create code using BADI Enhancement

Transaction: SE19

Create an Implementation (custom implementations should start with Y or Z)

Choose Definition Interface ie RS_BBS_BADI

Enter ABAP Code enhancement in method

Save Entries

Activate the Implementation (Do not forget this step!)

66

Page 7: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Userexits in BW

Valuable Userexits in BW

Must be register developer and objects in OSS before modification is allowed

DescriptionCMODBADI

Report to Report Interface Field Mapping

PreviouslyRSR00004

Eliminated in BW version 30B

RS_BBS_BADIVirtual Characteristics and Key FiguresRSR00002RSR_OLAP_BADI

Variable UserexitRSR00001R/3 Extraction EnhancementRSAP0001RSU5_SAPI_BADI

77

Page 8: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Meta Data ManagerMeta Data Manager

Business Explorer

BW Server

Meta DataRepositoryMeta DataRepository InfoCubesInfoCubes

SchedulingScheduling

MonitorMonitor

BrowserBrowser

Data ManagerData Manager

Non R/3 Production Data Extractor

Non R/3 Production Data Extractor

Non R/3 OLTP ApplicationsNon R/3 OLTP Applications

OperationalData Store

OperationalData Store

R/3 OLTP ApplicationsR/3 OLTP Applications

OLTP Reporting

OLTP Reporting

Production DataExtractor

Production DataExtractor

Staging EngineStaging Engine

BAPIBAPI

Administrator Workbench

AdministrationAdministration

BAPIBAPI

BEX AnalyzerBEX Analyzer

OLAP ProcessorOLAP Processor

1.

2. 3.

4.

Userexits in BW

1. R/3 Extraction Userexit

2. Variable Userexit

3. Virtual Characteristics and Key Figures

4. Report to Report Interface Field Mapping

88

Page 9: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Extending Extractors – RSAP0001

Most popular BW userexit

Allows for the extension to fill custom appended fields in SAP extractorsn Custom fields can be appended to extractors using transaction RSA6 n These fields can be populated using this userexitn This userexit is not designed to change key fields

Code is added on the R/3 system, not the BW system

Userexit can be used to fill n Transaction Data – component EXIT_SAPLRSAP_001n Master Data - component EXIT_SAPLRSAP_002n Text – component EXIT_SAPLRSAP_003n Hierarchies - component EXIT_SAPLRSAP_004

R/3 accesses this userexit during each extraction n Do not forget about the other R/3 userexits…SD….Pricing

Examples…

99

Page 10: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSAP0001 - Use

RSAP0001 can be tested by setting a breakpoint in code and usingtransaction RSA3 to test extractionn Allows for single step from breakpoints set in userexit code to verify

proper functioning of userexit

Performance must be a consideration because code is accessed foreach extracted record.

Transaction SE30 can be used for performance analysisn Start Extraction using RSA3n Start SE30 on active extraction job n Analyze Results

1010

Page 11: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Large Percentage in Net Column

denotes a very resource intensive statement

Allows direct jump to code

Transaction SE30 – Runtime Analysis1111

Page 12: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSAP0001 – More Information…

More Information? n Transaction 'SMOD' -> Enhancement: RSAP0001 n ->Documentation n ->Display

http://service.sap.com/bw

"How to … Extend Master Data to Include SS Number“

1212

Page 13: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00001 – Variable Userexit

nVariable Userexit – RSR00001 – component EXIT_SAPLRRS0_001

nCan be used with characteristics, hierarchies, hierarchy nodes, formula variables and text variables to determine default values

nAble to be used with variables ‘Ready for Input’ parameter turned on or off

nSet variable to ‘Processing by customer exit’

nVariable userexit cannot be used to overwrite user input values into a variable. Can only derive values for variables or validate the user entries

nCode is written independently for each variable…CASE statement is used to designate the variable to apply code

nExamples…

1313

Page 14: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00001 – Variable Userexit – I_STEP

Variable userexit can be called in three different ways using I_STEP

Code actually calls this program three separate times, code can be added to run for one, two, or all three

I_STEP = 1 - Called prior to processing of variable pop-up and for each “customer exit” variables. Can be used to fill variable with default values.

I_STEP = 2 - Called after the processing of the variable pop-up. Only for those variables that are not marked as “ready for input” or are set to “mandatory variable entry”.

I_STEP = 3 - Called after all variable processing and gets called only once and not per variable. Here you can validate the user entries.

1414

Page 15: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00001 – More Information and Sample Code

http://service.sap.com/bw

“How to … Verify the Variable Input”

“How to … Derive a Variable Value from Another Variable”

“How to … Use variable time references in curr. conversions”

“How to … Report data in alternate units of measure”

SAP Reference IMG

-> Business Information Warehouse

-> BW Enhancements

"Customer Exit for Variables"

Transaction 'SMOD' -> Enhancement: RSR00001 - Documentation

OSS Note: 492504 – Use of I_STEP

1515

Page 16: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00002 – Virtual Characteristics and Key Figures

Virtual Characteristics and Key Figures– RSR00002

A virtual characteristic / key figure can be used to derive values at query run time

The virtual characteristic / key figure must be added to the cube as a characteristic or key figure but not filled in update rules or transfer rules

Useful for determining values that are not known or determined until query runtime

Cache not used – Could have performance impact

Can be used in conjunction with variable userexitn The value selection made by the user for the variables can be used in

the virtual characteristics and key figure exit.

Examples…

1616

Page 17: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00002 – Use

EXIT_SAPMRSRU_001 - BW: Definition of Virtual Characteristic

ZXRSRTOP – Global Variable Definition Section

ZXRSRU02 – Specify if infoobject should be read or populated during exit

ZXRSRZZZ– Enhancement Coding (Update Logic)

Transaction RSRT can be used to troubleshoot virtual characteristics n Breakpoints can be set in code and single step through ABAP code

1717

Page 18: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00002 – More Information and Sample Code

http://service.sap.com/bw

"How to … Work Around Single Key Date Limitation"

"How to … Identify Comparable Results within a Query"

"How to … Use variable time references in curr. conversions”

SAP Reference IMG

-> Business Information Warehouse

-> BW Enhancements

"Customer Exit for Virtual Characteristic and Key Figures"

Transaction 'SMOD' -> Enhancement: RSR00002 - Documentation

OSS Note: 368913 – Authorizations with Virtual Char/KF

1818

Page 19: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RS_BBS_BADI – Report to Report Interface Mapping

RS_BBS_BADI– Report to Report Interface Mapping

The following restrictions are possible for selection types:

Single values, intervals, free selection options and hierarchy nodes can be transferred

Single values: In the report/report interface a list of values is permitted

Interval: In the report/report interface only one single interval is allowed

Selection option: Single values, intervals and free selection options (for example, >, <, <>, ...) are selected. Hierarchy nodes are expanded in lists of single values

Hierarchy nodes: Hierarchy nodes permitted exclusively

1919

Page 20: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

RSR00004 – More Information and Sample Code

http://service.sap.com/bw

"How to … Drilldown to OLTP using User Exit mapping"

Documentation Enhancements 3.X

Report to Report Interface

2020

Page 21: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

Other Popular BADIs

Integration of self-defined functions in the transformation library of the formula builder

RSAR_CONNECTOR

Transformation between extracting data and transferring it to an Open Hub destination.

OPENHUB_TRANSFORM

DescriptionBADI

2121

Page 22: Enhancements in SAP BW

Know How Network Call

Gary [email protected]

Platinum Consultant SAP America, Inc.

Enhancements in SAP BW

Page 23: Enhancements in SAP BW

SAP AG 2004, Userexits in BW – Gary Nolan

n 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.

n Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

n Microsoft®, WINDOWS®, NT®, EXCEL®, Word®, PowerPoint® and SQL Server® are registered trademarks of Microsoft Corporation.

n 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 and Informix® Dynamic ServerTM are trademarks of IBM Corporation in USA and/or other countries.

n ORACLE® is a registered trademark of ORACLE Corporation.

n UNIX®, X/Open®, OSF/1®, and Motif® are registered trademarks of the Open Group.

n Citrix®, the Citrix logo, ICA®, Program Neighborhood®, MetaFrame®, WinFrame®, VideoFrame®, MultiWin® and other Citrix product names referenced herein are trademarks of Citrix Systems, Inc.

n HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

n JAVA® is a registered trademark of Sun Microsystems, Inc.

n JAVASCRIPT® is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.

n MarketSet and Enterprise Buyer are jointly owned trademarks of SAP AG and Commerce One.

n SAP, SAP Logo, R/2, R/3, mySAP, mySAP.com 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 trademarks of their respective companies.

Copyright 2004 SAP AG. All Rights Reserved