0% found this document useful (0 votes)
272 views8 pages

BAPI VS BADI in SAP

BAPI and BADI are both extension techniques in SAP. BAPI stands for Business Application Programming Interface and provides access to business data and processes through defined interfaces. BADI stands for Business Add-In and allows custom code to be added to existing SAP functionality. While BAPIs focus on integration, BADIs are used for extension. The document discusses the key differences and usage of BAPIs and BADIs in SAP systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views8 pages

BAPI VS BADI in SAP

BAPI and BADI are both extension techniques in SAP. BAPI stands for Business Application Programming Interface and provides access to business data and processes through defined interfaces. BADI stands for Business Add-In and allows custom code to be added to existing SAP functionality. While BAPIs focus on integration, BADIs are used for extension. The document discusses the key differences and usage of BAPIs and BADIs in SAP systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

1

BAPI VS
BADI
IN SAP

Phone/Whatsapp: +1 (515) 309-7846 (USA)


Email: info@zarantech.com
Website: www.zarantech.com
1 1

A BAPI is a point of entry to the System- that is, a point at which provides access to business data
and processes.
Each object in a BOR can have many methods, one or more of which can be implemented as
BAPIs.
BAPIs can have various functions:
Create an object
Retrieving the attributes of an object
Changing the attributes of an object
A BAPI is an interface that can be used for various applications: - Internet Application
Components, which make individual R/3 functions available on the Internet or an intranet for
users with no R/3 experience.
R/3 Components compositions, which allows communication between the business objects of
different R/3components(applications).
Visual Basic/JAVA/C++ - external clients (for ex- alternative GUIs) that can access business data
and processes directly.
BAPI EXPLORER:
We can display more information on business objects and the BAPIs that belong to them using
the BAPI Explorer Information.
If we expand a sub-tree for a business object in the BAPI Explorer, the system displays
the following:
Key Attributes: This provide an unique identifier for each business object.
Instance-specified Methods: These are the methods that are bound to the instance identified
by the key attributes.
Non-Instance Specified Methods: These can be called by all instances of an object type.
If we expand a substructure for a method,the system returns the names of its import and export
parameters. We can obtain more detailed information on the typing of interface parameters by
choosing the TOOLS tab, then choosing the ABAP Dictionary. BAPI interface parameters are
always typed using ABAP Dictionary types.
BAPIs usually have an export parameter called RETURN.This can be a structure or an internal
table.The return parameter contains information on errors that occurred while the BAPI was
being processed.There are no exceptions for BAPIs.
To display complete information on a business object type, use the Business Object Builder
tool.The system displays a tree structure for the business objects type, including non-API
methods.
To search for an business object use the Business Object Repository(BOR) tool.This tool
displays the component hierarchy with all the business objects that belongs to it.
STANDARD BAPIs
BAPIs with standardized names contains standard methods.Three of the most important are
listed :
GetList: Returns the contents of the key fields for the object we have chosen.
GetDetail: Returns detailed in formations for the required object.
CreateFromData: Create a new object in the R/3 and returns information about it.
BAPI : Exception Handling
Every BAPI contains an interface parameter, RETURN which contains information about errors
that occurs.This parameter is always of an ABAP Dictionary type. This means that we must
include a structure of an identical type in our program.

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
1 1

Comments

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
1 1

BADI (Business Add-In) is a new SAP Object Oriented enhancement technique which is used to
add our own business functionality to the existing SAP standard functionality.
BADI's are available in SAP R/3 from the system release 4.6c
Why BADI?

In contrast to the earlier enhancement techniques, BADI follows Object Oriented approach to
make them reusable. A BADI can be used any number of times where as standard enhancement
techniques can be used only once.
For example if we assign an enhancement to one custom project, then that enhancement cannot
be assigned to any other custom projects. To overcome this drawback SAP has provided a new
enhancement technique called BADI.
Transaction code for BADI Definition:

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 SE19
transaction.
When a BAdi is created following are automatically generated:

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

Transaction code to Implement BADI:


SE19
Types of BADI's:

While creating a BADI using the T-code SE18, it provides the pop-up screen to select the type of
BADI to be used is as shown below.

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
1 1

There are two types of BADI's.


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 use

If you have multiple-use BADI definitions, the sequence must not play any role.
The drawback in Multiple use BADI is, it is not possible to know which BADI is active especially
in country specific version.
2) Filter dependent BADI:

Using this option we can define the BADI's according to the filter values to control the add-in
implementation on specific criteria.
Ex: Specific country value.

How to Find BADI's in SAP system:


Method 1:

Steps to find BADI:


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

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
1 1

2. Double click on 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 want find the BADI's say VA01.

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
1 1

5. Give the transaction name VA01 and press enter.


6. It will automatically take you to the break-point which we have set the in the
SE24 transaction. Each time if you press F8 a list BADI names will be displayed.

7. You can find the BADI name in field EXIT_NAME and if you double click on it, we can get the
corresponding BADI name before hit the corresponding screen. Based on the requirement find
the BADI name and accordingly implement your functionality using the transaction se19.

Phone/Whatsapp: +1 (515) 309-7846 (USA) Email: info@zarantech.com


www.zarantech.com
THANK YOU

Corporate Training Course Catalog


https://bit.ly/SAP-course-catalog

SAP Learner Community


https://www.linkedin.com/showcase/sap-learner-community/

Get any SAP Video Training


https://zarantech.teachable.com/courses/category/sap

Phone/Whatsapp: +1 (515) 309-7846


Email: info@zarantech.com
www.zarantech.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy