SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Downloaden Sie, um offline zu lesen
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 1
Applies To:
ABAP, SAP NW App Server, SAP NetWeaver, BADI, Enhancement Framework.
Summary
Learn the future of how ABAP systems can be enhanced using the new ‘Enhancement Framework’ available
in SAP NetWeaver 2004s (and thus, mySAP ERP 2005 and mySAP Business Suite 2005 applications).
By : Venky Varadadesigan
Company : SAP Labs, LLC.
Date : 21 Dec 2005
Email : venkata.varadadesigan@sap.com
Table of Contents
Applies To:........................................................................................................................................1
Summary ..........................................................................................................................................1
Table of Contents .............................................................................................................................1
Overview...........................................................................................................................................2
The current state of enhancement ...................................................................................................3
What is Enhancement Framework? .................................................................................................4
Enhancement Framework Technologies..........................................................................................4
Source Code enhancement..........................................................................................................5
Implicit enhancement option .....................................................................................................6
Explicit enhancement option .....................................................................................................6
Function Group enhancement ......................................................................................................7
Class enhancement......................................................................................................................8
Kernel-BADI enhancement...........................................................................................................9
Benefits / Value Proposition ...........................................................................................................11
One final word ................................................................................................................................11
Author Bio.......................................................................................................................................11
Disclaimer & Liability Notice...........................................................................................................12
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Overview
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) or modification (modifying
SAP supplied code directly – often called Core-Mod).
The way the standard SAP system is enhanced just got a lot better with the introduction of ‘Enhancement
Framework’ – a new technology available in the ABAP server of SAP NetWeaver 2004s. The future ABAP
enhancement functionalities starting with this release (and thus mySAP ERP 2005 and mySAP Business
Suite 2005 applications, which are based on this minor release of SAP NetWeaver), will be using this new
framework. (Note: The ABAP edition Sneak Preview of SAP NetWeaver 2004s is available in the
‘Downloads’ area of SDN. You can install this to play around with the new Enhancement Framework tools).
In this article we will see how the new Enhancement Framework brings together all enhancement techniques
under one roof and improves the way SAP software is enhanced with multi-layer support, extensible through
object-oriented inheritance concept, provides more flexible ways to adapt the system that didn’t exist
previously.
The new Enhancement Framework is part of IT Practice: ‘Custom Development’ / IT Scenario: ‘Developing,
Configuring, and Adapting applications’ / Scenario Variant: ‘Creating Business Applications using ABAP’.
Positioning: IT Practice / Scenario for Enhancement Framework
2
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
The current state of enhancement
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 doesn’t
fall under customer namespace, the object doesn’t 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-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.
The roadmap of enhancement techniques
3
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
What is Enhancement Framework?
Enhancement Framework is the new paradigm to bring all enhancement techniques under one roof. It can
also be switched using Switch Framework. The following are different enhancement technologies available
under this framework.
• Source Code Enhancement
• Function Group Enhancement
• Class Enhancement
• Kernel-BADI Enhancement
Semantically related enhancement options are grouped under a ‘Simple Enhancement Spot’. ‘Composite
Enhancement Spot’ contains one or more of Simple and other Composite Enhancement Spots. On the other
hand (implementation side), various related implementation elements are grouped under a ‘Simple
Enhancement Implementation’. A ‘Composite Enhancement Implementation’ can contain one or more of
Simple and other Complex Enhancement Implementations. The important point to note here is these four
entities form the basis of transportable objects in the Enhancement Framework.
Enhancement concept: Defining the relationship
Enhancement Framework Technologies
Enhancement framework tools are tightly integrated into the ABAP workbench. There is a new browser called
Enhancement Information System available in SE80 to centrally manage all the enhancement definitions and
implementations available in the system. The enhancement objects can also be individually managed in the
respective Package under the Repository Browser of SE80.
4
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Enhancement browser integrated into SE80
As mentioned earlier, the four technologies available as part of the Enhancement Framework are,
• 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. Let us look at each
one of these and understand what they are and how and when to use them. Remember that all of these
techniques are considered enhancing and not modifying the system.
Source Code enhancement
Whenever enhancement needs to be incorporated directly into the ABAP source code, this technology shall
be provided. Implementing this technology is also called as Source Code Plug-In. There are two types of
Source Code enhancements possible.
• Implicit enhancement option
• Explicit enhancement option
5
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Note that, in order to implement any of these Source code enhancements, you need to be in the ‘Change
Enhancement mode’ (the spiral icon available in the editor). Technically the source code plug-in
implementations are stored in a separate include program and not as part of the original source program.
Implicit enhancement option
Throughout the ABAP system, enhancement options are automatically available at certain pre-defined places.
Some of the implicit options are:
• At the end of all the programs (Includes, Reports, Function pool, Module pool, etc.), after the last
statement
• At the beginning and end of all FORM subroutines
• At the end of all Function Modules
• At the end of all visibility areas (public, protected and private) of local class
To view all the implicit options available in a source code, choose ‘Edit -> Enhancement Operations -> Show
Implicit Enhancement Options’ from the editor.
Implicit Source Code Enhancement Options
End of Include
Implicit Option
available at the
End of FORM
You don’t need to have an explicitly defined enhancement spot in order to implement these enhancements.
Just position the cursor on any of these implicit points and choose ‘Create Enhancement’ from the menu to
implement it.
Explicit enhancement option
The Implicit enhancement options are provided at specific source code places explicitly by SAP (Note that
these enhancement definitions can also be created by partners and customers in their code).
There are two types of Explicit Enhancement options available. One which can be provided at a specific
place - called Enhancement Point, and another which can be used to replace a set of statements – called
Enhancement Section. For this, we now have two new ABAP statements, viz.
• ENHANCEMENT-POINT
• ENHANCEMENT-SECTION
6
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Explicit Source Code Enhancement Options
When the Enhancement-Section is implemented, only the implementation gets executed and the original code
doesn’t get executed. This is a new technique, which didn’t exist previously in any of the old ways of
enhancing, to exclude any standard SAP code from execution. Because of this, there can be only one active
implementation of an Enhancement-Section. On the other hand, there can be multiple active implementations
of an Enhancement-Point, in which case all the implementations will be executed with no guarantee in the
order of execution.
Function Group enhancement
All application function modules can be enhanced by adding parameters to the standard function module
interface. These parameters must be ‘optional’ in nature, since adding a mandatory parameter will require all
calls to be changed. Additionally any function module that is part of the Central Basis can not be enhanced
(for example: function module ‘POPUP_TO_CONFIRM’). From the menu, choose ‘Function module ->
Enhance interface’ to add optional parameters to a function module.
7
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Enhancing Function Module interface
Think about all the steps that customers currently go through for adding new parameters to a BAPI. Cloning
of BAPI is an option but maintaining and syncing up during upgrade could be a nightmare. Now with a
combination of Function Group enhancement and Source code plug-in, BAPI’s can easily be enhanced to add
new parameters and add custom logic to process those parameters.
Class enhancement
The global Classes and Interfaces can be enhanced as follows:
• Adding optional parameters to existing Methods
• Adding new Methods to the global Class / Interface
• Adding Pre-exit, Post-exit or Overwrite-exit to an existing Method
The Pre and Post exits get executed before and after invoking the respective method. These are achieved by
an automatically generated local class. All methods are stored as part of this local class. (Point to ponder:
Are private and protected attributes accessible from the Pre and Post exits?).
Choose menu option ‘Class -> Enhance’ to add new methods or parameters. Choose menu option ‘Edit ->
Enhancement operations’ to add or delete the Pre/Post/Overwrite exit methods.
8
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Enhancing global Classes / Interfaces
Adding Pre/Post/Overwrite exits
Adding new method
Kernel-BADI enhancement
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). The new
Kernel-BADI takes it to the ABAP language level. Because of this, the new Kernel-BADI’s are much faster
compared to the old classic-BADI’s.
There are two new ABAP statements available now to support the Kernel-BADI’s, namely GET BADI and
CALL BADI.
Example:
data bd_hdl type ref to badi_name.
GET BADI bd_hdl filters filt_1 = ‘VALUE’.
CALL BADI bd_hdl->method
exporting param_1 = 10.
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.
Whereas in the new Kernel-BADI, the active BADI implementations are included into the load of BADI handle
at compile time and the filter criterion are expanded as IF statements. This is the reason the new Kernel-
BADI’s are much faster than classic-BADI’s.
Some of the other new features of Kernel-BADI’s are,
• Improved Filters with complex filter condition editor
• Stateful BADI support and Context based lifetime control
• Possibility to inherit the implementations
• Switchable using Switch Framework
9
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Creating BADI definition in SE80
Since Kernel-BADI is yet another enhancement technology under Enhancement Framework, we need to
create Enhancement Spot in order to hold the BADI definitions. Similarly, the BADI implementations must
also be assigned to Enhancement Implementations. The BADI definition and implementation editors are
integrated into SE80.
Implementing BADI – Filter condition editor
10
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com
Benefits / Value Proposition
By now you would have understood and appreciated the benefits this new technology brings to the table.
Here is the summary.
• All enhancement technologies are now under a single roof of Enhancement Framework, and
integrated into the ABAP workbench. Result: Enhancement is easily manageable.
• The Enhancement Framework can be switched using Switch Framework through package
assignment.
• With new enhancement technologies (like Source Code, Function & Class enhancements), the
options to enhance standard SAP code have increased tremendously. This cuts down on the need to
do Core-mod, which requires more effort than enhancement
• Kernel-BADI’s are much faster compared to the old classic-BADI’s
• Implementing classes of Kernel-BADI’s are re-usable through inheritance
• The lifecycle of BADI implementation instances are better managed through advanced options
(Stateful BADI’s through Context based and reusable instantiation)
• During the upgrade, SPAU_ENH transaction lets you create enhancement implementations to hold
the BADI implementations, which guarantees the Return On Investment (ROI) for the old classic-
BADI implementations.
One final word
With these new enhancement features (especially Implicit source code technology), the enhancement options
are pretty much omnipresent. Like any technology which gives more power to the users of the system, this
technology too if not used properly could lead to disorder. For example, just because more enhancement
options are available it should not be over-used. Customers’ business requirements for the need to adapt
should still be the yard stick.
“With great power comes great responsibility”! So, choose the options wisely. My best-practice
recommendation for the order in which the enhancement options should be considered and used is:
• Use a BADI; if there is no BADI to suite your need then,
• Try to solve it using Explicit Source code, Function and Class enhancements; and,
• Implicit Source code enhancement should be the last option to choose
Of course, if none of the above could solve your adaptation needs and if your business demands it,
modification should be the last option.
Now that the Sneak preview ABAP edition of SAP NetWeaver 2004s is available in SDN Downloads section,
go ahead and try these out to equip and prepare for the future.
Author Bio
Venky Varadadesigan is a Product Manager for SAP NetWeaver with SAP Labs - in charge of
Application Server topics like ABAP (including Web Dynpro for ABAP, Enhancement
Framework, Switch Framework) and Systems (Monitoring & Scheduling). He comes from a
consulting background with rich experience in Exchange Infrastructure and Portal.
Email: venkata.varadadesigan@sap.com
Personal: venkynarayanan@gmail.com
Mobile: 832-287-2135
11
Introducing: “Enhancement Framework”
– The cool new way to enhance your ABAP systems
© 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 12
Disclaimer & Liability Notice
This document may discuss sample coding or other information that does not include SAP official interfaces
and therefore is not supported by SAP. Changes made based on this information are not supported and can
be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods
suggested in this document, and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of
this technical article or code sample, including any liability resulting from incompatibility between the content
within this document and the materials and services offered by SAP. You agree that you will not hold, or seek
to hold, SAP responsible or liable with respect to the content of this document.

