How To Implement A BADI in SAP ABAP With Tutorial
How To Implement A BADI in SAP ABAP With Tutorial
The Requirement is to put a information message while creating a material if Material Group
is A05 and Division is: 02.
(Why can’t we use field exit ?? : As it needs two information for the material and user wants
information message while saving the material. we can’t use field exit for this).
Step 1:
Put the break- point into Class CL_EXITHANDLER’s GET_INSTANCE method in SE24.
Go to transaction code MM01 , create a material and try to save it. it stops at many location
with different values of EXIT_NAME. (After checking into Se18 we got the
BADI_MATERIAL_CHECK which can be use for our requirement.
Step 2:
Step 3:
Step 4:
Double click on the method CHECK_DATA.If you notice the input parameters we have
many data related to batch , material and storage location etc..
For our requirement we need material group and devision Which exist in WMARA.Put the
below code inside the method then activate the class and method.
Step 5:
So now it’s the time to Disco !!!!!!!Upsssss Sorry it’s the time to test this BADI.
Click on the ENTER Button and from the view select BASIC DATA 1.