SAP Enhancement Framework Guide

July 29, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download SAP Enhancement Framework Guide...

Description

 

Enhancement Framework Advanced Guide

Summary This doc This docume ument nt pro provid vides es a fundam fundament ental al and practi practical cal ove overvi rview ew of SA SAP P Enh Enhanc anceme ement nt Framew Framework ork.. 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 author and publisher have m made ade every reasonable att attempt empt to achieve complete complete accuracy of th the e 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...... Overview.................... ........................... ........................... ............................ ........................... ........................... ....................................... ......................... 3 Business Scenario....... Scenario.................... ........................... ............................ ........................... ........................... ............................ ........................... ........................... ..................................... ......................... 5 Explicit Enhancement...... Enhancement.................... ........................... ........................... ............................ ........................... ........................... ............................ ............................................. ................................. .. 6 Define ENHANC ENHANCEMENT-SEC EMENT-SECTION......... TION....................... ........................... ........................... ............................ ........................... .............................................. ................................. 6 Implement ENHANC ENHANCEMENT-SEC EMENT-SECTION......... TION....................... ............................ ........................... ........................... ............................ ........................... .......................... ............. 9 Define ENHANC ENHANCEMENT-POIN EMENT-POINT............. T.......................... ........................... ........................... ........................... ............................ .............................................. ................................ 13 Implement ENHANC ENHANCEMENT-POIN EMENT-POINT............. T........................... ........................... ........................... ............................ ........................... ........................... .......................... ............ 15 Implicit Enhancement....... Enhancement..................... ............................ ........................... ........................... ............................ ........................... ........................... ............................ ............................... ................. 17 Conclusion................... Conclusion...... ........................... ............................ ........................... ........................... ............................ ........................... ........................... ............................ ................................... ..................... 20  Author Bio................ Bio............................. ........................... ............................ ........................... ........................... ............................ ........................... ........................... ........................................ .......................... 21 Reference..................... Reference....... ............................ ........................... ........................... ............................ ........................... ........................... ........................... ................................................ ................................... 22

 2

 

SAP Enhancement Framework 