Weitere ähnliche Inhalte

Was ist angesagt?

Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantAnkit Sharma
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)Kranthi Kumar
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exitsKranthi Kumar
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questionsKranthi Kumar
 
Call transaction method
Call transaction methodCall transaction method
Call transaction methodKranthi Kumar
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricksKranthi Kumar
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IIAshish Saxena
 
SAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH SoftechSAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH SoftechVikram P Madduri
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantAnkit Sharma
 
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5prakash185645
 
Top 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.comTop 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.combigclasses.com
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questionsPradipta Mohanty
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAPsapdocs. info
 

Was ist angesagt? (20)

Sap User Exit for Functional Consultant
Sap User Exit for Functional ConsultantSap User Exit for Functional Consultant
Sap User Exit for Functional Consultant
 
abap list viewer (alv)
abap list viewer (alv)abap list viewer (alv)
abap list viewer (alv)
 
Bapi step-by-step
Bapi step-by-stepBapi step-by-step
Bapi step-by-step
 
CDS Views.pptx
CDS Views.pptxCDS Views.pptx
CDS Views.pptx
 
Badi document
Badi documentBadi document
Badi document
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
 
1000 solved questions
1000 solved questions1000 solved questions
1000 solved questions
 
Call transaction method
Call transaction methodCall transaction method
Call transaction method
 
