Enhancement Framework Badi Development
Enhancement Framework Badi Development
Enhancement Framework Badi Development
(BADI Development)
Anthony Cecchini
Information Technology Partners Consulting
www.itp-consulting.com
Objectives
The Objective for this session is to:
Educate RICEFW team members responsible for
creating extensions to the delivered SAP standard
code, specifically calling out the use of both Classic
and Kernal Badi’s
The purpose of this presentation is to:
Provide an Overview of the Enhancement Framework
Describe what a BADI is……
Classic vs. Kernel BADI’s
Implement a BADI (Classic)
Tips & Tricks
Address feedback and questions from Audience
www.itp-consulting.com
Enhancement Framework
www.itp-consulting.com
Enhancement Framework
Let us first take a look at how the enhancement technique has
evolved so far in SAP.
The ‘BADI-s’ (Business Add-Ins), as they exist in pre NW04s releases are now
called old classic-BADI’s. This was the first object-oriented way to enhance
the ABAP system. This, to a certain extent, allows multiple implementations
with limited filter support. The classic-BADI’s are implemented using ABAP
Objects
www.itp-consulting.com
Enhancement Framework
So what's so cool about this new enhancement
technology?
www.itp-consulting.com
What is a BADI?
Business Add In
www.itp-consulting.com
What is a BADI?
What's important about this diagram is that it reflects both the definition
add-in
www.itp-consulting.com
3.Adapter class takes care of calling and filtering out the proper
What is a BADI?
SAP guarantees upward If an BADI is called
compatibility of all BADI frequently, performance
interfaces problems can occur
BADIs are not a replacement (No longer an issue with
for Customer Exits (already
existing exits were not
new Kernel BADI’s)
converted to BADIs) Customers can create
Enhancements, interfaces & BADIs
generated classes all lie in the Creating a BADI within a
SAP namespace CMOD project exit can allow
Implementations lie in the multiple developers to share
customer/partner namespace an exit without stepping on
and are transportable each other’s toes
Standard naming conventions
apply for BADIs – start your
implementations with Z
Object oriented coding rules
apply (i.e. – no header lines on
internal tables)
www.itp-consulting.com
Classic vs. Kernel BADI’s
The old classic-BADI’s are implemented purely at the
ABAP Workbench level; that is, both the definition and
implementation are realized as workbench repository
objects (global classes and interfaces)..
Example:
.
www.itp-consulting.com
Classic vs. Kernel BADI’s
Example:
www.itp-consulting.com
Classic vs. Kernel BADI’s
The old classic-BADI used to mix both implementation
selection and method call in the same CALL METHOD
statement. The implementations could only be chosen
at run-time because of the above reason and due to the
fact that the BADI handle could only be gotten from
another method call by passing the BADI name.
www.itp-consulting.com
Implement a BADI (Classic)
Step 1: Creating an Implementation
The first step involves creating a BADI implementation. Call
transaction SE19. The BADI implementation screen appears, as
shown. Enter a suitable name for your implementation in the field
provided, and click the Create button
www.itp-consulting.com
Implement a BADI (Classic)
A pop-up screen appears, as shown. Enter the name of
the BADI involved and press the Enter button.
www.itp-consulting.com
Implement a BADI (Classic)
Enter an appropriate short text in the field provided.
Then, click on the Interface tab. This shows the name
of the class that will be generated as a result of the
implementation. You may change the class if you like.
The Interface tab also contains the name of the BADI
method.
www.itp-consulting.com
Implement a BADI (Classic)
Then, double-click on the name of the method (in our
case SAP_SCRIPT_TABLES). This takes you to the Class
Builder’s method editor screen. This is the area where
you may write the code that you would like to be
executed when the BADI method is called
www.itp-consulting.com
Implement a BADI (Classic)
Step 2: Writing the code for the BADI Method
www.itp-consulting.com
Implement a BADI (Classic)
Step 2: Activate the BADI!
www.itp-consulting.com
Tips & Tricks
How do we find available BADI’s?
Press F4
www.itp-consulting.com
Tips & Tricks
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
A list of all the programs with call to the BADI’s will be listed.
www.itp-consulting.com
Tips & Tricks
Finding BADI Using SQL Trace (TCODE-ST05)
Push the button "Activate Trace". Start transaction in a new GUI session. Go back to the
Performance trace session.
www.itp-consulting.com
Tips & Tricks
Finding BADI Using Repository Information System (TCODE-
SE84)
www.itp-consulting.com
Conclusion
www.itp-consulting.com
Further Information
Help Portal
http://help.sap.com
Documentation SAP Netweaver (04s) Application Platform
ABAP technology ABAP Workbench Enhancement Framework
SDN
http://sdn.sap.com
www.itp-consulting.com
Address Feedback & Questions
from audience
www.itp-consulting.com
Copyright 2007 ,
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 IT
Partners Inc.. 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, and Informix are trademarks or registered trademarks of IBM Corporation.
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.
IT Partners Inc. assumes no responsibility for errors or omissions in this document. IT Partners Inc. does not warrant the accuracy
or completeness of the information, text, graphics, links, or other items contained within this material.
This document is provided 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.
IT Partners Inc. shall have no liability for damages of any kind including without limitation direct, special, indirect, or
consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross
negligence.
The statutory liability for personal injury and defective products is not affected. IT Partners Inc. 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.
www.itp-consulting.com