You are on page 1of 15

ASSIGNMENT-1

Name

: SURESH WAGHMARE

Module

: SAP-ABAP

Evaluation

: BADI enhancement for tcodeMM01


(Pre-Project)

Date

: 15 SEP 2016

Email ID

: sureshwaghmare1@gmail.com

Contact No

: +91 8446174674

Trainer

: S.DHIVAGAR

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1
BADI (Business Add-in)

BADI is another way of implementing enhancements to the standard programs with


out modifying the original code.

BADI are implemented using OO programming technique Technically a BADI is


nothing but an interface.

Each BADI consists of the method with out implementation called as BADI definition.

We need to create classes to write the abap code by implementing the methods
called as BADI implementation.

SE18 is the T-code for BADI definition, SE19 is the T-code for BADI implementation.
Advantages of BADI

The main advantage of using BADI is , we can create multiple implementations for a
single BADI definition.

Where as with the exits, we can create a single implementation.i.e a single project
for a enhancement.

We cannot create another project (implementation) for enhancement which is


already used. That is why we go for BADI.

Types of BADI

Single implementation BADI.

Multiple implementation BADI.

Filter BADI.

Custom BADI (Not used/Rarely used)


2

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

Single implementation BADI:- A BADI which has only one implementation (single class) is
called single implementation BADI.
Multiple implementation BADI:- A BADI which has multiple implementations is called
multiple implementation BADI. By default all the implementations will be executed.
We cannot control the sequence of execution of multiple implementations.
Filter BADI It is type of BADI which has a filter value so that only those implementations
which satisfy the filter value are executed. The remaining implementations are not executed
this type of BADI is called a filter BADI.

Steps to find BADI


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

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

2. Double click on GET_INSTANCE method.

3. Put a break-point on class method


CL_EXITHANDLER=>GET_CLASS_NAME_BY_INTERFACE.

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

4. Run any transaction on which we want find the BADI's say


MM01.
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.

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

BADI NAMES AFTER RUNNING TRANSACTION.


BADI_SCREEN_LOGIC_RT
W_RETAILSYSTEM_IDENT
BADI_MATN1
BADI_MATERIAL_OD
BADI_MATERIAL_REF
ECM_EXIT
BADI_LAYER
BADI_GTIN_VARIANT
BADI_MATERIAL_REF
7

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1
BADI_MATERIAL_CHECK
EHSS_SPEC_CHECKS

SELECT THE APPROPRIATE BADI AND MAINTAIN IMPLEMENTATION FOR THAT.

Steps to implement the BADI


GO TO TRANSACTION SE19

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

Enter the badi name and create a implementation for BADI.

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

A interface will be created for implementation.

10

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

11

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1
Double click on BADI name where you want to
implement code, write the needed code and save,
check and activate it.

12

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

Now go to transaction MM01 and fill the entry


without MATERIAL GROUP and save data you will get
a message.

13

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

SAVE MATERIAL GROUP AS PREVIOUSLY PRESENTED RECORD


AND SAVE IT WILL GENERATE MESSAGE.

14

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

ASSIGNMENT-1

15

MZSAP Solution
97/2C 1st Main, 1st Cross, Ramanjaneya Layout, Marathahalli, Bengaluru
- 560037.
September 29, 2016

You might also like