Sap sapscripts tips and tricks
Sap sapscripts tips and tricksSap sapscripts tips and tricks
Sap sapscripts tips and tricks
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Technical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part IITechnical Overview of CDS View - SAP HANA Part II
Technical Overview of CDS View - SAP HANA Part II
 
SAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH SoftechSAP ABAP using OOPS - JH Softech
SAP ABAP using OOPS - JH Softech
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Field symbols
Field symbolsField symbols
Field symbols
 
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5
 
Top 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.comTop 10 sap abap faqs-www.bigclasses.com
Top 10 sap abap faqs-www.bigclasses.com
 
Sap abap modularization interview questions
Sap abap modularization interview questionsSap abap modularization interview questions
Sap abap modularization interview questions
 
Sap abap
Sap abapSap abap
Sap abap
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
Sap scripts
Sap scriptsSap scripts
Sap scripts
 

Andere mochten auch

Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction eventsKranthi Kumar
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programsKranthi Kumar
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapKranthi Kumar
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESKranthi Kumar
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...Kranthi Kumar
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esKranthi Kumar
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bteKranthi Kumar
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap materialKranthi Kumar
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answersUttam Agrawal
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_devKranthi Kumar
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddyKranthi Kumar
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answersGarySpeed1234
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easyKranthi Kumar
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsGaruda Trainings
 

