Thursday 10 July 2014

Explicit Enhancement: Enhancement Section

Enhancement Section: If the business process needs to skip some standard code and to execute some custom code on top of it, then Enhancement section is the technique to do so. Enhancement section holds the code that needs to be skipped and the enhancement implementation for the Enhancement section holds the code that needs to be executed as a substitute for the code that are bounded between enhancement section. Let's try this enhancement section technique in a Z program but it really makes sense to apply this technique in a SAP standard program.
----------------------------------------------------------------------------------------------------------------------------------------


Step1. Create a Z program and Execute it.

















Step2. The O/P is as below.















Step3. Select the piece of code that needs to be shipped and then right click/ from the menu option,  navigate along the path to create a Option.









































Step4. Provide a Section name & the Enhancement Spot name & then continue.

















Step5. Now the selected piece code coded are bounded in between the Enhc Section. To Create an enhancement implementation , click on the Spiral icon to enter into the enhancement mode.



















Step6. Put the cursor on the enhancement section and from the menu navigate along the highlighted path to create an enhancement implementation.


















Step7. Provide the implementation name & short text and continue.














Step8. The enhancement implementation holds the code that are there in the enhancement section.



















Step9. Remove the statements that are there in the enhancement implementation and put the required code as an alternate that are there inside the enhancement section. The Enhancement Implementation is inactive. So double click on the Enhancement implementation name.



















Step10. The Enhancement implementation is inactive.













Step11. Activate it and go back.












Step12. The enhancement implementation is active but the main program is inactive. Go back form the enhancement mode.


















Step13. Here activate the main program.























Step14. It's activated. Now execute the program.




















Step15. The below O/P appears. So the code in the enhancement implementation overrides the part that are bounded in the enhancement section.
















Step16. Just a comparison.










---------------------------------------------------------------------------------------------------------------------------------

No comments:

Comments system

Disqus Shortname