X

BADI vs BAPI vs User Exits vs Customer Exits: Basic Knowledge for SAP Functional Consultants

With this article we would like to open a series of posts that are not directly related to SAP certification but can be very useful in preparing for a job interview. In these posts, we want to write about a variety of questions that you may encounter at interviews for SAP jobs. The idea is to have every post devoted to a particular SAP interview question. Hopefully, our articles can help you in gaining advanced knowledge of SAP and acing your SAP job interview.

Our first article is intended for SAP functional consultants and it will provide some basic information about BADIs, BAPIs, and User Exists. We are sure that most of SAP functional consultants have heard these terms and have an initial understanding of them but still there is a lot of confusion about their purpose and the difference between them. So, let us get started.

What are BADI, BAPI, User Exits, and Customer Exits? What Is The Difference Between Them?

Basically, all of them are programs and they enable us to extend the functionality of an SAP system in order to meet custom requirements of business. It is a good idea to discuss them one by one and then make a comparison.

BADI: Business Add-In

BADIs (Business Add-Ins) are custom enhancements to the standard SAP system. You can insert them into the system to accommodate user requirements that are not very common and should not be present in the standard configuration of SAP. For instance, in a particular industry, you may have a specific requirement in a business process that cannot be covered by the standard functionality of SAP. This requirement can be addressed by creating a special BADI that will implement the missing functionality. BADI provides similar customizing opportunities as Customer Exit but it is more powerful because BADI does not assume a two-level infrastructure (SAP system and customer developments) like Customer ExitBADI allows more complex system infrastructure that can include SAP, country-specific versions, industry solutions, customer developments, and so on.

BAPI: Business Application Programming Interface

BAPI (Business Application Programming Interface) is an interface that provides access to data and processes inside an SAP system. There are two kinds of applications of BAPIs. First, they can be defined as API methods for SAP business object types. Second, they can be defined as interfaces that are implemented outside of an SAP system but can be called from within the SAP system. Functions that are implemented outside of the SAP system can be standardized and made available as BAPIsBAPI is commonly used for setting up a synchronous communication interface between two parties. Technically the communication is enabled by the process called RFC (Remote Function Call). Unlike RFCBAPI are provided by SAP and are standardized in the Business Objects Repository (BOR).

User Exit

User Exit is an ABAP form that is called by SAP standard programs. It is identified with a three character code that tells the SAP system that a custom chunk of code needs to be executed at a predefined point of a standard SAP program. The character codes look like SXX or UXX where XX represents a two-digits number. If a code starts with S letter, it is a standard user exit delivered by SAP. If a code starts with U letter, it is a custom user exit defined by a user. Inside a user exit it is possible to read and change almost any data (local or global) from the host SAP program. Therefore, user exits give you a lot of flexibility but this flexibility comes at a price of the higher risk to make a critical error that would lead to an ABAP dump or inconsistency in database records.

Customer Exit

Customer Exit is an ABAP function that is called by SAP standard programs.  It serves the same purpose as User Exit: enabling users to add their own functionality to the standard SAP transactions. There are several types of Customer Exits: Menu Exits, Screen Exits, Function Module Exits, Field Exits. Unlike User ExitsCustomer Exits are more restrictive in terms of what you can do with them because inside a Customer Exit you can only access and manipulate the parameters specified with keywords import, export, changing, tables. At the same time it is much safer to use Customer Exits than User Exits because the risk to break something or create inconsistent database entries is low.

What Is The Difference Between Them And When Use What?

Probably, some differences between BADIBAPIUser Exits, and Customer Exits are already clear based on the descriptions that we provided above. Nevertheless, let us elaborate a little bit. If you need to enhance the standard functionality of SAP, you should be looking at BADIUser Exits, or Customer Exits. They all are created with the purpose of enabling a convenient plugging of new (custom) functions in the standard SAP programs using predefined ‘hooks’. These three enhancement interfaces offer more or less similar capabilities but BADI is currently the most advanced approach towards creating custom enhancements in the standard SAP functionality. On the other hand, BAPI serves more general purpose and simply provides an interface for accessing data and processes inside an SAP system. One of the most common applications of BAPI is to enable connections between SAP and non-SAP system.

We hope that this post can help to clarify the concepts of BADIBAPIUser Exits, and Customer Exits to functional SAP consultants. Speaking from our experience, this question is often asked at interviews for SAP jobs. If you can provide an answer to this question similar to what we explained in this article, you are most likely will successfully pass that job interview (provided you are doing fine with the rest of the interview 🙂 ). If you have something to say about this question or have any questions, please post your comments using the form below.

 

Cleo Isco: I am a principal SAP consultant at [Confidential] and a founder of ERProof. I run this blog in my spare time to share knowledge and expertise in SAP with the world. I hope that my posts will be helpful and you enjoy reading them!

View Comments (18)

Related Post