Enhancement Framework Overview To appreciation the SAP Enhancement Framework, we have to revisit the history of SAP Enhancement techniques. Initially, there was User Exit (aka Form Exit) which is predominately used in SD. User Exit, in most case, requires registration of object key. This by definition is a modification, instead of an enhancement. Customer Exit was developed to be least invasive to standard codes and can be deactivated at project level. Business Transaction Event (BTE) was developed to cater for 'multiple implementations but without updates' while preserving 'single implementation with updates'. Eventually, came Business Add-in (BADI) an objectoriented enhancement technique with the advantage of multiple implementations and various updates. The disadvantages of earlier techniques are (1) they are implemented as isolated code fragments with least interaction with the standard codes, and (2) the enhancements needs to be pre-defined. With the newer  Enhanc Enha ncem emen entt Fram Framew ewor ork, k, en enha hanc ncem emen ents ts ca can n in inte tera ract ct wi with th the the st stan anda dard rd co code des s di dire rect ctly ly (Exp (Expli lici citt Enhancement) and can be applied without pre-definition (Implicit Enhancement). In addition, Enhancement Framework can be cross-applied to the User Exit, Customer Exit, BADI and BTE. Customer Exit

BTE

BADI

Explicit Enh

Implicit Enh

Program Exit

+

+

+

+

+

Screen Exit

+

-

+

+

+

Mulple Implements

-

+

+

+

-

Replace Standard code

-

-

-

Implicit (non-defnion)

-

-

-

(Enh Point)

+ (Enh Secon)

-

+

 3

 

SAP Enhancement Framework 

Under Und er enhanc enhanceme ement nt framew framework ork’s ’s sou source rce cod code e pl plugug-in, in, there there are Explicit Enhancement Enhancement  an and Implicit Enhancement . Explicit Enhancement is custom codes we can add in the middle of the program code to Enhancement. influence the processing logic (without program modification). Explicit Enhancement is technically termed as Enhanc Enh anceme ement nt Sp Spot. ot. The There re are two types of Enhan Enhancem cement ent Spot, namely: namely: Enhancemen Enhancementt Point, Point, and and Enhancement Section. 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.

Explicit Enhancement (Enhancement Spot) 

Defnion (Type)  - custom codes runs side-byside-by-side side with Point    Enhancement Point the standard codes. Mulple implementaons or the Point is possible but order o execuon is not guaranteed.  - custom codes override the the  standard    Enhancement Secon Secon codes. Only one implementaon or the Secon will run. I 

there there ar are e mu mul lpl ple e im impl pleme ement nta aon ons, s, the the frst frst on one e in alphabecal order will be picked.  Implementaon 

  Implicit Enhancement  Implementaon

 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. Section. The below table shows the current and enhanced report outputs.

Current Report (Sales Order Overview)

Enhanced Report (Sales Item List)

Current Coding It is rea readin ding g from from Sal Sales es header header table. table. Need to change this to Sales item table.

New Coding. (the code area that needs to be replaced needs to be enclosed by ENHANCEMENT SECTION). Then a new implementation needs to be carried out.

5

 

SAP Enhancement Framework 

Explicit Enhancement Define ENHANCEMENT-SECTION  As the business requirement is to replace  the Sales Sales Ord Order er Ove Overvi rview ew wi with th detail detailed ed Sales Sales Item Item Lis List, t, ENHANCEMENT-SECTION. It is important to note: Definition of Enhancement Spot (Section or Point), is done at the " Program Level Level"" – via the context menu “Enhancements/Create “Enhancements/ Create Option”. Option”. Hence, only the Program Owner gets to specify Enhancement Spots. Implementation of Enhancement Spot (Section or Point), is done at ‘Enhancement ‘ Enhancement Mode’ – Mode’ via the context “Enhancement Implementation”. Implementation Innnot ‘Enhancement Mo Mode de’, ’, – we ca cann nnot ot edit editmenu the the ma main in prog progra ram; m; Implementation/ li like kewi wise se at the theCreate " Progr Program am Level Level"" we ”.ca cann ot im impl plem emen entt Enhancement Spot. Additionally, each Enhancement Spot need not belong to the same Package (this is useful when working with Switch Framework).

ENHANCEMENT-SECTION,, right-click the line and select Enhancements/Create Enhancements/ Create To designate a code area as ENHANCEMENT-SECTION Option.. The ABAP editor will prompt for the nam Option ame e of ENHANCEMENT-SECTION ENHANCEMENT-SECTION   an and d it its s pare parent nt ENHANCEMENT-SPOT.. ENHANCEMENT-SPOT

6

 

SAP Enhancement Framework 

Once done, click continue (Green Tick). “ ENHANCEMENT-SECTION ZSD_0001_DISP “ is created under the spot “ENHANCEMENTENHANCEMENT-SPOTS 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 als also o review review in Enhanc Enhanceme ement nt Overvi Overview ew (tcode (tcode:: SE SE20) 20),, the relati relations onship hip of the Spot Spot and its Implementations.

7

 

SAP Enhancement Framework 

We can then move the code that is opened for enhancement into the enclosure ENHANCEM ENHANCEMENTENTSECTION.. END-ENHANCEMENT-SECTION. If this enhancement is implemented, then the default code will be replaced by the new code. code .  As there is no new enhancement im implementation, plementation, the pr program ogram ran as it is.

Subsequently, we decide to enhance the program but not touching the original code (as of the above). We ZSD_0001_DISP). ). 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 “ Enhancement Mode”. 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 ZSD_0001_DISP and  and right-click to select Create Implementat Implementation ion.. Enhancement Implementation/ Implementation/Create

System will prompt for an Implementation Instance Name (i.e. ZSD_0001_DISP_01_ITM )

 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 code..

