Documente Academic
Documente Profesional
Documente Cultură
Advanced Guide
Summary
This document provides a fundamental and practical overview of SAP Enhancement Framework. It
documents what is Enhancement Framework, how it is does explicit and implicit enhancement works, by
going through program examples.
Perquisites:
Basic SAP ABAP knowledge is required. SAP terminologies and jargons are applied for brevity.
Disclaimers:
Although the author and publisher have made every reasonable attempt to achieve complete accuracy of the
content, they assume no responsibility for errors or omissions. You should use this information as you see fit,
and at your own risk.
This publication is not affiliated with, sponsored by, or approved by SAP. Any trademarks, service marks,
product names or named features are assumed to be the property of their respective owners, and are used
only for reference.
1
SAP Enhancement Framework
Table of Contents
Enhancement Framework Overview................................................................................................................. 3
Business Scenario............................................................................................................................................ 5
Explicit Enhancement....................................................................................................................................... 6
Define ENHANCEMENT-SECTION.............................................................................................................. 6
Implement ENHANCEMENT-SECTION........................................................................................................ 9
Define ENHANCEMENT-POINT................................................................................................................. 13
Implement ENHANCEMENT-POINT........................................................................................................... 15
Implicit Enhancement...................................................................................................................................... 17
Conclusion...................................................................................................................................................... 20
Author Bio....................................................................................................................................................... 21
Reference....................................................................................................................................................... 22
2
SAP Enhancement Framework
3
SAP Enhancement Framework
Under enhancement framework’s source code plug-in, there are Explicit Enhancement and Implicit
Enhancement. Explicit Enhancement is custom codes we can add in the middle of the program code to
influence the processing logic (without program modification). Explicit Enhancement is technically termed as
Enhancement Spot. There are two types of Enhancement Spot, namely: Enhancement Point, and
Enhancement Section. Implicit Enhancement is custom codes we can add at the beginning or the ending of
the program code. The location of Implicit Enhancement is implied to be at the end (and beginning) of a
program, hence does not need any definition.
4
SAP Enhancement Framework
Business Scenario
In order to explore the framework, we will create two new programs (Z-Program) for Enhancement Section
and Enhancement Point, respectively. In addition, implement an Implicit Enhancement to one of them.
Take for an instance, an established sales order report requires changes to include details of the line items.
This is typically done by changing the whole program. However, to establish a secure way of managing
changes, the main code should not be allowed to be changed, only certain sections should be opened for
development. This can be satisfied by the SAP Enhancement Framework, using either Enhancement Point
or Enhancement Section. The below table shows the current and enhanced report outputs.
Current Report (Sales Order Overview) Enhanced Report (Sales Item List)
5
SAP Enhancement Framework
Explicit Enhancement
Define ENHANCEMENT-SECTION
As the business requirement is to replace the Sales Order Overview with detailed Sales Item List,
ENHANCEMENT-SECTION.
It is important to note: Definition of Enhancement Spot (Section or Point), is done at the " Program Level" –
via the context menu “Enhancements/Create Option”. Hence, only the Program Owner gets to specify
Enhancement Spots. Implementation of Enhancement Spot (Section or Point), is done at ‘Enhancement
Mode’ – via the context menu “Enhancement Implementation/Create Implementation”. In ‘Enhancement
Mode’, we cannot edit the main program; likewise at the "Program Level" we cannot implement
Enhancement Spot. Additionally, each Enhancement Spot need not belong to the same Package (this is
useful when working with Switch Framework).
To designate a code area as ENHANCEMENT-SECTION, right-click the line and select Enhancements/Create
Option. The ABAP editor will prompt for the name of ENHANCEMENT-SECTION and its parent
ENHANCEMENT-SPOT.
6
SAP Enhancement Framework
Once done, click continue (Green Tick). “ENHANCEMENT-SECTION ZSD_0001_DISP“ is created under the
spot “ENHANCEMENT-SPOTS ZSD_ZTEST888“. [see Line 19-21].
The enclosure ENHANCEMENT-SECTION..
END-ENHANCEMENT-SECTION indicates the
code area which can be enhanced during
"enhancement mode".
We can also review in Enhancement Overview (tcode: SE20), the relationship of the Spot and its
Implementations.
7
SAP Enhancement Framework
We can then move the code that is opened for enhancement into the enclosure ENHANCEMENT-
SECTION.. END-ENHANCEMENT-SECTION. If this enhancement is implemented, then the default code will
be replaced by the new code.
As there is no new enhancement implementation, the program ran as it is.
Subsequently, we decide to enhance the program but not touching the original code (as of the above). We
will only alter the allowed section (i.e. ENHANCEMENT-SECTION ZSD_0001_DISP).
8
SAP Enhancement Framework
Implement ENHANCEMENT-SECTION
To implement an enhancement, you need to enter “Enhancement Mode”. This is done by pressing the
“Enhance” Button (or Shift-F4).
Once pressed, the whole ABAP editor is greyed out. This is to show, we are in enhancing mode, we cannot
change the standard code, we can only code in the enhancement area which is not grey (this will be opened
in the next few steps).
9
SAP Enhancement Framework
We can then put our curser on the ENHANCEMENT-SECTION ZSD_0001_DISP and right-click to select
Enhancement Implementation/Create Implementation.
10
SAP Enhancement Framework
System will copy the default code and open up a white area for coding.
11
SAP Enhancement Framework
In the white area, we will recode the output. In this case, we have refine the program display to Sales Order
Item details instead of Sales Order overview.
During runtime, you can see the enhancement code is executed instead of the default code.
12
SAP Enhancement Framework
Define ENHANCEMENT-POINT
If business requirement is to show Sales Order Overview with detailed Sales Item List, ENHANCEMENT-
POINT needs to be used. For this case, we will setup another similar program to implement an
ENHANCEMENT-POINT for comparison.
13
SAP Enhancement Framework
Once done, click continue (Green Tick). “ENHANCEMENT-POINT ZSD_0001_ADDS“ is created under the
spot “ENHANCEMENT-SPOTS ZSD_ZTEST889“. [see Line 19-21].
Note the difference: ENHANCEMENT-POINT has no ‘enclosure section’ because no code will be replaced.
14
SAP Enhancement Framework
Implement ENHANCEMENT-POINT
After Implementing the ENHANCEMENT-POINT (with the below custom codes), we can see both the custom
codes and the standard codes are ran. Both the header level table and the item level table are shown
15
SAP Enhancement Framework
We can continue to add one more Enhancement Points. The result shows both Enhancement Points are ran.
The header level table, item level table and the footer are shown.
16
SAP Enhancement Framework
Implicit Enhancement
If there is no Explicit Enhancement found, we can use Implicit Enhancement.
For Implicit Enhancement, no definition is needed. However, we need to bring up the Implicit Enhancement.
Select menu Edit/Enhancement Operations/Show Implicit Enhancement Options.
Notice a new line is shown at the end of the code [see Line 54]. This is the Implicit Enhancement.
17
SAP Enhancement Framework
18
SAP Enhancement Framework
System will open up a white area for coding. [see Line 56]
We will code a footer line for the program. [see Line 56 – 58].
Footer line is shown at the end of the output.
19
SAP Enhancement Framework
Conclusion
After several iterations of enhancement techniques, SAP finally has developed the state-of-the-art
Enhancement Framework. The framework is very comprehensive, it encompasses of all the earlier
techniques while providing greater flexibility in a secured coding environment. At the same time, SAP comes
with the Switch Framework to centrally administer control the turning on/off functionality (enhancement). With
both Enhancement Framework and Switch Framework, enhancements delivery (from SAP, Partners or
Customers) because more robust and efficient.
20
SAP Enhancement Framework
Author Bio
Benedict Yong is a PMP/ITIL trained Project Consultant with 9+ years Finance domain experience (FICO,
COPA, BPC) and 3+ years of Logistics experiences (SD, MM, PS, CS). He holds four SAP® Functional
Certifications (Financial Accounting, Management Accounting, Sales, Procurement) and three Technical
Certifications (S/4 HANA Implementation Architect, S/4 Cloud Onboarding with SAP Activate, SAP
Business Intelligence 7.0).
For people who are interested to have a holistic understanding of ERP, a PDF document will not be
enough. “ERP Made Simple” at Amazon might prove to be useful.
https://www.amazon.com/dp/B083C3X8YY
21
SAP Enhancement Framework
Reference
1. SAP Help - Enhancement Framework
https://help.sap.com/doc/saphelp_nw75/7.5.5/en-
US/94/9cdc40132a8531e10000000a1550b0/frameset.htm
22