First of all we have to open the program in se38. And follow any of the below step to enable enhancement.
Or click on the spiral like button
Enhancement enabled
Search for implicit enhancement options
It will show all the enhancement positions you can add code. Generally implicit enhancement options are predefined at the following places: Begin/End of an include/ Method/Function Module/Form Routine and End of a structure/Private/Protected/Public Section of a local class .
Now just put the cursor in the lines and right click
Create implementation
Choose enhancement implementation and press create
You can create an enhancement earlier and then select here.
Finally you will get an area to write code. After writing the code activate the enhancement.