If we come out of the "Enhancement " Enhancement Mode" Mode" into the "Program "Program Level", Level", the enhancement implementation code is greyed out.

12

 

SAP Enhancement Framework 

Define ENHANCEMENT-POINT If business requirement requirement is to show Sales Order Overview Overview with detailed detailed Sales Item List, ENHANCEMENTPOINT   ne POINT need eds s to be us used. ed. For this this ca case se,, we wi will ll se setu tup p an anot othe herr si simi mila larr prog progra ram m to impl implem emen entt an ENHANCEMENT-POINT for comparison.

 An ENHANCEMENT-P ENHANCEMENT-POINT OINT is also an Explicit Enh Enhancement, ancement, hence needs to be defined. To designate designate a code area as an ENHANCEMENT-POINT ENHANCEMENT-POINT,, right-click the line and select Enhancements/Create Enhancements/Create Option. The  ABAP editor editor will promp promptt for the name of ENHANCEMENT-POINT ENHANCEMENT-POINT and  and its parent ENHANCEMENT-SPOT ENHANCEMENT-SPOT..

13

 

SAP Enhancement Framework 

Once done, click continue (Green Tick). “ ENHANCEMENT-POINT ZSD_0001_ADDS“ is created under the spot “ENHANCEMENTENHANCEMENT-SPOTS SPOTS ZSD_ZTEST889 “. [see Line 19-21]. Note the difference: ENHANCEMENT-POINT ENHANCEMENT-POINT has no ‘enclosure section’ because no code will be replaced.

14

 

SAP Enhancement Framework 

Implement ENHANCEMENT-POINT  After Implementing Implementing the ENHA ENHANCEMENT-P NCEMENT-POINT OINT (with tthe he below custom codes), we can see both the cus custom tom 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.

We can also revi review ew in Enhancement Enhancement Over Overview view (tcode: SE20), the relationship of the Spot and its Implementations.

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 Edit/Enhancement Operations/ Operations/Show Show Implicit Enhancement Options 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 

To implement the enhancement, enter "Enhancement " Enhancement Mode Mode". ". Create Select the Implicit Enhancement line, right-click to select Enhancement Implementation/ Implementation/Create Implementation . Implementation.

System will prompt for an Implementation Instance Name (i.e. ZSD_0001_ENDS_01) ZSD_0001_ENDS_01 )

 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 Enhanc Enh anceme ement nt Fra Framew mework ork.. The framew framework ork is ver very y com compre prehen hensiv sive, e, it encomp encompass asses es of al alll the ear earli lier  er  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 Enhanceme Enhancement nt Frame Framework work and Swit Switch ch Framework Framework,, enhan enhancemen cements ts delivery delivery (from SAP, Part Partners ners or  Customers) because more robust and efficient.

20

 

SAP Enhancement Framework 

 Author Bio 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 Certifica Certi fications tions (S/4 HANA Implemen Implementatio tation n Architect, Architect, S/4 Cloud Cloud Onbo Onboardi arding ng with SAP Activate, Activate, SAP Business Intelligence 7.0).

He holds a Bachelor of Management and a Diploma in IT. He has worked in Banking, Retail and Manufacturing industries, playing both in-house and external consultant role.

He is situated in Singapore and is bilingual in English and Mandarin. He [email protected].. can be contacted at [email protected]

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. SA SAP PH Help elp - Enhan Enhancem cement ent Fra Framew mework ork https://help.sap.com/doc/saphelp_nw75/7.5.5/enUS/94/9cdc40132a8531e10000000a1550b0/frameset.htm

2. SA SAP PH Help elp - Enha Enhance ncemen mentt C Conc oncept ept https://help.sap.com/doc/saphelp_nw75/7.5.5/enUS/94/9cdc40132a8531e10000000a1550b0/frameset.htm

3.

“ERP Made Simple: Simple: : ERP Explai Explained ned in in 80 Pages Pages o orr Les Less” s” https://www.amazon.com/dp/B083C3X8YY

 22

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF