Finding Kernel BADI using Debugging

 

  • Enhancements SPOT is like a container to the new ( Kernel ) BADI.

  • In the explicit enhancements we saw the Enhancement spot which were used to store the enhancements, In similar manner we have Enhancement SPOT in the new BADI which act like a container for it.

  • We can see kernel BADI’s for the material below.



  • Let’s take a requirement which we will implement to understand this concept more clearly.


Requirement :-

  • While creating a material through MM01 transaction code.



    • We see this screen where we provide the details for the material which will be created.


    • Here we see we have two buttons Additional data and Organization levels.
    • Now my user don’t want that these two buttons should be available here while creating the material.

Finding BADI according to requirement :-

  • There are basically three ways through which we can find our kernel BADI.
  1. Put the break-point on statement - CALL BADI or GET BADI. ( i.e. by using debugging, mostly preferred by the programmers ).
  2. Pass the package name in SE18 transaction code ( Click on F4 help of BADI name-new selection-pass the package name).
  3. Pass the package name in SE84 transaction code ( enhancements-business Addin’s-definition ).

1. Finding the Kernel BADI for our requirement ?

  • Step 1 :- Go to MM01 transaction code.

  • Step 2 :- Put /h so that debugging mode gets on.



  • Step 3 :- Press enter → It will take you to debugging mode.

  • Step 4 :- Click on breakpoints → breakpoint at → breakpoint at Statement.



  • Step 5 :- Write Get BADI and Call BADI and press enter.

  • Step 6 :- Press F8 the debugger will directly stop on the given statement.

  • Step 7 :- Press F8 until, you get this screen.



    • Click on OK button.


  • Step 8 :- We can see here the class BADI_MATERIAL_OD.

    • Here, GET BADI statement used to create the object for the BADI and CALL BADI statement has been used to call the method in the similar way we do in Object Oriented Programming.
    • If I go to this method to see its attributes, I will see that


    • We will see that this method is for set program of integrated processing Routine which is not for our requirement.
  • Step 9 :- Again Press F8.



    • We will see another method PF_STATUS_SETZEN.
  • Step 10 :- If I will go to the attributes of this method.



    • It is Set GUI Status for Integrated Objects which is suitable for our requirement.

  • We will implement it in the next part.

Comments

Popular posts from this blog

Understanding Different Types of SAP Function Modules: Normal, RFC, and Update

Unlocking SAP ABAP Secrets: Interactive Classical Reports with GET CURSOR, At User Command, and a Comparison of HIDE Statements

Mastering ABAP: A Step-by-Step Guide to Function Modules and Groups for Modularized Programming