Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

difference between userexits and BADIs?

Former Member
0 Likes
916

hi,

what is the difference between userexits and BADI?

difference between BAPI and RFC?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
871

Hi bareddy devi ,

The Differences b/w the USER EXIT and BADI are :

1) BAdi is enhancement with object oriented touch whereas User-Exit is enhancement with normal conventional ABAP coding.

2) SE18 & SE19 are used for BAdi definition & implementation whereas SMOD & CMOD are used to search & implement a project for User-Exit \

3) BAdi can have N number of implementations for the same project whereas User-Exit can have one-and-only single implementation

4) BAdi is global presence in the sense means that implemented exit can also be used for another standard program or tcode whereas it's not possible with user-exit.

.

Why we have to use BADI instead of USER EXIT?

B'coz of points 3 & 4 we opt for BAdi rather than user-exit.

5 REPLIES 5
Read only

Former Member
0 Likes
871

Hi Devi,

In exits we have

1.User Exits

2.Customer Exits

User Exits

User exits are actually empty subroutines that SAP developers provide for you. You can fill them with your own source code.

The original purpose of user exits was to allow the user to avoid modification adjustment.

How User Exits are defined?

The SAP developer creates a special include in a module pool. These includes contain one or more subroutines routines that satisfy the naming convention userexit_.

The calls for these subroutines have already been

implemented in the R/3 program.

Usually global variables are used.

After delivering them, SAP never alters includes created in this manner; if new user exits must be delivered in a new release, they are placed in a new include program

The purpose behind this type of system is to keep all changes well away from program source code and store them in include programs instead.

To this end, SAP developers create various includes that fulfill the naming conventions for programs and function groups.

This naming convention guarantees that SAP developers will not touch this include in the future. For this reason, includes of this nature are not adjusted during modification upgrade.

If any new user exits are delivered by SAP with a new release, then they are bundled into new includes that adhere to the same naming convention.

The last two letters in the name of the include refer to the include that the customer should use: "Z" is usually found here.

Customer Exits

The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.

If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard R/3 applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:

They do not affect standard SAP source code

When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.

They do not affect software updates

When you add new functionality to your SAP System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.

Customer exits are not available for all programs and screens found in the SAP System. You can only use customer exits if they already exist in the SAP System.

There are several different types of customer exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

Menu Exits

Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

Screen Exits

Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

Function Module Exits

Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pulldown menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.

SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. These calls have the following syntax: CALL CUSTOMER-FUNCTION ‘001’.

Business Addins

Business add-ins are enhancements to the standard version of the system. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.

As with customer exits, two different views are available:

· In the definition view, an application programmer defines exit points in a source that allow specific industry sectors, partners, and customers to attach additional coding to standard SAP source code without having to modify the original object.

· In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard solution if one is available.

In contrast to customer exits, Business Add-Ins no longer assume a two-level infrastructure (SAP and customer solutions), but instead allow for a multi-level system landscape (SAP, country-specific versions, industry solutions, partner, customer, and so on). You can create definitions and implementations of Business Add-Ins at any level of the system landscape.

SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.

The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time. In addition, Business Add-Ins can be defined according to filter values. This allows you to differentiate between Add-In implementations using the filter Country or other criteria.

All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard. A single Business Add-In contains all of the interfaces necessary to implement a specific task.

The actual program code is enhanced using ABAP Objects. In order to better understand the enhancement technique behind the Business Add, we recommend reading the section ABAP Objects.

In order to enhance a program, you must first define a Business Add-In. The application developer creates an interface for the add-in. From this, enhancement management creates an adapter class that implements the interface and thus provides the interface for implementation by the customer, partner, and so on. The developer then creates an instance of the adapter class in the application program and calls the corresponding method at the appropriate time.

For each Business Add-In you have one interface and an adapter class that implements this. The interface is implemented by the user.

The generated class (Add-In adapter) has the following tasks:

· Control

The adapter class calls the active implementations.

· Filtering

If a Business Add-In is to be executed only under certain conditions, the adapter class ensures that only certain implementations will be executed.

This concept ensures mutlple use. Any Business Add-In that has been implemented once already can be implemented again by those groups listed to the right of the software chain shown in the above graphic.

Customers can find the enhancements in their system in the Implementation Guide (IMG) and in the component hierarchy. If a customer wishes to use a Business Add-In, he or she first creates an implementation. The customer must implement the methods and the enhancements, and afterwards activate the implementation of the enhancement. The enhancement's active components are then called at runtime.

Normally, a Business Add-In contains an interface and other additional components such as function codes for menu enhancements. In some cases, Business Add-Ins also include enhancements for screens. The enhancement, interface, and generated classes are all located in the appropriate application development namespace. Business Add-In implementations are created in the respective implementation namespace.

Difference between BAPI and RFC?

1.BAPI stands for Business Application Programming Interface.

It is a library of functions that are released to the public

as an interface into an existing SAP system from an external

system.

RFC is the protocol used to call functions in an R/3 system

by a caller external to R/3 or to call programs external to

R/3 from an R/3 system.

Functions can only be called via RFC, if they are tagged as

RFC functions in the SAP development workbench. They are

then called RFC function modules. BAPIs are complete sets of

(BAPI) function modules that model a business application.

When you are familiar with web developments: RFC can be

compared to HTTP and BAPIs are CGI applications.

In other words: A BAPI function is a function module that

can be called remotely using the RFC technology.

2.Bapi's are nothing but RFC enabled function module....... and the main difference b/w RFC & BAPI is that BAPI is maintained in BOR(business object repository)...

3.RFC can have only one instance whereas BAPI can have many.

4.BAPI methods are RFC enabled function modules. The difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call.Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs.BAPI is having all Key fields, methods, interfaces etc.

Reward points if useful

Cheers,

Swamy Kunche

Read only

Former Member
Read only

former_member787646
Contributor
0 Likes
871

Hi,

The difference is that User Exits can be assigned to only one

customer enhancement program, whereas BADIs are reusable.

BADIs are developed based on Object Oriented approach.

Hope it helps you.

Murthy

Read only

Former Member
0 Likes
872

Hi bareddy devi ,

The Differences b/w the USER EXIT and BADI are :

1) BAdi is enhancement with object oriented touch whereas User-Exit is enhancement with normal conventional ABAP coding.

2) SE18 & SE19 are used for BAdi definition & implementation whereas SMOD & CMOD are used to search & implement a project for User-Exit \

3) BAdi can have N number of implementations for the same project whereas User-Exit can have one-and-only single implementation

4) BAdi is global presence in the sense means that implemented exit can also be used for another standard program or tcode whereas it's not possible with user-exit.

.

Why we have to use BADI instead of USER EXIT?

B'coz of points 3 & 4 we opt for BAdi rather than user-exit.

Read only

Former Member