WISHSAP

Wish SAP was easy.. As here

Tuesday, April 8, 2014

Enhancement Point - Enhancement Framework

Enhancement point

ENHANCEMENT TECHNIQUE allow to enhance SAP standard application program without actually modifying it i.e., add your own functionality to standard program.

Below Hierarchy tree show complete ENHANCEMENT TECHNIQUES used in sap.

This document is intended to explain Enhancement Point available under Enhancement Framework.

Basic concept of Enhancement Framework:

Enhancement Option:
Ø  Position in repository object where enhancement can be made.
Ø  These Options can be either defined explicitly or exist implicitly.
Ø  Types of Options available
1.       Implicit Enhancement Option -> Defined by  Framework itself
2.       Explicit Enhancement Option  -> Defined explicit by SAP developer

Enhancement Spot: 
   Ø       Container for explicit enhancement options.
                                    Ø       Carry information about position at which enhancement options are created.
                                    Ø Spot are required for creation of
·         New BADI
·         EnhancementPoint
·         EnhancementSection

Note: Implicit Enhancement Option does not need Enhancement spot.

Note: Composite Enhancement Spot are used for semantic grouping of Enhancement Spot.


Ø  One of the explicit enhancement options available which provides option to insert custom code into SAP standard program. At least one Enhancement Spot must be assigned to the enhancement option

Ø  Custom code inserted and SAP standard code will be executed as single program at runtime.

Ø  We can have multiple active implementations for single enhancement point which is not in case of EnhancementSection. All active implementation will be executed in random order.

Syntax:

ENHANCEMENT-POINT P4 SPOTS ZES1 STATIC.   -> Static Enhancement

ENHANCEMENT-POINT P4 SPOTS ZES1.       -> Dynamic Enhancement

Enhancement point can be static or dynamic enhancement.

Static Enhancement Point:

Ø  Intended for data declaration in source code
Ø  Will be executed at runtime only if SWITCH (SWITCH FRAMEWORK) for which program is assigned, is in ACTIVE or STANDBY status.

Dynamic Enhancement Point:

Ø  Intended for Executable code
Ø  Will be executed at runtime only if SWITCH (SWITCH FRAMEWORK) for which program is assigned, is in ACTIVE status
Ø  By default Enhancement options are dynamic (without STATIC addition)

NOTE:
SWITCH  is used to determine whether other components (Repository objects) are visible and used in system. It has three statuses ACTIVE, OFF, STANDBY MODE. Created in T-code SFW1 and status is set in t-code SFW5 using business function. It’s very useful in Enhancement concept.

Procedure to create and implement Enhancement Point:

Task can be divided into two parts:
  1.        Definition of Enhancement Point  -> done by SAP Developer
  2.         Implementation Part                   -> done by SAP Customer
Enhancement point can be defined in any source code including Function Module, Reports, Classes and method etc.
This document explains definition and implementation of Enhancement Point in a Report.
  1.           Definition Part (defined by SAP Developer)
Create a report in T-code SE38.

Place cursor where you want define Enhancement Point and Click on Edit, 
Select Enhancement Operations -> Create 

In pop-up window provide required details


Static Enhancement Point will be defined.

Similarly Create Dynamic Enhancement Point.



Two Enhancement Point will be created.
Activate program.
New program with two Enhancement Point is created.

2. Implementation of  Enhancement Point. (By SAP Customer or Partner)
    
    Enhancement Point can implemented in Display mode of program
    Open program is display mode.


Select the Enhancement-point to implemented
Right click -> Enhancement Operations -> Create implementation







Similar Implement Dynamic Enhancement Point ZEP2.


Note: Enhancement points are not assigned to Switch. So at Runtime Both Static and Dynamic Enhancement will be executed.

Execute the program and observe the Output:





Cheers !! Enhancement point implemented Successfully  J

Interested to know about Enhancement Section, Click on below Link.
WishSap Enhancement Section




2 comments:

  1. It is really helpful.. Thank you..

    ReplyDelete
  2. can you please show how to create foreign key relationship between 2 tables

    ReplyDelete