Wednesday, May 25, 2016

User Exit - Implicit Enhancement


User exit is a classic concept. User exit is a blank code block in the form of subroutine which lies in a standard program (perform-endform). Now to write our own piece of code we shall need access key for the standard program. Modifying standard program will not be a good idea because SAP will not provide any support if any bugs are found.

From ECC 6 onwards SAP has implemented enhancement point, the implicit enhancement. By using implicit enhancement we can write our own code into a coding block. We can write our own code into a standard program or any function module or any include program also. The code block will be under a subroutine (perform – endform). Now our piece of code will be under Enhancement – Endenhancement block which is under that perform.

The enhancement must be created under a package & transport request. Any local object will not be accepted here because SAP system wants to take the versions of this enhancement.

With implicit enhancement we can create our custom code into a function module, include or standard program where the ENHANCE (coin) button exits. Now in the following example we have discussed a step by step approach to make an implicit enhancement. Here we have taken a standard include program of order. We have a format of standard include programs.
a.       MV45* - it relates with Order
b.      MV50* - it relates with Delivery
c.       RV60* - it relates with Billing

1.    Go to VA01 (Create Sales Order) transaction. Go to system > status.

2.    Double click on the program SAPMV45A and go to include program MV45AFZZ. 

3.    We have a subroutine USEREXIT_SAVE_DOCUMENT_PREPARE. When we prepare a sales document and then press SAVE button, this subroutine comes into the picture (get help by searching or functional consultant). Click on the Enhancement (coin) button with keeping the cursor on the subroutine. 

4.    After clicking there we see the spot sign comes to every line.

5.    Now keep the cursor inside the subroutine and go to Edit > Enhancement Operation > Show implicit enhancement options.

6.    Now we see that a sign (””””””) comes into every subroutines’ starting and ending line. It means we are now ready to write code inside there.

7.    After that put the cursor on that sign and right click > Enhancement Implementation > Create.

8.    Now choose Enhancement mode -> CODE because we just want to code (we are not going to declare any data or structure here).

9.    Click on the create button. 


10.    Give the name Enhancement Implementation (ZENHT in this case) and short text also. 


11.    Keep it inside a package and transport request. 



12.    Now we see at the last position we have our own enhancement which has been implemented. 


13.    Now we can write our piece of code inside Enhancement – Endenhancement. Here 315 is the implemented enhancement number and ZENHT is our given name.

14.    Now we have written our custom code. If there is no material declared then an information message will be displayed. After that save > check > and activate by clicking on Enhancement button. Pretty Printer will not work here.

15.    Now go to VA01 again and try to create a sales order without entering any material. Whenever we click on SAVE button, an information message will be displayed as follows.

13 comments:

simashree said...

Thank you for such guidance about astrology,Best Blog on Astrology Services in Chennai

Wafi Farreedun said...

Nice tutorial. Does this enhancement gets triggered when we open VA01 pls?

Wafi Farreedun said...

Nice tutorial. Does this enhancement gets triggered when we open VA01 pls?

Bhavya Kumar said...

Best blog.Got to learn new things.Thanks for this Blog SAP Success Factors Training in Chennai

Rahul said...

Well explained. Got to learn new things from your Blog on Appium.
Appium training in chennai

Shalini said...

Hi, This is shalini from Chennai learned SAP Training in Chennai from mr.karthick. The training really was good and i got selected in leading mnc company as SAP Consultant.

You can contact 8122241286 for Best SAP Training in Chennai or reach www.thecreatingexperts.com

sanayamohit said...

SAP Success Factors Real Time Hands on Training in Chennai...

Don't always Depend on Training Institute Alone and so please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer over SAP Success Factors Means??? Please ready for an DEMO From the Trainer MR.Karthick
CONTACT:8122241286

Both Classroom/Online Training is Available!!!!!!

Shruti Ramalingam said...

From My search…Creating Experts provides Best SAP Training with real time projects assistance.

Most of the modules are equipped with advance level topics which the student can learn from the basics to the advance level stage.

They also provide placement assistance in leading MNC companies across the globe according to the current requirements.

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

And these are the Best SAP training institute which provides Real Time Hands on Training…

codedion Technologies-9003085882

creating Experts-8122241286

http://thecreatingexperts.com/sap-mm-training-in-chennai/

dinesh said...

SAP Success Factors Real Time Hands on Training in Chennai…

Don’t always Depend on Training Institute alone.Please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer in SAP Success Factors??? Then be ready for a DEMO From the Trainer MR.Karthick
CONTACT:8122241286
http://thecreatingexperts.com/sap-mm-training-in-chennai/

Both Classroom/Online Training is Available!!!!!!

Keerthi Suresh said...

SAP Success Factors Real Time Hands on Training in Chennai…

Don’t always Depend on Training Institute alone.Please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer in SAP Success Factors??? Then be ready for a DEMO From the Trainer MR.Karthick
CONTACT:8122241286
http://thecreatingexperts.com/sap-mm-training-in-chennai/

Both Classroom/Online Training is Available!!!!!!

sameera sam said...



It's so nice article thank you for sharing a valuable content
Sap Online Access

gilledashivani said...

Great information. the information provided is of great use as i got to learn new things. If you are looking for real time training in SAP ABAP, kindly contact sieve software
Sieve software offers real time training by industry experts with live projects and placement support.
SAP ABAP TRAINING IN HYDERABAD

sourav rai said...

i have a question , if this include or module goes under up-gradation, will this condition work fine, or it will fail , i am fresher so i dont have very much clarity so kindly enlighten me