Andere mochten auch (19)

Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
 
Exercise in alv
Exercise in alvExercise in alv
Exercise in alv
 
Sp rao abap
Sp rao abapSp rao abap
Sp rao abap
 
Ooabap notes with_programs
Ooabap notes with_programsOoabap notes with_programs
Ooabap notes with_programs
 
Step by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abapStep by step guide to basic web dynpro abap
Step by step guide to basic web dynpro abap
 
Sap abap material
Sap abap materialSap abap material
Sap abap material
 
WEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTESWEBDYPRO ABAP WITH DETAILED NOTES
WEBDYPRO ABAP WITH DETAILED NOTES
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Adding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt esAdding custom fields to the fi report fbl5 n using bt es
Adding custom fields to the fi report fbl5 n using bt es
 
E mail eft remittance using bte
E mail eft remittance using bteE mail eft remittance using bte
E mail eft remittance using bte
 
Crm technical
Crm technicalCrm technical
Crm technical
 
IGROWSOFT abap material
IGROWSOFT abap materialIGROWSOFT abap material
IGROWSOFT abap material
 
Epic abap
Epic  abapEpic  abap
Epic abap
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
Version it satya_dev
Version it satya_devVersion it satya_dev
Version it satya_dev
 
Webdynpro by vijayender_reddy
Webdynpro by vijayender_reddyWebdynpro by vijayender_reddy
Webdynpro by vijayender_reddy
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answers
 
Sap script made easy
Sap script made easySap script made easy
Sap script made easy
 
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda TrainingsSAP ABAP Latest Interview Questions with Answers by Garuda Trainings
SAP ABAP Latest Interview Questions with Answers by Garuda Trainings
 

Ähnlich wie ENHANCEMENT FRAMEWORK

Sap technology & application evolution
Sap technology & application evolutionSap technology & application evolution
Sap technology & application evolutionAshwani Khatri
 
SAP_Enable_Now_Master_Guide_en-US.pdf
SAP_Enable_Now_Master_Guide_en-US.pdfSAP_Enable_Now_Master_Guide_en-US.pdf
SAP_Enable_Now_Master_Guide_en-US.pdfssuser2e8ccd
 
Sap Ui5 Overview | Sap Ui5 Architecture – Features
Sap Ui5 Overview | Sap Ui5 Architecture – FeaturesSap Ui5 Overview | Sap Ui5 Architecture – Features
Sap Ui5 Overview | Sap Ui5 Architecture – FeaturesIQ Online Training
 
Smp agentry sap_framework
Smp agentry sap_frameworkSmp agentry sap_framework
Smp agentry sap_frameworkGanesh Kumar
 
Integrating SAP and Low-Code Plaforms
Integrating SAP and Low-Code PlaformsIntegrating SAP and Low-Code Plaforms
Integrating SAP and Low-Code PlaformsWarren Eiserman
 
Atos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharAtos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharShekhar Bhartiya
 
