Global multiple inheritance using parameters.

* Multiple inheritance is possible through interfaces.

Steps to create global interfaces. 

Create interface 1.

    1. Goto T-code SE24.

     2. Give name and click on create, select interface and press enter.

     3. Give description, Press enter.

    4. Give method name, level, description. 


    
5. Save and activate.

    6. Click on parameters and give parameters.

    


    
7. Save and activate and go back.

Create interface 2.

    1. Goto T-code SE24.

     2. Give name and click on create, select interface and press enter.

     3. Give description, Press enter.


    4. Give method name, level, description. 



     
5. Save and activate.

    6. Click on parameters and give parameters.

    



    
7. Save and activate and go back.

Create class for 2 interfaces.

    1. Goto SE24.

    2. Give class name and click on create and give short description and click on save.

    


    
3. Goto interface tab and give interfaces and press enter.

    


    4. Goto methods tab and double click on method and write logic.

        * Double clicks on delivery method.

         METHOD zab_if_mi_delivery~delivery.

        SELECT SINGLE erzet
                erdat
                vbtyp
                ernam
                FROM likp
                INTO perzet,perdatpvbtyppernam )
                WHERE vbeln EQ pvbeln.
      ENDMETHOD.

     * Double clicks on sales method.
      METHOD zab_if_mi_sales~sales.
        SELECT SINGLE erzet
                erdat
                vbtyp
                ernam
                FROM vbak
                INTO perzet,perdatpvbtyppernam )
                WHERE vbeln EQ pvbeln.
      ENDMETHOD.
    5. Check and activate and execute.

case1 - Delivery
Input


Output


case2 - Sale
Input

Output

****************************Thank you ****************************

Comments

Popular posts from this blog

Pf status and user command in factory method - OOPS ALV in ABAP

fetch the data from table and send an email in ABAP

Enhancements in abap