Вы находитесь на странице: 1из 4

Badi&user exit

Enhancements

SAP has developed its various modules with standards, which are broadly practiced all over.
Butyet the requirements of customers differ from place to place. In this scenario it becomes

imperative to modify SAP objects to suit the customer’s

needs.Hence SAP allows you to change the system accordingly and add your own functionality
to theSAP system. There are four different ways of changing the SAP system to fit our needs:1.
Customizing: Customizing constitutes changing the system parameters with its own specialuser
interface. These changes are organized and preplanned. It is an obligatory part of
a SAPimplementation process.2. Enhancement Concept: It constitutes changing of SAP
Repository objects by the customer without modification3. Modification: Modifying the SAP
repository objects in the form custom changes. This should be avoided because when SAP
changes occur in new versions then the customer version and thenew SAP version have to be
reconciled manually. This means an increased maintenanceworkload because of the need to
adjust all such modifications. Hence, use of this option should be avoided as far as possible.4.
Customer Development: If the customer requirements are not met by SAP then we should goin
for customer development. These means that we need to create customer specific objectswithin
the customer range. Modification and Customer Development involve high maintenanceand
costs. Hence use these only when customer requirements are not met by customizing or
byexits. SAP creates customer exits for specific programs, screens and menus within standard
R/3applications.

There are two methods in enhancements.

1.

User Exits.2.

BADI (Business Add Ins)

User Exits

There are mainly two reasons to why we have to use exits if we ever have to.1. You should
them because they do not affect the SAP source code but still allow you to changethe
functionality of SAP to suit your needs. SAP has provided us with some standard exits thatwe
should modify by adding our encapsulated as separate objects. When you create Exits, theyare
encapsulated as separate objects.2. And since, they do not affect the source code and are
named as per the SAP namingconventions; they do affect future software upgrades. Hence you
do not have to save them andthen reenter add-ons attached to exits. You can only use exits if
they already exist within the

SAP R/3 System In case you do not find an exit available for an area where you would want
tomake a change, then you should request SAP to develop an exit.There are four types of
exits:1. Menu Exits2. Screen Exits3. Function module Exits4. Field Exit

1. Menu Exits

Using the Menu Exits you can add menu items to the menus of standard R/3Applications. The
Menu Exit entries have function codes that begin with + (plus sign).

2. Function Exits

This includes creating function modules with the administrative part, the interface and
thedocumentation but usually without any additional code. Function module exits play a role in
bothin menu and screen exits When you add a new menu item to a standard pull-down menu,
for example, you can use a function module exit.

3. Screen Exits

Screen Exits defines special areas called Subscreens within a screen. Using Screen Exits you
canadd subscreens to the screens within R/3 applications.

4. FIELD EXITS

Let us now see how to create field exits.

First and foremost, ask your system administrator to include the parameter abap/fieldexit= Yin
your Instance Profile

For the Field Exits we do not need an Enhancement project.


To create a Field Exit, you need to first determine which Data Element you wouldwant to
change, The program that you would like to have the effect on, The screennumber.In our
example we will consider the transaction MM02, which is for changing the materialmaster. We
will select the Basic Data view and then make fields exit for restricting the BasicUnit Of
Measurement. For example, we will not allow the user to

enter ‘BOX’ as basic unit of measurement. For this field, we need to have

details such the Data Element, Program name and Screen Number.This information can be
gathered by as follows:i. Start the TransactionMM02.ii. Select a material and click enter iii. From
the pop up that you get, select the Basic Data viewiv. Locate the label Base Unit of Measure in
the General Data section.v. Place your cursor in the field and press F1vi. In the Help screen of
this field, press on Technical Info button and note down the aboveinformation

Detailed explanation about BADI with an exampleDefination:

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

Why BADI?

In contrast to the earlier enhancement techniques, BADI follows Object Oriented approach
tomake them reusable. A BADI can be used any number of times where as standard
enhancementtechniques 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 newenhancement technique called BADI.

Transaction code for BADI Definition: SE18

When you create a BAdI definition, a class interface will be automatically created and you
candefine your methods in the interface. The implementation of the methods can be done in
SE19transaction.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.There aretwo typesof BADI's.
1)

MultiuseBADI:

With this

option, any number of active implementations can be assigned to the same definition BADI.
Bydefault this option is checked.If we want the BADI for multiple useIf 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 activeespecially 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-inimplementation on specific criteria.Ex: Specific country value.

Вам также может понравиться