Introduction to SAP, Systems, Applications
Introduction to SAP, Systems, ApplicationsIntroduction to SAP, Systems, Applications
Introduction to SAP, Systems, ApplicationsMahmoud Tolba
 
Enhancement packages for sap erp what's new in logistics and operations
Enhancement packages for sap erp what's new in logistics and operationsEnhancement packages for sap erp what's new in logistics and operations
Enhancement packages for sap erp what's new in logistics and operationsaminab
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eamNguyen Hai
 
SAP HANA SPS09 - Security
SAP HANA SPS09 - SecuritySAP HANA SPS09 - Security
SAP HANA SPS09 - SecuritySAP Technology
 
Sap enhancement packages
Sap enhancement packagesSap enhancement packages
Sap enhancement packagesJoyce Maina
 
Business function prediction
Business function predictionBusiness function prediction
Business function predictionMukesh Gupta
 
SAP System copy
SAP System copySAP System copy
SAP System copyashish_bbd
 
Sap system copy
Sap system copySap system copy
Sap system copyRaj p
 

Ähnlich wie ENHANCEMENT FRAMEWORK (20)

BC404_EN_Col18.pdf
BC404_EN_Col18.pdfBC404_EN_Col18.pdf
BC404_EN_Col18.pdf
 
Srm 6.0
Srm 6.0Srm 6.0
Srm 6.0
 
Sap technology & application evolution
Sap technology & application evolutionSap technology & application evolution
Sap technology & application evolution
 
SAP_Enable_Now_Master_Guide_en-US.pdf
SAP_Enable_Now_Master_Guide_en-US.pdfSAP_Enable_Now_Master_Guide_en-US.pdf
SAP_Enable_Now_Master_Guide_en-US.pdf
 
Sap Ui5 Overview | Sap Ui5 Architecture – Features
Sap Ui5 Overview | Sap Ui5 Architecture – FeaturesSap Ui5 Overview | Sap Ui5 Architecture – Features
Sap Ui5 Overview | Sap Ui5 Architecture – Features
 
Smp agentry sap_framework
Smp agentry sap_frameworkSmp agentry sap_framework
Smp agentry sap_framework
 
Integrating SAP and Low-Code Plaforms
Integrating SAP and Low-Code PlaformsIntegrating SAP and Low-Code Plaforms
Integrating SAP and Low-Code Plaforms
 
Abap for sd consultatnt
Abap for sd consultatntAbap for sd consultatnt
Abap for sd consultatnt
 
Atos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharAtos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 Shekhar
 
Introduction to SAP, Systems, Applications
Introduction to SAP, Systems, ApplicationsIntroduction to SAP, Systems, Applications
Introduction to SAP, Systems, Applications
 
Enhancement packages for sap erp what's new in logistics and operations
Enhancement packages for sap erp what's new in logistics and operationsEnhancement packages for sap erp what's new in logistics and operations
Enhancement packages for sap erp what's new in logistics and operations
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eam
 
SAP HANA SPS09 - Security
SAP HANA SPS09 - SecuritySAP HANA SPS09 - Security
SAP HANA SPS09 - Security
 
Sap system landscape best practice
Sap system landscape best practiceSap system landscape best practice
Sap system landscape best practice
 
Sap enhancement packages
Sap enhancement packagesSap enhancement packages
Sap enhancement packages
 
SAP Hybris Commerce Technical Upgrade
SAP Hybris Commerce Technical UpgradeSAP Hybris Commerce Technical Upgrade
SAP Hybris Commerce Technical Upgrade
 
Business function prediction
Business function predictionBusiness function prediction
Business function prediction
 
Badi
BadiBadi
Badi
 
SAP System copy
SAP System copySAP System copy
SAP System copy
 
Sap system copy
Sap system copySap system copy
Sap system copy
 

Mehr von Kranthi Kumar

Creating simple comp
Creating simple compCreating simple comp
Creating simple compKranthi Kumar
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programmingKranthi Kumar
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseKranthi Kumar
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)Kranthi Kumar
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsKranthi Kumar
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script formsKranthi Kumar
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configurationKranthi Kumar
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output programKranthi Kumar
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script formsKranthi Kumar
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONKranthi Kumar
 

Mehr von Kranthi Kumar (20)

Dynamic binding
Dynamic bindingDynamic binding
Dynamic binding
 
Data binding
Data bindingData binding
Data binding
 
Creating simple comp
Creating simple compCreating simple comp
Creating simple comp
 
