Enhancement Section
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 Section 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
Note: Implicit Enhancement Option does not need Enhancement spot.
Note: Composite Enhancement Spot are used for semantic grouping of Enhancement Spot.
NOTE:
Enhancement section S4 definition created along with Enhancement Spot ZES2.
Similar created Static Enhancement section.
Ø Provide Implementation name.
ENHANCEMENT SECTION
Ø Provides option to
replace a piece source code in SAP standard program with custom code
Ø Custom code inserted will be executed instead of standard source code at run-time.
Ø We can have multiple implementations for single Enhancement Section but only one implementation can be active at given time and only that particular implementation will be executed at run-time.
Ø Nested enhancements
are not supported, i.e., Enhancement section cannot be defined inside another
Enhancement section definition.
Syntax:
ENHANCEMENT-SECTION S4 SPOTS ZES2 STATIC . -> Static Enhancement
** Standard Source code to be replaced
END-ENHANCEMENT-SECTION.
ENHANCEMENT-SECTION S5 SPOTS ZES2 . -> Dynamic Enhancement
** Standard Source code to be replaced
END-ENHANCEMENT-SECTION.
ENHANCEMENT-SECTION S5 SPOTS ZES2 . -> Dynamic Enhancement
** Standard Source code to be replaced
END-ENHANCEMENT-SECTION.
END-ENHANCEMENT-SECTION.
Enhancement Section and 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 run-time only if SWITCH (Switch Framework) for which program is assigned, is in ACTIVE status
Ø By default Enhancement options are dynamic (without STATIC addition)
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 Section:
Task can be divided into two parts:
- Definition of Enhancement Section -> done by SAP Developer
- Implementation Section -> done by SAP Customer
This document explains definition and implementation of Enhancement Section in a Report.
Similar created Static Enhancement section.
Activate program.
New program with two Enhancement Section is created.
2. Implementation of Enhancement Section. (By SAP Customer or Partner)
Enhancement Section can implemented in Display mode of program
Open program is display mode.
Ø
Place your cursor on
Section which is to be implemented and Right click -> Enhancement Operations
-> Create implementation
Ø
Within
Implementation, required code can be written.
After Activation, Test the Report.
So Section S4 implementation successfully, Similar implement other section S5 also.
After Activation, Test the Report.
Cheers!! Enhancement sections
are defined and implemented successfully J
Good one...
ReplyDelete