Ads

BADI Interview Questions in SAP ABAP

BADI Interview Questions in SAP ABAP

A BAdI is an object-oriented enhancement option, which makes it the most sophisticated enhancement type. The main characteristic of a BAdI is that it provides a mechanism to change the functionality of a well-defined business function without making changes to the delivered source code. Future upgrades of the original business function can be applied without losing the customer-specific enhancements or the need to merge the changes. 

If you want to become a professional and technical blogger practically, read these real-world practical SAP ABAP books. These books will help you to become a more flexible coding developer in future SAP technology.

What is a BADI in SAP?

BADI (Business Add-In) is a new SAP Object Oriented enhancement technique that is used to add our own business functionality to the existing SAP standard functionality. 
BADI follows the Object-Oriented approach to make them reusable. A BADI can be used any number of times whereas standard enhancement techniques can be used only once. 

What is the Difference Between BADI and User Exits in SAP?


Business Add-Ins are a new SAP enhancement technique based on ABAP Objects.


Badi’s allow for a multi-level system landscape (SAP, partner, and customer solutions, as well as country versions, industry solutions, and the like). Business Add-Ins can be created at each level within such a system infrastructure

Some BADI can have multiple independent implementations, which is much better for software deployment as several developers can implement the same BADI independently.

Customer exit implemented in one project cannot be implemented in another.


What are the steps to Developing BADI in SAP?

Enter a BADI name. 

Click on CREATE SE18. 

To define a BADI use Sap Menu -> Tools -> ABAP Workbench -> Utilities -> Business Ad-Ins -> 
Defining BADIs - Attributes
-          Enter a short text 
-          BADI class is automatically created  
-          When a BADI is created, BADI class gets automatically created with the suffix 'CL_EX_' after the first character of the BADI name. 
-          Package: Specifies the Package in which this BADI resides.  
-          Multiple uses: With this option, you can have multiple implementations for the same BADI. 

What are the transaction codes used for BADI?


SE18, When you create a BAdI definition, a class interface will be automatically created and you can define your methods in the interface. The implementation of the methods can be done in the SE19 transaction.

What is the class name for BADI in SAP?

An adapter class with 'CL_EX_' inserted between the first and second characters of the BADI name. 

What is an Interface name for BADI in SAP?

An interface with 'IF_EX_' inserted between the first and second characters of the BADI name
How can find the implementations for the BADIs?

How many ways you can find a BADI?

Method 1:

1. Go to SE 24 transaction, type CL_EXITHANDLER, and then click on display. 

 2. Double click on the GET_INSTANCE method.
3. Put a break-point on class method CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE.
4. Run any transaction on which we won't find the BADI's 

Method 2:

Go to transaction SE84 and click on Enhancements. Then double click on Business Add-Ins. 

3)  Now Press F8, and a list of BADI names will be displayed as shown below. Select the appropriate BADI name and implement it based on the business requirement using the transaction SE19.


Method 3:

Finding the BADI names using the SE18 transaction 

How many types of BADI's in SAP?

1) Multi-use BADI:

With this option, any number of active implementations can be assigned to the same definition BADI. By default, this option is checked. 
If we want the BADI for multiple uses,
If you have multiple-use BADI definitions, the sequence must not play any role.

2) Filter-dependent BADI: 
Using this option we can define the BADI according to the filter values to control the add-in implementation on specific criteria.


What is a Single Implementation for a BADI?

The normal customer enhancement is a BAdI without a filter which is called once. No state has to be kept, so you can use static methods. Such a BAdI is defined in the core or an industry solution and is implemented by a customer.

If the BAdI is a single-use BAdI, that is, it requires exactly one implementation, a default class must be provided by SAP. Otherwise, the GET BADI will raise an exception if this statement is executed before the customer has inserted his or her implementation.

What are the multiple  Implementations for a BADI?

You use a multiple-use BAdI with static methods if no data is kept and many implementations make sense. For example, you can write defined results specified in the interface to different destinations.

What is CL_EXITHANDLER in BADI?

CL_EXITHANDLER is a class using which, we can find the BADI's


What is Get_Instance in BADI?

Get_instance is a method in which BADI's are found.

 How to Implement a BAdI 


To implement the BADI, we have transaction SE19.


How can you implement particular implementations for multiple implementations Badi?


Business Add-Ins may be implemented on the basis of a filter value. If an enhancement for country-specific versions is provided in the standard version, it is likely that different partners will want to implement this enhancement. The individual countries can create and activate their own implementation.

What is filter Dependent BADI?

