Enhancements

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

User Exit : Pre coding (blank coding) block provided by sap in the form of subro

utine.
We can modify the code by two ways.
Eg:
INCLUDE : MV45AFZZ
1. Click on change.
It will ask you the access key, then you need to register the object in sap mar
ket place and it will give you the access key.
2. Click on change.
Go to debugging. In the debugging go to tadir_access_key function module execut
e this function module and change the sy-subrc = 0
then you can add the code by using insert button.
Implicit Enhancement: from ecc onwards sap has provided
Click on Enhance button in the application tool bar then you will see the change
in the screen.
In the menu bar click on Edit. Select Enhancement operations. Select show implic
it enhancement options.
The moment you do it will give you the two lines at the begining and end of the
block to write the code
in between start point and end point lines.
Go to block and right click. Select Enhancement Implementation. Select Create.
Choose type of Enhancement ( Eg: code ). Click on Create.
provide Enhancement Implementation ( Eg: zenh1 )
provide short text ( Eg: test ) and click on ok. save in required package ( don'
t save in local object ).
This time sap has provided a coding place to write the code
( Eg: Enhancement 315 zenh1
Endenhancement).
Now activate the enhancement.
MV45*
- ORDER
MV50*
- DELIVERY
RV60*
- BILLING
If you want to see the user exit.
go to transaction ( Eg: VA01 )
In the menu bar click on System . Status.
Double clickon program.
Click on 11th button in the application tool bar.
Expand include and you can see all the includes
Example:
form Userexit_save_document_prepare
Click on enhance button in the application tool bar.
In the menu bar click on edit. Enhancement operations. Show implicit enhancement
options.
Right click . Enhancement Implementation . Create. Click on code. Click on Creat
e.
Provide Enhancement implementation ( Eg: zenh3 )
provide short text ( Eg: test ) and click on ok.
save in required package and create transport request.
Select the created enhancement ( eg: zenh3 ) and click on ok.
( Enhancement 316 zenh3
BREAK-POINT.
Endenhancement )
Activate.
click on ok.
Execute transaction VA01.

provide the required details to create the sales order.


enter.
save.
The moment you will click on save it will take you to the enhancement zenh3 unde
r userexit_save_document_prepare.
you can check the provided data ( eg: vbak, vbap, vbuk, xvbak, yvbak, cvbak ....
)
xvbak hold the current data
yvbak hold the old data
Enhancement 316 zenh3.
if vbap-matnr is initial.
message 'enter material' type 'E'.
endif.
endenhancement.
Click on activate.
(Pretty printer not work in enhancements)
execute the transaction va01.
provide the details.
if you not provide the material no then it will show you the error message.
if you not use the enhancement then comment the code and activae.
How to find out the user exit.
debugging
later sap has realized that modifying a standard piece of object is not at all g
ood. It leads to so many errors in the product.
Then it come up with a concept of customer exit.
report zbac
dfasf
dasd
dad
perform bcd

mv345fzz
form bcd
endform

Customer Exit
Control is given to the customer in the form of function module.
repor zfds
dsd
dda
kjj
call customer function 001
importing
exporting
flag

exit_blah
include zabcd

MD01 (MRP)
If you want to restrict the MRP Run in few scenarios
How to find out customer exit for particular transaction
Go to SE93
Give the transaction name ( Eg: MD01 )
Click on display
package is MD
Go to SMOD
Click on f4.
click on information system
provide package ( Eg: MD* )

Click on ok.
it will show you the list of exits
you need to select the best suited one
it has two customer exits for md01 provided by sap.
Select M61X0001
click on display
Click on components
it will show you the list of related customer exits
Go to se37
function module ( Eg: EXIT_SAPMM61X_001 )
Click on display
Now to implement
Go to CMOD.
Provide project name ( Eg: zproj )
click on Create.
short text ( mrp run exit )
click on Enhancement assignments and click on yes. Save.
Give the enhancement name : m61x0001
Click on components and click on yes.
Click on change button.
Activate the project .
Double click on required exit
double click on include.
Click on change to write the code.
case user_key.
break-point.
when '001'.
if mt61d-mtart <> 'ABCD'.
No_planning = 'X'.
endif.
Activate the function module.
Now execute the transaction md01.
sap tables:
MODSAP
MODACT

BADI - Classic BADI


New BADI
Enhancement Framework
Business Framework

IDOCS

You might also like