Creating messages
Creating messagesCreating messages
Creating messages
 
Creating a comp
Creating a compCreating a comp
Creating a comp
 
Controllers and context programming
Controllers and context programmingControllers and context programming
Controllers and context programming
 
Context at design
Context at designContext at design
Context at design
 
Binding,context mapping,navigation exercise
Binding,context mapping,navigation exerciseBinding,context mapping,navigation exercise
Binding,context mapping,navigation exercise
 
Alv for web
Alv for webAlv for web
Alv for web
 
Web(abap introduction)
Web(abap introduction)Web(abap introduction)
Web(abap introduction)
 
Abap faq
Abap faqAbap faq
Abap faq
 
control techniques
control techniquescontrol techniques
control techniques
 
Chapter 07 debugging sap scripts
Chapter 07 debugging sap scriptsChapter 07 debugging sap scripts
Chapter 07 debugging sap scripts
 
Chapter 06 printing sap script forms
Chapter 06 printing sap script formsChapter 06 printing sap script forms
Chapter 06 printing sap script forms
 
Chapter 05 sap script - configuration
Chapter 05 sap script - configurationChapter 05 sap script - configuration
Chapter 05 sap script - configuration
 
Chapter 04 sap script - output program
Chapter 04 sap script - output programChapter 04 sap script - output program
Chapter 04 sap script - output program
 
Chapter 02 sap script forms
Chapter 02 sap script formsChapter 02 sap script forms
Chapter 02 sap script forms
 
sap script overview
sap script overviewsap script overview
sap script overview
 
Batch input session
Batch input sessionBatch input session
Batch input session
 
BATCH DATA COMMUNICATION
BATCH DATA COMMUNICATIONBATCH DATA COMMUNICATION
BATCH DATA COMMUNICATION
 

ENHANCEMENT FRAMEWORK

  • 1. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 1 Applies To: ABAP, SAP NW App Server, SAP NetWeaver, BADI, Enhancement Framework. Summary Learn the future of how ABAP systems can be enhanced using the new ‘Enhancement Framework’ available in SAP NetWeaver 2004s (and thus, mySAP ERP 2005 and mySAP Business Suite 2005 applications). By : Venky Varadadesigan Company : SAP Labs, LLC. Date : 21 Dec 2005 Email : venkata.varadadesigan@sap.com Table of Contents Applies To:........................................................................................................................................1 Summary ..........................................................................................................................................1 Table of Contents .............................................................................................................................1 Overview...........................................................................................................................................2 The current state of enhancement ...................................................................................................3 What is Enhancement Framework? .................................................................................................4 Enhancement Framework Technologies..........................................................................................4 Source Code enhancement..........................................................................................................5 Implicit enhancement option .....................................................................................................6 Explicit enhancement option .....................................................................................................6 Function Group enhancement ......................................................................................................7 Class enhancement......................................................................................................................8 Kernel-BADI enhancement...........................................................................................................9 Benefits / Value Proposition ...........................................................................................................11 One final word ................................................................................................................................11 Author Bio.......................................................................................................................................11 Disclaimer & Liability Notice...........................................................................................................12
  • 2. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Overview 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) or modification (modifying SAP supplied code directly – often called Core-Mod). The way the standard SAP system is enhanced just got a lot better with the introduction of ‘Enhancement Framework’ – a new technology available in the ABAP server of SAP NetWeaver 2004s. The future ABAP enhancement functionalities starting with this release (and thus mySAP ERP 2005 and mySAP Business Suite 2005 applications, which are based on this minor release of SAP NetWeaver), will be using this new framework. (Note: The ABAP edition Sneak Preview of SAP NetWeaver 2004s is available in the ‘Downloads’ area of SDN. You can install this to play around with the new Enhancement Framework tools). In this article we will see how the new Enhancement Framework brings together all enhancement techniques under one roof and improves the way SAP software is enhanced with multi-layer support, extensible through object-oriented inheritance concept, provides more flexible ways to adapt the system that didn’t exist previously. The new Enhancement Framework is part of IT Practice: ‘Custom Development’ / IT Scenario: ‘Developing, Configuring, and Adapting applications’ / Scenario Variant: ‘Creating Business Applications using ABAP’. Positioning: IT Practice / Scenario for Enhancement Framework 2
  • 3. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com The current state of enhancement 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 doesn’t fall under customer namespace, the object doesn’t 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-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. The roadmap of enhancement techniques 3
  • 4. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com What is Enhancement Framework? Enhancement Framework is the new paradigm to bring all enhancement techniques under one roof. It can also be switched using Switch Framework. The following are different enhancement technologies available under this framework. • Source Code Enhancement • Function Group Enhancement • Class Enhancement • Kernel-BADI Enhancement Semantically related enhancement options are grouped under a ‘Simple Enhancement Spot’. ‘Composite Enhancement Spot’ contains one or more of Simple and other Composite Enhancement Spots. On the other hand (implementation side), various related implementation elements are grouped under a ‘Simple Enhancement Implementation’. A ‘Composite Enhancement Implementation’ can contain one or more of Simple and other Complex Enhancement Implementations. The important point to note here is these four entities form the basis of transportable objects in the Enhancement Framework. Enhancement concept: Defining the relationship Enhancement Framework Technologies Enhancement framework tools are tightly integrated into the ABAP workbench. There is a new browser called Enhancement Information System available in SE80 to centrally manage all the enhancement definitions and implementations available in the system. The enhancement objects can also be individually managed in the respective Package under the Repository Browser of SE80. 4
  • 5. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Enhancement browser integrated into SE80 As mentioned earlier, the four technologies available as part of the Enhancement Framework are, • 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. Let us look at each one of these and understand what they are and how and when to use them. Remember that all of these techniques are considered enhancing and not modifying the system. Source Code enhancement Whenever enhancement needs to be incorporated directly into the ABAP source code, this technology shall be provided. Implementing this technology is also called as Source Code Plug-In. There are two types of Source Code enhancements possible. • Implicit enhancement option • Explicit enhancement option 5
  • 6. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Note that, in order to implement any of these Source code enhancements, you need to be in the ‘Change Enhancement mode’ (the spiral icon available in the editor). Technically the source code plug-in implementations are stored in a separate include program and not as part of the original source program. Implicit enhancement option Throughout the ABAP system, enhancement options are automatically available at certain pre-defined places. Some of the implicit options are: • At the end of all the programs (Includes, Reports, Function pool, Module pool, etc.), after the last statement • At the beginning and end of all FORM subroutines • At the end of all Function Modules • At the end of all visibility areas (public, protected and private) of local class To view all the implicit options available in a source code, choose ‘Edit -> Enhancement Operations -> Show Implicit Enhancement Options’ from the editor. Implicit Source Code Enhancement Options End of Include Implicit Option available at the End of FORM You don’t need to have an explicitly defined enhancement spot in order to implement these enhancements. Just position the cursor on any of these implicit points and choose ‘Create Enhancement’ from the menu to implement it. Explicit enhancement option The Implicit enhancement options are provided at specific source code places explicitly by SAP (Note that these enhancement definitions can also be created by partners and customers in their code). There are two types of Explicit Enhancement options available. One which can be provided at a specific place - called Enhancement Point, and another which can be used to replace a set of statements – called Enhancement Section. For this, we now have two new ABAP statements, viz. • ENHANCEMENT-POINT • ENHANCEMENT-SECTION 6
  • 7. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Explicit Source Code Enhancement Options When the Enhancement-Section is implemented, only the implementation gets executed and the original code doesn’t get executed. This is a new technique, which didn’t exist previously in any of the old ways of enhancing, to exclude any standard SAP code from execution. Because of this, there can be only one active implementation of an Enhancement-Section. On the other hand, there can be multiple active implementations of an Enhancement-Point, in which case all the implementations will be executed with no guarantee in the order of execution. Function Group enhancement All application function modules can be enhanced by adding parameters to the standard function module interface. These parameters must be ‘optional’ in nature, since adding a mandatory parameter will require all calls to be changed. Additionally any function module that is part of the Central Basis can not be enhanced (for example: function module ‘POPUP_TO_CONFIRM’). From the menu, choose ‘Function module -> Enhance interface’ to add optional parameters to a function module. 7
  • 8. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Enhancing Function Module interface Think about all the steps that customers currently go through for adding new parameters to a BAPI. Cloning of BAPI is an option but maintaining and syncing up during upgrade could be a nightmare. Now with a combination of Function Group enhancement and Source code plug-in, BAPI’s can easily be enhanced to add new parameters and add custom logic to process those parameters. Class enhancement The global Classes and Interfaces can be enhanced as follows: • Adding optional parameters to existing Methods • Adding new Methods to the global Class / Interface • Adding Pre-exit, Post-exit or Overwrite-exit to an existing Method The Pre and Post exits get executed before and after invoking the respective method. These are achieved by an automatically generated local class. All methods are stored as part of this local class. (Point to ponder: Are private and protected attributes accessible from the Pre and Post exits?). Choose menu option ‘Class -> Enhance’ to add new methods or parameters. Choose menu option ‘Edit -> Enhancement operations’ to add or delete the Pre/Post/Overwrite exit methods. 8
  • 9. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Enhancing global Classes / Interfaces Adding Pre/Post/Overwrite exits Adding new method Kernel-BADI enhancement 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). The new Kernel-BADI takes it to the ABAP language level. Because of this, the new Kernel-BADI’s are much faster compared to the old classic-BADI’s. There are two new ABAP statements available now to support the Kernel-BADI’s, namely GET BADI and CALL BADI. Example: data bd_hdl type ref to badi_name. GET BADI bd_hdl filters filt_1 = ‘VALUE’. CALL BADI bd_hdl->method exporting param_1 = 10. 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. Whereas in the new Kernel-BADI, the active BADI implementations are included into the load of BADI handle at compile time and the filter criterion are expanded as IF statements. This is the reason the new Kernel- BADI’s are much faster than classic-BADI’s. Some of the other new features of Kernel-BADI’s are, • Improved Filters with complex filter condition editor • Stateful BADI support and Context based lifetime control • Possibility to inherit the implementations • Switchable using Switch Framework 9
  • 10. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Creating BADI definition in SE80 Since Kernel-BADI is yet another enhancement technology under Enhancement Framework, we need to create Enhancement Spot in order to hold the BADI definitions. Similarly, the BADI implementations must also be assigned to Enhancement Implementations. The BADI definition and implementation editors are integrated into SE80. Implementing BADI – Filter condition editor 10
  • 11. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com Benefits / Value Proposition By now you would have understood and appreciated the benefits this new technology brings to the table. Here is the summary. • All enhancement technologies are now under a single roof of Enhancement Framework, and integrated into the ABAP workbench. Result: Enhancement is easily manageable. • The Enhancement Framework can be switched using Switch Framework through package assignment. • With new enhancement technologies (like Source Code, Function & Class enhancements), the options to enhance standard SAP code have increased tremendously. This cuts down on the need to do Core-mod, which requires more effort than enhancement • Kernel-BADI’s are much faster compared to the old classic-BADI’s • Implementing classes of Kernel-BADI’s are re-usable through inheritance • The lifecycle of BADI implementation instances are better managed through advanced options (Stateful BADI’s through Context based and reusable instantiation) • During the upgrade, SPAU_ENH transaction lets you create enhancement implementations to hold the BADI implementations, which guarantees the Return On Investment (ROI) for the old classic- BADI implementations. One final word With these new enhancement features (especially Implicit source code technology), the enhancement options are pretty much omnipresent. Like any technology which gives more power to the users of the system, this technology too if not used properly could lead to disorder. For example, just because more enhancement options are available it should not be over-used. Customers’ business requirements for the need to adapt should still be the yard stick. “With great power comes great responsibility”! So, choose the options wisely. My best-practice recommendation for the order in which the enhancement options should be considered and used is: • Use a BADI; if there is no BADI to suite your need then, • Try to solve it using Explicit Source code, Function and Class enhancements; and, • Implicit Source code enhancement should be the last option to choose Of course, if none of the above could solve your adaptation needs and if your business demands it, modification should be the last option. Now that the Sneak preview ABAP edition of SAP NetWeaver 2004s is available in SDN Downloads section, go ahead and try these out to equip and prepare for the future. Author Bio Venky Varadadesigan is a Product Manager for SAP NetWeaver with SAP Labs - in charge of Application Server topics like ABAP (including Web Dynpro for ABAP, Enhancement Framework, Switch Framework) and Systems (Monitoring & Scheduling). He comes from a consulting background with rich experience in Exchange Infrastructure and Portal. Email: venkata.varadadesigan@sap.com Personal: venkynarayanan@gmail.com Mobile: 832-287-2135 11
  • 12. Introducing: “Enhancement Framework” – The cool new way to enhance your ABAP systems © 2005 SAP AG The SAP Developer Network: http://sdn.sap.com 12 Disclaimer & Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade. SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk. SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.