139693178 Enhancement Framework

Embed Size (px)

DESCRIPTION

6iyigiy

Citation preview

  • Enhancement Framework

    Enhancement Framework.ppt

    Agenda

    IntroductionComponentsEnhancement OptionsExplicit Enhancement OptionImplicit Enhancement OptionEnhancement SpotsEnhancement Implementations

    - * -Enhancement Framework.ppt

    Introduction to Enhancement Framework

    - * -Enhancement Framework.ppt

    Current options available for EnhancementsUser-Exits: 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. Customer Exits: 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. (Before 4.6, only through customer-exits)BADIs: It 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.

    - * -Enhancement Framework.ppt

    Evolutions of SAP Enhancement Technology

    - * -Enhancement Framework.ppt

    Drawbacks of previous Enhancement TechniquesNo support for multiple users or projectsNo support for parallel developmentsWill appear much more often in adjustment toolsHigher adjustment effort (during upgrade & SP import)

    - * -Enhancement Framework.ppt

    What is Enhancement FrameworkNew enhancement concept in SAP. Released from SAP NetWeaver 7.0Replace or incorporate the existing enhancement and modification concepts (solve the issues with the previous concepts).Enables the integration of different concepts for modifying and enhancing development objects. The enhancements of the enhancement concept can be switched on/off using the Switch Framework.

    - * -Enhancement Framework.ppt

    Different components of the Enhancement FrameworkThe enhancement framework consists of three higher level components :Enhancement Option - Are positions in Repository objects where enhancements can be made. These options are either explicitly defined (by the developer) or exist implicitly.

    Enhancement Spots - The enhancement spots are used to manage explicit enhancement options. Enhancement spots carry information about the positions at which enhancement options were created.

    Enhancement Implementation - The enhancement implementations manage the enhancements of the enhancement options, both explicitly and implicitly.

    - * -Enhancement Framework.ppt

    Enhancement Options

    - * -Enhancement Framework.ppt

    Types of Enhancement OptionsEnhancement options can be classified into two categories :Explicit Enhancement OptionImplicit Enhancement OptionAre defined explicitly by the developer.Managed using enhancement spotsEnhanced using enhancement implementationsAre of two types :Source code plug-inKernel BADI (or new BADI)Always exist and do not have to specified by developerNo enhancement spots are neededEnhanced using Enhancement ImplementationsAre of three types :Specific options in programsParameter interfaces of function modulesMethods of classes

    - * -Enhancement Framework.ppt

    Enhancement Spots

    - * -Enhancement Framework.ppt

    What are Enhancement SpotsEnhancement spots are created to manage explicit enhancement optionsAn explicit enhancement option is always referenced using spot name and option nameAn enhancement spot can contain multiple enhancement optionsAn enhancement option can be assigned to multiple enhancement spots.A composite enhancement spot can hold multiple simple enhancement spots.Spots are always provided by the application developerNo spots are required for implicit enhancement options

    - * -Enhancement Framework.ppt

    Enhancement Implementation

    - * -Enhancement Framework.ppt

    What is an Enhancement ImplementationUsed to manage enhancementsEnhancement Implementations are created by the customerAn enhancement can/must be a part of only one enhancement implementationAn enhancement implementation can contain multiple enhancementsAn individual enhancement inside an implementation is known as an enhancement implementation element.An enhancement implementation element for a explicit enhancement option must be associated with an enhancement spot.A composite enhancement option can contain multiple simple enhancement options.

    - * -Enhancement Framework.ppt

    Representation of Spot and Implementation

    - * -Enhancement Framework.ppt

    Explicit Options

    - * -Enhancement Framework.ppt

    Source Code Plug-inThe following enhancement options are available in the source code:Enhancement - Point Can be static (data declaration) or dynamic (coding).Used as a place holder to place additional coding.Can belong to multiple enhancement spotsMultiple active implementations possible and will be executed with no guarantee in the order of execution.

    Enhancement SectionCan be static or dynamicUsed to modify / replace a certain section of code. Only one is active at a time.Can belong to multiple enhancement spots.Implementation gets executed and the original code does not gets executed.

    - * -Enhancement Framework.ppt

    Source Code Plug - in Editor ModesCreating enhancement options Use the Change mode for creating enhancement points or sectionsUse the button to switch between change display modes

    Implementing enhancement options Use the Enhancement mode to create implementationsUse the button to get into the enhancement mode.

    Use the button to leave the enhancement mode.

    - * -Enhancement Framework.ppt

    Demos for Explicit Enhancement Options

    Demo for Enhancement Point

    Demo for Enhancement Section:

    Before Implementation

    After Implementation

    - * -Enhancement Framework.ppt

    BADI Enhancement OptionWhat are BADIs ?Business Add InsIs an anticipated point of exception these points act like sockets and exist in the original codinghas well defined interface in contrast to source code plug-ins and is more stable to changes in the original code

    Kernel BADIs New FeaturesCan be switched by switch frameworkIntegrated directly in the ABAP language runtimeImproved filter support (non-character filter types) Enable Reusable Implementations Stateful BADIControl lifetime of Implementations BADI-Context

    - * -Enhancement Framework.ppt

    BADI Enhancement Option - ComparisonThe new BADI has several advantages over the classic BADIsClassic BADINew BADI

    - * -Enhancement Framework.ppt

    Demo for Kernel BADI

    Creation of Enhancement Spot fro BADI

    Creation of Enhancement Implementation for BADI

    Call of the BADI from the program

    - * -Enhancement Framework.ppt

    Implicit Options

    - * -Enhancement Framework.ppt

    Source code (Specified points) options :These are enhancement options at predefined points in a program :At the end of an IncludeAt the end of a private, public or a static section of a classAt the end of an implementation for a classAt the end of an interface definitionAt the end of structure definitionsAt the start of a procedure (Subroutine, Method, Function)At the end of a procedureAt the end of parameter set of a method (Changing, Importing, Exporting)Demo for Implicit Enhancement of Subroutine

    Implicit enhancement options always exist and no enhancement spot is assigned to them.

    - * -Enhancement Framework.ppt

    Parameter Enhancement OptionThe parameter enhancement option provides an option to add new parameters to a function module interfaceThe parameters are always optional.The added parameters can be utilized by making other enhancement implementations in the source code.Demo for Parameter enhancement option for Function Module

    - * -Enhancement Framework.ppt

    Class Enhancement OptionUsing the class enhancement options you can :Add new methods to a class / interfaceAdd new attributes (Public / Private / Protected)Add pre or post methods to an existing methodDemo for Class Enhancement Option

    - * -Enhancement Framework.ppt

    Copyright 2008 Deloitte Development LLC. All rights reserved.

    *Classic BADIs :selecting implementations and issuing calls ismixed upcalls cause DB accesscalls are redirected over a proxy class

    Kernel BADIs:selection occurs when the handle is requestedno DB access during runtimeImplementations are called directly (without a proxy)Active implementations are evaluated at compile timeand included in the load of the BAdI-handle.