Documente Academic
Documente Profesional
Documente Cultură
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 Badis The purpose of this presentation is to: Provide an Overview of the Enhancement Framework
www.itp-consulting.com
Enhancement Framework
SAP is known for delivering business software easily adaptable by customers for their specific needs. Typically the software (for example, mySAP ERP) can be adapted by one of the following techniques:
Customizing (defining system behavior through standard SAP provided mechanism without coding), Enhancement (adding custom code at strategic hook positions provided by SAP) Modification (modifying SAP supplied code directly often called Core-Mod
.
www.itp-consulting.com
Enhancement Framework
Let us first take a look at how the enhancement technique has evolved so far in SAP.
User-Exit is one of the very first mechanisms provided by SAP to execute custom code in between the standard SAP control flow. This is implemented as subroutine call (PERFORM xxx). A classical example for User-Exit is MV45AFZZ include in order processing module of SAP R/3. Though this include object doesnt fall under customer namespace, the object doesnt get overwritten during upgrade. Customer-Exit is better than the user-exit, in the sense that it is implemented using Function Modules and so has a well defined parameter interface. Also since the custom coding done as part of these customer-exits is located away from the original SAP code, the maintenance is easier than user-exits. The BADI-s (Business Add-Ins), as they exist in pre NW04s releases are now called old classic-BADIs. 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-BADIs are implemented using ABAP Objects
www.itp-consulting.com
Enhancement Framework
So what's so cool about this new enhancement technology?
Source Code enhancement
Function Group enhancement Class enhancement Kernel-BADI Enhancement
The first three methods, viz., Source Code enhancement, Function Group enhancement, and Class enhancement are brand new ways to enhance the ABAP system. The final one Kernel-BADI is an improvement of the old classic-BADI now integrated into the Enhancement Framework. Remember that all of these techniques are considered enhancing and not modifying the system.
www.itp-consulting.com
What is a BADI?
Business Add In
Business Add-Ins may be simply defined as an object-oriented extension of the SAP. They consist of special hooks provided by SAP core developers for incorporating customer (or company) specific logic. (BADI Definition) The process of adapting your program according to your specific scenario is known as implementation of the BADI.
BADIs are based upon the concept of object-orientation. The program that incorporates the enhancement option calls a method of a generated BADI class. During the implementation procedure, the customer-specific code is written in the relevant method. The method name is specified via a BADI interface. The name of the interface is of the form IF_EX_BADI, where BADI is the name of the Business Add-In in question. For example, in the case of the HR Add-In HR_INDVAL, the involved interface is IF_EX_HR_INDVAL.
www.itp-consulting.com
What is a BADI?
BADI Architecture in SAP
What's important about this diagram is that it reflects both the definition of a classic BADI as well as its implementation.
www.itp-consulting.com
1.CORE SAP Application developers define an interface for the add-in 2.SAP generates an adapter class for implementing the add-in thus opening a path for customer or partner implementations
www.itp-consulting.com
1.Customer/partner developer creates an interface of the adapter class 2.The interface definition ensures that consistent data is passed to the different add-in implementations 3.Adapter class takes care of calling and filtering out the proper www.itp-consulting.com components
9
What is a BADI?
SAP guarantees upward compatibility of all BADI interfaces BADIs are not a replacement for Customer Exits (already existing exits were not converted to BADIs) Enhancements, interfaces & generated classes all lie in the SAP namespace Implementations lie in the customer/partner namespace and are transportable 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
If an BADI is called frequently, performance problems can occur (No longer an issue with new Kernel BADIs) Customers can create BADIs Creating a BADI within a CMOD project exit can allow multiple developers to share an exit without stepping on each others toes
10
www.itp-consulting.com
11
www.itp-consulting.com
12
www.itp-consulting.com
13
www.itp-consulting.com
14
www.itp-consulting.com
15
www.itp-consulting.com
16
www.itp-consulting.com
17
www.itp-consulting.com
18
www.itp-consulting.com
19
www.itp-consulting.com
20
21
Push button "Multiple selections" button behind field Objects Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_. So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
www.itp-consulting.com
22
www.itp-consulting.com
23
Conclusion
I reviewed the rudiments of Business Add-Ins and their benefits for SAP users and developers. Then, I discussed in detail the steps required in implementing an add-in. I hope this presentation will provide you with some breadcrumbs to help you in adapting standard SAP programs quickly and easily using BADIs!
www.itp-consulting.com
24
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
25
www.itp-consulting.com
26
www.itp-consulting.com
27