Badi

BADI


        *  Badi - business add ins.

         *   Custom enhancements to sap functionality.

        *   Enhancement means add functionality to existing function without changing the structure

        *  Badi are implementing using oops technique.

        *   Badi is nothing but an interface.

        *  Each badi consists of the method without implementation called badi definition.

        *  We need to create classes to write the abap code by implementing the methods called Badi implementation.


se18 -- Create Badi definition.

se19 -- Badi implementation.


Steps to create a Badi.

    *   Goto SE18 create enhancement spot and give short description and select package.

            



    *  Then click on create Badi and give name and short description.

                



    *  Goto Interface tab and give interface name.

                    



    *  Give name and double click on interface name then asks to create interface.

    *  Give methods.

                


    * Save and activate and go back to data definition.

     *  Right click on implementation select 'create Badi implementation' and give name and short description for enhancement implementation.

     *  Then give Badi implementation name and short description and class name. Class name automatically created when you start with z.


    *  Then click on implementing class and double click on methods to create implementation and write implementation.

        



        

       * Save and check and activate likewise to implement all methods.

            



  Calling Badi in SE38

        REPORT ZAJAY_BADI_DEMO.

    data obj type REF TO ZAJAY_BADI_DEF_DEMO.
    get badi obj.
    call badi obj->add.
    call badi obj->sub.

   Output:

            







Comments

Popular posts from this blog

New syntax for append- VALUE (new syntax 7.4+) in ABAP

Read statement new syntax in ABAP. (7.4+).

Concatenation new syntax( 7.4+ ).