Business Add-Ins may be implemented on the basis of a filter value. If an enhancement for country-specific versions is provided in the standard version, it is likely that different partners will want to implement this enhancement. The individual countries can create and activate their own implementation. 

What is Kernel BADI in SAP?

We can define multiple BADI definitions under a single Enhancement Spot and also we can define multiple BADI implementations under a single Enhancement implementation.

 What are the Differences Between Classic and New BAdI's in SAP

Classic and new BAdIs differ in a number of features important for migration:
BADI object:

a. In the case of classic BAdIs, you create a BAdI object by calling a factory method and reference it by means of a reference variable of the type of the BAdI interface.

b. In the case of new BadIs, you create a BAdI object with the ABAP statement GET BADI as a handle for the calls of BAdI methods and you reference it with a reference variable of the type of the BAdI. A BADI object is an instance of an internal BAdI class that is invisible to the outside world.

Passing comparison values for the filter.

a. In the case of classic BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.

b. In the case of new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADI statement.
3

What is the GET BADI statement?

This statement generates a new BADI object and sets the BADI reference to the object in a BAdI reference variable BADI. 

This statement has a static and dynamic variant. 
In the case of the static variant, addition TYPE is not declared. The static type of the reference variable BADI must be a BADI. This determines which BADI will be used. 

What is a Fallback Class?


The Fallback option is used if no BAdI implementation with suitable filter conditions and no standard implementation is found.


Conclusion

If you know more about SAP ABAP BADI, please comment below, or share this content to help other developers.


Comments

  1. Thank you for sharing this info with us.
    Keep updating I would like to know more updates on this topic
    Very useful content
    SAP Partner in Mumbai

    ReplyDelete
    Replies
    1. Looking for the best SAP PP Training in Bangalore, then don't delay join IntelliMindz SAP PP Training in Bangalore. Join our SAP PP training to get hands-on training and practice in SAP PP Software. Any Queries call @ 9655877677. IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
      SAP PP in Bangalore
      SAP PP in Chennai
      SAP PP Online Course

      Delete
  2. SAP Consulting Solution and services is a system set up in which users come to seek for the correct solution to the problems that they are facing. Many of such services are provided by McKinsol which is one of the SAP Consulting Companies, we have a lot of people who gives solutions and advice on SAP systems.

    ReplyDelete
  3. I’m not that much of an internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your website to come back down the road sap training in hyderabad

    ReplyDelete
  4. Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject!
    Definition of SAP

    ReplyDelete
  5. This post is extremely radiant. I extremely like this post. It is outstanding amongst other posts that I’ve read in quite a while. Much obliged for this better than average post. I truly value it! sap institutes in hyderabad with placements

    ReplyDelete
  6. Appreciate you sharing, great article.Much thanks again. Really Cool.
    SAP ABAP online training
    SAP ABAP training

    ReplyDelete
  7. Thank you for sharing an amazing & wonderful blog. This content is very useful, informative and valuable in order to enhance knowledge. Keep sharing this type of content with us & keep updating us with new blogs. Apart from this, if anyone who wants to join the SAP Training institute in Delhi, you can contact 7827519649 or Mail us info@saptrainingdelhi.com
    https://saptrainingdelhi.com/

    ReplyDelete
  8. We will also offer some advance customized programs based on your company's requirements and job requirements. Get best sap training in Kochiat an affordable price.
    Thank You!!

    ReplyDelete
  9. If you're in search of the best Manual Testing Institute in Noida, APTRON Solutions Noida is your go-to destination. With industry-expert instructors, a comprehensive curriculum, top-notch facilities, hands-on training, placement assistance, and flexible learning options, we are committed to helping you launch a successful career in manual testing. Join us today and embark on a journey towards excellence in the IT industry. Your future in manual testing starts here at APTRON Solutions Noida!

    ReplyDelete
  10. The state-of-the-art infrastructure and experienced trainers at APTRON create an ideal environment for mastering SAP SD, making it the go-to destination for individuals seeking a competitive edge in the dynamic world of ERP. Elevate your career with APTRON's ERP SAP SD Course in Gurgaon and unlock a world of opportunities in the realm of SAP and enterprise solutions.

    ReplyDelete

Post a Comment

Popular posts from this blog

Sample SAP ABAP Programming Examples for Practice

Module Pool Programming Interview Questions and Answers in SAP ABAP

Step by Step tutorial on BDC Session Method Program in SAP ABAP

SAP ABAP Interview Questions and Answers for 10 Years Experienced