Introduction to Explicit Enhancement
-
Till, our previous part we have seen about Implicit Enhancements, from now on, we will discuss about Explicit Enhancements.
-
In case of Explicit Enhancement, we have a explicit point which can be available at any line in the program.
-
We will write the logic for our Explicit Enhancements using these points and sections.
-
We will discuss the difference between these Enhancements points and Enhancements sections later.
Let’s take a requirement for best understanding of Enhancement Point.
Enhancement Point :-
Requirement :-
-
We create a material using MM01 transaction code.
- When we click on save button, our material will be created and we will get a message for the same.
-
Now, Our Requirement is that, Our Material number must contain any number from 1 to 9.
-
And if does not contains any number from 1 to 9, thee material should not be created and we should be getting a popup message that Material number must contain a number from 1 to 9.
Hint :-
- Since, we are passing material number on the Create Material ( Initial Screen ). So, we PAI event will triggering on the screen for the same.
Solution :-
-
Step 1 :- Click on System of MM01 → Status on Create Material ( MM01 ).
-
Step 2 :- Double Click on the Screen number.
-
Step 3 :- In PAI, we can see we have this Module.
-
Step 4 :- Double click on this module and put a debugger in it.
-
Step 5 :- Now go back to MM01 transaction code and give the details and press enter.
-
Step 6 :- Debugger will hit and we will go to debugger screen where we can see, whatever material we are getting, we will getting it a variable RMMG1.
- Now, we can use this variable for writing our logic for enhancement.
Writing Logic :-
-
Step 1 :- Go the above module in PAI for MM01 screen.
- We will use this enhancement point for writing our logic.
-
Step 2 :- Click on the enhancement point and click on enhance button.
-
Step 3 :- Right click on enhancement point → Enhancement Operations → Create Implementation.
-
Step 4 :- Click on create button.
-
Step 5 :- Click on OK button and double click on it.
-
Step 6 :- We will write the logic here.
Check the Status :-
-
Go to MM01 and try to pass a material which does not contain any number, you will get the message.
- Always undo the implementation after practice.
Comments
Post a Comment