We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-abap] How to use ENHANCEMENT-SECTION?

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by Dave Thornburgh (SAP JOAT)
on Sep 9 at 10:05 PM
Terry -

I personally haven't worked with enhancements, but believe I can explain the difference.

With just the Modification Assistant, you are literally changing the code ("file" if you will) of the SAP program. SAP does what it can to preserve this during an upgrade, but if the surrounding context is lost, it can run into trouble. Also, your modification becomes part of the program - it just has fancy comments surrounding it so the Assistant know how to handle it.

With Enhancements, you are actually writing your code in a separate "file" or "include" (whichever terminology you prefer). This code does not become part of the SAP program until compile time. Also, the surrounding context can be radically changed _technically_ - in terms of what specific statements or blocks of statements precede and follow the enhancement spot. SAP has made a commitment that the context will not change _functionally_, that whatever you code in the enhancement spot will continue to be in the right place at the right time. I would hope they do a good job keeping that promise, but I suspect there will be exceptions when parts of the application get seriously redesigned. Also, if I recall correctly, the overarching concept is the "switch and enhancement" concept. To me, that implies that it might be possible to switch your enhancements on and off with little effort, but I'm not sure (there are switch related fields in the enhancement implementation properties). That certainly isn't possible with straight modifications, with or without the assistant.

Also (and this shows my lack of experience) I don't see any evidence of objects registered in SSCR related to enhancements we have developed. There's a chance you were misled on that point.

Dave

---------------Original Message---------------
From: TerryB
Sent: Friday, September 09, 2011 7:58 PM
Subject: How to use ENHANCEMENT-SECTION?

I am trying to educate myself about the Enhancement Framework. I am currently looking into explicit enhancements--enhancement sections in particular. I was intrigued when I read that we can use the statements ENHANCEMENT-SECTION and END-ENHANCEMENT-SECTION to mark off a section of code in a standard SAP program to be REPLACED by code of our design in a source code plug-in.
It appears, however, that we would first need to register the object for change in SSCR, and use Modification Assistant to insert the ENHANCEMENT-SECTION and END-ENHANCEMENT-SECTION statements into the standard SAP code. If that is true, why would we bother with the enhancement section? Since we're already using Modification Assistant to make a mod to the program, we could just do the whole job with Modification Assistant!
I'm hoping that I'm missing something here!
Cheers,
Terry

__.____._
Copyright © 2011 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Mark as helpful
View this online
  
Dave Thornburgh
SAP ABAP Helper

Posted helpful replies on 5 threads in a group to earn a Bronze Achievement
Popular White Papers

In the Spotlight
SAP BusinessObjects: Dashboards and Analytics. Learn more about this Toobox.com Marketplace online course.
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language