SlideShare a Scribd company logo
1 of 11
Download to read offline
Enhancing Standard Programs Quickly and Easily
                                Via Business Add-Ins (BADIs):
                                 A Guide for SAP Developers and Consultants

By Rehan Zaidi, Siemens Pakistan

Editor’s Note: Some of the most appealing aspects of SAP® are its modularity and “configure-
ability”. SAP’s enterprise solution allows a great deal of flexibility in application, as well as a lot of
tailoring to specific company needs. One of SAP’s recent offerings in the tools and techniques
arena is the concept of Business Add-Ins, or BADIs. ABAP “man of the hour” Rehan Zaidi uses
this white paper to explain exactly what Business Add-Ins are, and how they are called in ABAP
programs. He presents an overview of the benefits to consultants and users, and he describes
the steps required to enhance standard SAP programs that use this functionality. Maybe you’re
no Schwarzenegger, but you can be a world class BADI builder when you exercise your new-
found knowledge of Business Add-Ins in SAP.


Introduction
A major strength of SAP is the capability to adapt its module’s standard programs according to
customer-specific requirements. One of the recent customization techniques made available is
the use of Business Add-Ins. This technique uses newer technology and concepts, and has been
used by SAP in most of its modules. Moreover, due to the numerous advantages that it provides,
learning the basics of this technique is essential for SAP developers and consultants.

The goal of this white paper is to provide a description of the steps required in adapting programs
that use Business Add-Ins. These are some of the questions that this paper will address:

    •   What are Business Add-Ins and how are they called in ABAP programs?
    •   What are some of the benefits that they provide to consultants and users?
    •   What steps are required to enhance standard programs that employ this functionality?

I will begin with an overview of BAdIs (Business Add-Ins) and their connection with object-
oriented concepts. I’ll discuss, in detail, the steps required in implementing a typical Business
Add-In. Finally, I will use an example drawn from an easy-for-all company scenario to illustrate
my views. I am going to include tips learned from my personal experience and observation.

This paper is primarily intended for SAP developers but may also be of interest to SAP users. I
will assume that the reader is familiar with basic ABAP concepts and has some knowledge of
object-oriented programming within an SAP environment. For more information, refer to the SAP
documentation on http://help.sap.com/. Though the screenshots have been taken from Release
4.6, the tips mentioned are relevant for later releases as well.


Business Add-Ins (BADIs): An Overview
Business Add-Ins may be simply defined as an object-oriented extension of the SAP
enhancement technique. They consist of special portions provided by SAP developers for
incorporating customer (or company) specific logic. The process of adapting your program
according to your scenario is known as implementation of the BADI.

Business Add-Ins have been used by SAP developers in a number of modules such as HR, SD,
and MM. In addition to standard ABAP programs, you may also use BADIs for menu and screen
enhancements. Apart from SAP-delivered applications, you may also want to create your own
Business Add-Ins in order to provide the option of enhancing your own ABAP programs. The
transactions for creating and implementing Business Add-ins are SE18 and SE19 respectively.


Copyright © 2005 by Klee Associates, Inc.                                                         Page 1
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants


As already mentioned, BADIs are based upon the concept of object-orientation. The program that
incorporates the enhancement option calls a method of a generated BADI class. During the
implementation procedure, the customer-specific code is written in the relevant method. The
method name is specified via a BADI interface. The name of the interface is of the form
IF_EX_BADI, where BADI is the name of the Business Add-In in question. For example, in the
case of the HR Add-In HR_INDVAL, the involved interface is IF_EX_HR_INDVAL.

There are two main attributes of Business Add-Ins, namely Multiple-Use and/or Filter Dependent.
If you want to allow more than one implementation for a given BADI, the attribute of the
corresponding BADI is set as Multiple-use. Likewise, Business Add-ins may also be defined as
filter-dependent. This allows you to define subtypes for a given Business Add-In. In this case, a
different method code is created and executed for each filter specified in the BADI definition.

BADIs provide a number of advantages to developers and consultants:

    •   They let you quickly and easily adapt SAP according to your users’ requirements, without
        the need for modifying standard code.
    •   Since the enhancement is not fixed for all scenarios, BADIs allow you to implement a
        different application logic for a variety of country versions and company requirements.
    •   For developers having an affinity for object-oriented concepts, this functionality provides
        a means of effective SAP program enhancement.


Transaction SE18
You may use the transaction SE18 to display a list of existing BADIs as well as to view the
attributes and structure of a given BADI. In order to search for an appropriate BADI in your
functional area, call transaction SE18. The main screen for transaction SE18 appears as shown
in Figure 1.




Figure 1: BADI Initial Definition Screen


Copyright © 2005 by Klee Associates, Inc.                                                   Page 2
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants

While keeping the cursor on the Definition name field, press the F4 key. A pop-up screen
appears. Choose the Application Hierarchy option. The system then displays a tree structure
showing the various functional areas (within SAP) pertinent to modules such as MM, SD, and HR.
Navigate through this tree in order to find the area (and hence the BADI) in which you are
interested.

You also may create new (or display existing) BADI definitions via this transaction. In order to
display the attributes and structure of an SAP-provided BADI, enter the BADI name in the field
provided on the main screen of transaction SE18, and click Display. The screen appears, as
shown in Figure 2.




Figure 2: Displaying Definition of BADI HRPAYCA_RP_ROE

The Attributes tab shows the General Data and the Type of the BADI in question. The General
Data shows the relevant Business Add-In class, whereas the Type specifies whether the Add-In
is Multiple Use and/or Filter-Dependent. In case the Filter-Dependent indicator is on, a relevant
Filter Type is displayed in the field provided. You may then click on the Interface tab. The name of
the Interface and the BADI method is displayed (see Figure 3).




Copyright © 2005 by Klee Associates, Inc.                                                  Page 3
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                              A Guide for SAP Developers and Consultants




Figure 3: BADI Interface and Method Name

Double-click on the Method name in order to view the details about the importing, exporting, and
changing parameters of the BADI method in question (see Figure 4).




Figure 4: Parameters of a Given BADI Method



Copyright © 2005 by Klee Associates, Inc.                                                Page 4
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants

In case of Filter-Dependent BADIs, one important parameter that is passed on to the method is
the filter value. The name of this parameter, in most cases, is FLT_VAL.


Structure of Programs that Employ the BADI Functionality
It is a good idea for you to familiarize yourself with the structure of programs that employ
Business Add-Ins. The programs (whether standard or custom-built) that incorporate the BADI
functionality include a somewhat common block of code. One such example is shown in Figure.5

…………..
…………..
CLASS CL_EXITHANDLER DEFINITION LOAD.
DATA MYEXIT TYPE REF TO IF_EX_BADINAME.

CALL METHOD CL_EXITHANDLER=>GET_INSTANCE “ fetching instance of the
      CHANGING INSTANCE = MYEXIT. “ BADI class

CALL METHOD MYEXIT->BADIMETHOD                       “ calling the BADI method
            EXPORTING….
            ……
            IMPORTING….
….............
…………..
Figure 5: BADI Method Call

The block of code first declares the class CL_EXITHANDLER, and then declares a reference
variable (in this case, MYEXIT) to the interface of the BADI in question. Then, the program calls
the static method GET_INSTANCE of the CL_EXITHANDLER class. This method is used to
access an active instance of the Business Add-In class, which is placed in the declared variable
MYEXIT.

Tip: One of the ways of finding out whether a program supports BADI enhancement is to search
for the text “EXITHANDLER” in the program’s source code.

The instance of the BADI class may then be used to call the implemented BADI method. Finally,
the BADI method is called. This method contains the actual enhancement logic pertinent to the
customer or the country in question (we’ll discuss this in detail in the next section).


Steps Required in Implementing a BADI
As already mentioned, you may create new (or amend existing) implementations of Business
Add-Ins via transaction SE19. There are a few steps required in order to implement a Business
Add-In. Let us go through them one by one.


Step 1: Creating an Implementation
The first step involves creating a BADI implementation. Call transaction SE19. The BADI
implementation screen appears, as shown in Figure 6.




Copyright © 2005 by Klee Associates, Inc.                                                 Page 5
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants




Figure 6: Transaction SE19 – BADI Implementation Screen

Enter a suitable name for your implementation in the field provided, and click the Create button.

A pop-up screen appears, as shown in Figure 7. Enter the name of the BADI involved and press
the Enter button.




Figure 7: Entering the Name of the BADI to Be Implemented

This leads you to the screen shown in Figure 8.




Copyright © 2005 by Klee Associates, Inc.                                                 Page 6
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                               Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants




Figure 8: BADI Implementation Maintenance

Enter an appropriate short text in the field provided. Then, click on the Interface tab. This shows
the name of the class that will be generated as a result of the implementation. You may change
the class if you like. The Interface tab also contains the name of the BADI method.

Note: In case you are implementing a Filter-Dependent BADI, you need to enter a suitable filter
value in the table control provided in the Type portion of the Attributes tab. The Filter Value(s)
field (in this case) is available for input, as shown in Figure 9.




Figure 9: Entering a Filter Value for Filter Dependent BADIs


Copyright © 2005 by Klee Associates, Inc.                                                   Page 7
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                              A Guide for SAP Developers and Consultants

Then, double-click on the name of the method (in our case SAP_SCRIPT_TABLES). This takes
you to the Class Builder’s method editor screen. This is the area where you may write the code
that you would like to be executed when the BADI method is called (see Figure 10).




Figure 10: Coding the BADI Method


Step 2: Writing the Code for the BADI Method
The next step is to write the appropriate coding for the BADI method. This code incorporates the
enhancement logic and is executed by the application program upon the BADI method call. Most
of the ABAP statements are applicable in this case. However, since the BADI technology is based
upon ABAP Objects, some ABAP constructs are not allowed. For example, the following form for
internal table declaration will give an error:

DATA : BEGIN OF ITAB2 OCCURS 0,
   MYFIELD1,
   MYFIELD2,
  END OF ITAB2.

As already mentioned, the method has importing, exporting, and changing parameters. The
enhancement may be achieved by writing code that assigns suitable values to the changing and
exporting parameters of the method. The main application program uses these values for further
processing, and in this way the desired enhancement effect is achieved. When you are done with
the coding, activate the BADI method.

Tip: Effective BADI implementation lies in using the parameters in the best possible manner.
Take some time to explore the various parameters provided and use them in best fulfilling your
scenario requirements.

After carrying out the two necessary steps, activate your BADI implementation.




Copyright © 2005 by Klee Associates, Inc.                                               Page 8
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                               Via Business Add-Ins (BADIs):
                               A Guide for SAP Developers and Consultants



Putting It All Together
In this section, I will use the concepts described in this paper to show how the BADI functionality
may be applied for indirectly valuating HR allowances. The formula or criteria for indirect
valuation, known as Module, is specified via configuration settings. However, the code for writing
the mathematical formula is done in a BADI method.

The Business Add-In applicable in this case is HR_INDVAL, and the interface involved is
IF_EX_HR_INDVAL. As already mentioned, the first step is to create the implementation. An
implementation by the name Z_FIRST_IMP1 was created, as shown in Figure 11.




Figure 11: Creating an Implementation for Business Add-In HR_INDVAL

Since HR_INDVAL is a filter-dependent BADI, we need to specify an appropriate Filter Value in
the Attributes section. The Filter Value, in this case, is the name of the Indirect Valuation Module
(in our case Z123). For simplicity’s sake, I have assumed that the indirect valuation module Z123


Copyright © 2005 by Klee Associates, Inc.                                                   Page 9
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                              Via Business Add-Ins (BADIs):
                              A Guide for SAP Developers and Consultants

has already been created. Next, the method on the Interface tab is accessed. In this case, the
name of the method is DO_INDIRECT_VALUATION (see Figure 12).




Figure 12: BADI HR_INDVAL’s Interface

The important parameters in this case are the VALUATION_INPUT and VALUATION_OUTPUT
variables. The appropriate code is written for the method DO_INDIRECT_VALUATION. When the
user creates entries for allowances that have been assigned the given module, the formula
specified in BADI method DO_INDIRECT_VALUATION is executed, and the resulting allowance
value is displayed on the screen.

Conclusion
In this white paper, I reviewed the rudiments of Business Add-Ins and their benefits for SAP users
and developers. Then, I discussed in detail the steps required in implementing an add-in. Finally,
I discussed an HR requirement that may be fulfilled via the use of this functionality. I hope this
paper will provide you with precious insights to help you in adapting standard SAP programs
quickly and easily.

Rehan Zaidi, Senior SAP Consultant, Siemens Pakistan
Rehan has been involved in both ABAP development and functional configuration for SAP HR
implementations at multinational and local companies. He has also contributed articles to the
SAP Professional Journal, the HR Expert newsletter, and to the TechRepublic Web site. He is
currently working on his first book, which is specifically designed for SAP HR Users and
Managers (planned for release in the beginning of 2006). Rehan's email address is
Rehan.Zaidi@SAPtips.com or zaidi.rehan@gmail.com.



Copyright © 2005 by Klee Associates, Inc.                                               Page 10
                                  www.SAPtips.com
Enhancing Standard Programs Quickly and Easily
                                   Via Business Add-Ins (BADIs):
                                      A Guide for SAP Developers and Consultants



The information in our publications and on our Website is the copyrighted work of Klee Associates, Inc. and is owned by
Klee Associates, Inc.

NO WARRANTY: This documentation is delivered as is, and Klee Associates, Inc. makes no warranty as to its accuracy
or use. Any use of this documentation is at the risk of the user. Although we make every good faith effort to ensure
accuracy, this document may include technical or other inaccuracies or typographical errors. Klee Associates, Inc.
reserves the right to make changes without prior notice.

NO AFFILIATION: Klee Associates, Inc. and this publication are not affiliated with or endorsed by SAP AG. SAP AG
software referenced on this site is furnished under license agreements between SAP AG and its customers and can be
used only within the terms of such agreements. SAP AG and mySAP are registered trademarks of SAP AG.

All other company and product names used herein may be trademarks or registered trademarks of their respective
owners.




Copyright © 2005 by Klee Associates, Inc.                                                                    Page 11
                                  www.SAPtips.com

More Related Content

What's hot

Training Guide Oracle EBS R12 Performance Management
Training Guide Oracle EBS R12 Performance ManagementTraining Guide Oracle EBS R12 Performance Management
Training Guide Oracle EBS R12 Performance ManagementFeras Ahmad
 
SAP - Solution Marketing Case Study
SAP - Solution Marketing Case StudySAP - Solution Marketing Case Study
SAP - Solution Marketing Case StudySteve Robins
 
100901 NDR Raymond James e BTG - eua
100901   NDR Raymond James e BTG - eua100901   NDR Raymond James e BTG - eua
100901 NDR Raymond James e BTG - euaMultiplus
 
Cauve HRM User Document
Cauve HRM User DocumentCauve HRM User Document
Cauve HRM User Documentswambala
 
How to build a Company Page - Linkedin
How to build a Company Page - LinkedinHow to build a Company Page - Linkedin
How to build a Company Page - LinkedinMarcin Czajka
 
Hbm new features
Hbm new featuresHbm new features
Hbm new featureslasselante
 
Top 10 Reasons Customers Choose SAP for Business Transformation
Top 10 Reasons Customers Choose SAP for Business TransformationTop 10 Reasons Customers Choose SAP for Business Transformation
Top 10 Reasons Customers Choose SAP for Business TransformationFindWhitePapers
 
Workbooks CRM datasheet
Workbooks CRM datasheetWorkbooks CRM datasheet
Workbooks CRM datasheetPaul Tompsett
 
BPC Session1
BPC Session1BPC Session1
BPC Session1bayu5012
 
Cbs org. resourcebase and market requirements
Cbs   org. resourcebase and market requirementsCbs   org. resourcebase and market requirements
Cbs org. resourcebase and market requirementsJacob Holm
 
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...Sven Ringling
 

What's hot (13)

Training Guide Oracle EBS R12 Performance Management
Training Guide Oracle EBS R12 Performance ManagementTraining Guide Oracle EBS R12 Performance Management
Training Guide Oracle EBS R12 Performance Management
 
SAP - Solution Marketing Case Study
SAP - Solution Marketing Case StudySAP - Solution Marketing Case Study
SAP - Solution Marketing Case Study
 
100901 NDR Raymond James e BTG - eua
100901   NDR Raymond James e BTG - eua100901   NDR Raymond James e BTG - eua
100901 NDR Raymond James e BTG - eua
 
Cauve HRM User Document
Cauve HRM User DocumentCauve HRM User Document
Cauve HRM User Document
 
How to build a Company Page - Linkedin
How to build a Company Page - LinkedinHow to build a Company Page - Linkedin
How to build a Company Page - Linkedin
 
Hbm new features
Hbm new featuresHbm new features
Hbm new features
 
Top 10 Reasons Customers Choose SAP for Business Transformation
Top 10 Reasons Customers Choose SAP for Business TransformationTop 10 Reasons Customers Choose SAP for Business Transformation
Top 10 Reasons Customers Choose SAP for Business Transformation
 
Workbooks CRM datasheet
Workbooks CRM datasheetWorkbooks CRM datasheet
Workbooks CRM datasheet
 
BPC Session1
BPC Session1BPC Session1
BPC Session1
 
Erp final proj report slideshare
Erp final proj report slideshareErp final proj report slideshare
Erp final proj report slideshare
 
Cbs org. resourcebase and market requirements
Cbs   org. resourcebase and market requirementsCbs   org. resourcebase and market requirements
Cbs org. resourcebase and market requirements
 
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...
SAP HR new Feature: Personnel (Sub)Areas and Employee (Sub)Groups Come with V...
 
VN Lakshman
VN LakshmanVN Lakshman
VN Lakshman
 

Viewers also liked

Dr John Dee - Communications With Spirits - Free Ebook
Dr John Dee -  Communications With Spirits - Free EbookDr John Dee -  Communications With Spirits - Free Ebook
Dr John Dee - Communications With Spirits - Free EbookChuck Thompson
 
Dot Net 串接 SAP
Dot Net 串接 SAPDot Net 串接 SAP
Dot Net 串接 SAPLearningTech
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Kranthi Kumar
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exitsKranthi Kumar
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systemsKranthi Kumar
 
Creation of a web service in sap
Creation of a web service in sapCreation of a web service in sap
Creation of a web service in saprajdongre
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programmingSatheesh Kanna
 
SAP ABAP web services creation.
SAP ABAP web services creation. SAP ABAP web services creation.
SAP ABAP web services creation. Anjali Rao
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answersGarySpeed1234
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.docKranthi Kumar
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction eventsKranthi Kumar
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantAnkit Sharma
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answersUttam Agrawal
 
Classical ABAP interactive report
Classical ABAP interactive reportClassical ABAP interactive report
Classical ABAP interactive reportRavi Kanudawala
 
User exit training
User exit trainingUser exit training
User exit trainingJen Ringel
 

Viewers also liked (16)

Dr John Dee - Communications With Spirits - Free Ebook
Dr John Dee -  Communications With Spirits - Free EbookDr John Dee -  Communications With Spirits - Free Ebook
Dr John Dee - Communications With Spirits - Free Ebook
 
Dot Net 串接 SAP
Dot Net 串接 SAPDot Net 串接 SAP
Dot Net 串接 SAP
 
Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1Chapter 08 abap dictionary objects views1
Chapter 08 abap dictionary objects views1
 
Chapter 01 user exits
Chapter 01 user exitsChapter 01 user exits
Chapter 01 user exits
 
Enhancement framework the new way to enhance your abap systems
Enhancement framework   the new way to enhance your abap systemsEnhancement framework   the new way to enhance your abap systems
Enhancement framework the new way to enhance your abap systems
 
Creation of a web service in sap
Creation of a web service in sapCreation of a web service in sap
Creation of a web service in sap
 
Ab1011 module pool programming
Ab1011   module pool programmingAb1011   module pool programming
Ab1011 module pool programming
 
SAP ABAP web services creation.
SAP ABAP web services creation. SAP ABAP web services creation.
SAP ABAP web services creation.
 
Yash technologies interview questions and answers
Yash technologies interview questions and answersYash technologies interview questions and answers
Yash technologies interview questions and answers
 
Introducing enhancement framework.doc
Introducing enhancement framework.docIntroducing enhancement framework.doc
Introducing enhancement framework.doc
 
Scenario on business transaction events
Scenario on business transaction eventsScenario on business transaction events
Scenario on business transaction events
 
SAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional ConsultantSAP BADI Implementation Learning for Functional Consultant
SAP BADI Implementation Learning for Functional Consultant
 
Badi document
Badi documentBadi document
Badi document
 
Smartforms interview questions with answers
Smartforms interview questions with answersSmartforms interview questions with answers
Smartforms interview questions with answers
 
Classical ABAP interactive report
Classical ABAP interactive reportClassical ABAP interactive report
Classical ABAP interactive report
 
User exit training
User exit trainingUser exit training
User exit training
 

Similar to 022006 zaidi badi

apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...apidays
 
SAP BI Requirements Gathering Process
SAP BI Requirements Gathering ProcessSAP BI Requirements Gathering Process
SAP BI Requirements Gathering Processsilvaft
 
How to go about your SAP Integration 2019, SAP PI, and cloud
How to go about your SAP Integration 2019, SAP PI, and cloudHow to go about your SAP Integration 2019, SAP PI, and cloud
How to go about your SAP Integration 2019, SAP PI, and cloudDaniel Graversen
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...Rajeev Kumar
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...Kranthi Kumar
 
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1Interview Mocha
 
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...Jenifer Robert
 
Pricing Efficiency
Pricing EfficiencyPricing Efficiency
Pricing EfficiencyDaya Nadar
 
Hr structural auths
Hr   structural authsHr   structural auths
Hr structural authshkodali
 
Atos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharAtos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharShekhar Bhartiya
 
BADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfBADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfssuser08365f
 
IBM_Business_Partner_Guide.ppt
IBM_Business_Partner_Guide.pptIBM_Business_Partner_Guide.ppt
IBM_Business_Partner_Guide.pptSyed Maaz Siddique
 
Business function prediction
Business function predictionBusiness function prediction
Business function predictionMukesh Gupta
 
11 mistakes to_avoid_when_upgrading_sap
11 mistakes to_avoid_when_upgrading_sap11 mistakes to_avoid_when_upgrading_sap
11 mistakes to_avoid_when_upgrading_sapVasudev Reddy
 
Book irt310 master-data_in_sap_for_retail
Book irt310 master-data_in_sap_for_retailBook irt310 master-data_in_sap_for_retail
Book irt310 master-data_in_sap_for_retailVISHAL SAXENA
 

Similar to 022006 zaidi badi (20)

apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
 
SAP BI Requirements Gathering Process
SAP BI Requirements Gathering ProcessSAP BI Requirements Gathering Process
SAP BI Requirements Gathering Process
 
How to go about your SAP Integration 2019, SAP PI, and cloud
How to go about your SAP Integration 2019, SAP PI, and cloudHow to go about your SAP Integration 2019, SAP PI, and cloud
How to go about your SAP Integration 2019, SAP PI, and cloud
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
Fi enhancement technique how-to-guide on the usage of business transaction ...
Fi enhancement technique   how-to-guide on the usage of business transaction ...Fi enhancement technique   how-to-guide on the usage of business transaction ...
Fi enhancement technique how-to-guide on the usage of business transaction ...
 
B adi
B adiB adi
B adi
 
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1
SAP Interview Questions for Experienced to Hire SAP Specialists_Part 1
 
Sap mm sample
Sap mm sampleSap mm sample
Sap mm sample
 
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...
BI Solution for Sales Analysis Optimization Delivered for Apollo Tyres - Tekm...
 
What is SAP?
What is SAP?What is SAP?
What is SAP?
 
1690508475607.pdf
1690508475607.pdf1690508475607.pdf
1690508475607.pdf
 
Functional module
Functional moduleFunctional module
Functional module
 
Pricing Efficiency
Pricing EfficiencyPricing Efficiency
Pricing Efficiency
 
Hr structural auths
Hr   structural authsHr   structural auths
Hr structural auths
 
Atos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 ShekharAtos Ibm Sap Event 22 06 2012v2 Shekhar
Atos Ibm Sap Event 22 06 2012v2 Shekhar
 
BADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdfBADI IMPLEMENTATION.pdf
BADI IMPLEMENTATION.pdf
 
IBM_Business_Partner_Guide.ppt
IBM_Business_Partner_Guide.pptIBM_Business_Partner_Guide.ppt
IBM_Business_Partner_Guide.ppt
 
Business function prediction
Business function predictionBusiness function prediction
Business function prediction
 
11 mistakes to_avoid_when_upgrading_sap
11 mistakes to_avoid_when_upgrading_sap11 mistakes to_avoid_when_upgrading_sap
11 mistakes to_avoid_when_upgrading_sap
 
Book irt310 master-data_in_sap_for_retail
Book irt310 master-data_in_sap_for_retailBook irt310 master-data_in_sap_for_retail
Book irt310 master-data_in_sap_for_retail
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

022006 zaidi badi

  • 1. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants By Rehan Zaidi, Siemens Pakistan Editor’s Note: Some of the most appealing aspects of SAP® are its modularity and “configure- ability”. SAP’s enterprise solution allows a great deal of flexibility in application, as well as a lot of tailoring to specific company needs. One of SAP’s recent offerings in the tools and techniques arena is the concept of Business Add-Ins, or BADIs. ABAP “man of the hour” Rehan Zaidi uses this white paper to explain exactly what Business Add-Ins are, and how they are called in ABAP programs. He presents an overview of the benefits to consultants and users, and he describes the steps required to enhance standard SAP programs that use this functionality. Maybe you’re no Schwarzenegger, but you can be a world class BADI builder when you exercise your new- found knowledge of Business Add-Ins in SAP. Introduction A major strength of SAP is the capability to adapt its module’s standard programs according to customer-specific requirements. One of the recent customization techniques made available is the use of Business Add-Ins. This technique uses newer technology and concepts, and has been used by SAP in most of its modules. Moreover, due to the numerous advantages that it provides, learning the basics of this technique is essential for SAP developers and consultants. The goal of this white paper is to provide a description of the steps required in adapting programs that use Business Add-Ins. These are some of the questions that this paper will address: • What are Business Add-Ins and how are they called in ABAP programs? • What are some of the benefits that they provide to consultants and users? • What steps are required to enhance standard programs that employ this functionality? I will begin with an overview of BAdIs (Business Add-Ins) and their connection with object- oriented concepts. I’ll discuss, in detail, the steps required in implementing a typical Business Add-In. Finally, I will use an example drawn from an easy-for-all company scenario to illustrate my views. I am going to include tips learned from my personal experience and observation. This paper is primarily intended for SAP developers but may also be of interest to SAP users. I will assume that the reader is familiar with basic ABAP concepts and has some knowledge of object-oriented programming within an SAP environment. For more information, refer to the SAP documentation on http://help.sap.com/. Though the screenshots have been taken from Release 4.6, the tips mentioned are relevant for later releases as well. Business Add-Ins (BADIs): An Overview Business Add-Ins may be simply defined as an object-oriented extension of the SAP enhancement technique. They consist of special portions provided by SAP developers for incorporating customer (or company) specific logic. The process of adapting your program according to your scenario is known as implementation of the BADI. Business Add-Ins have been used by SAP developers in a number of modules such as HR, SD, and MM. In addition to standard ABAP programs, you may also use BADIs for menu and screen enhancements. Apart from SAP-delivered applications, you may also want to create your own Business Add-Ins in order to provide the option of enhancing your own ABAP programs. The transactions for creating and implementing Business Add-ins are SE18 and SE19 respectively. Copyright © 2005 by Klee Associates, Inc. Page 1 www.SAPtips.com
  • 2. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants As already mentioned, BADIs are based upon the concept of object-orientation. The program that incorporates the enhancement option calls a method of a generated BADI class. During the implementation procedure, the customer-specific code is written in the relevant method. The method name is specified via a BADI interface. The name of the interface is of the form IF_EX_BADI, where BADI is the name of the Business Add-In in question. For example, in the case of the HR Add-In HR_INDVAL, the involved interface is IF_EX_HR_INDVAL. There are two main attributes of Business Add-Ins, namely Multiple-Use and/or Filter Dependent. If you want to allow more than one implementation for a given BADI, the attribute of the corresponding BADI is set as Multiple-use. Likewise, Business Add-ins may also be defined as filter-dependent. This allows you to define subtypes for a given Business Add-In. In this case, a different method code is created and executed for each filter specified in the BADI definition. BADIs provide a number of advantages to developers and consultants: • They let you quickly and easily adapt SAP according to your users’ requirements, without the need for modifying standard code. • Since the enhancement is not fixed for all scenarios, BADIs allow you to implement a different application logic for a variety of country versions and company requirements. • For developers having an affinity for object-oriented concepts, this functionality provides a means of effective SAP program enhancement. Transaction SE18 You may use the transaction SE18 to display a list of existing BADIs as well as to view the attributes and structure of a given BADI. In order to search for an appropriate BADI in your functional area, call transaction SE18. The main screen for transaction SE18 appears as shown in Figure 1. Figure 1: BADI Initial Definition Screen Copyright © 2005 by Klee Associates, Inc. Page 2 www.SAPtips.com
  • 3. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants While keeping the cursor on the Definition name field, press the F4 key. A pop-up screen appears. Choose the Application Hierarchy option. The system then displays a tree structure showing the various functional areas (within SAP) pertinent to modules such as MM, SD, and HR. Navigate through this tree in order to find the area (and hence the BADI) in which you are interested. You also may create new (or display existing) BADI definitions via this transaction. In order to display the attributes and structure of an SAP-provided BADI, enter the BADI name in the field provided on the main screen of transaction SE18, and click Display. The screen appears, as shown in Figure 2. Figure 2: Displaying Definition of BADI HRPAYCA_RP_ROE The Attributes tab shows the General Data and the Type of the BADI in question. The General Data shows the relevant Business Add-In class, whereas the Type specifies whether the Add-In is Multiple Use and/or Filter-Dependent. In case the Filter-Dependent indicator is on, a relevant Filter Type is displayed in the field provided. You may then click on the Interface tab. The name of the Interface and the BADI method is displayed (see Figure 3). Copyright © 2005 by Klee Associates, Inc. Page 3 www.SAPtips.com
  • 4. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants Figure 3: BADI Interface and Method Name Double-click on the Method name in order to view the details about the importing, exporting, and changing parameters of the BADI method in question (see Figure 4). Figure 4: Parameters of a Given BADI Method Copyright © 2005 by Klee Associates, Inc. Page 4 www.SAPtips.com
  • 5. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants In case of Filter-Dependent BADIs, one important parameter that is passed on to the method is the filter value. The name of this parameter, in most cases, is FLT_VAL. Structure of Programs that Employ the BADI Functionality It is a good idea for you to familiarize yourself with the structure of programs that employ Business Add-Ins. The programs (whether standard or custom-built) that incorporate the BADI functionality include a somewhat common block of code. One such example is shown in Figure.5 ………….. ………….. CLASS CL_EXITHANDLER DEFINITION LOAD. DATA MYEXIT TYPE REF TO IF_EX_BADINAME. CALL METHOD CL_EXITHANDLER=>GET_INSTANCE “ fetching instance of the CHANGING INSTANCE = MYEXIT. “ BADI class CALL METHOD MYEXIT->BADIMETHOD “ calling the BADI method EXPORTING…. …… IMPORTING…. …............. ………….. Figure 5: BADI Method Call The block of code first declares the class CL_EXITHANDLER, and then declares a reference variable (in this case, MYEXIT) to the interface of the BADI in question. Then, the program calls the static method GET_INSTANCE of the CL_EXITHANDLER class. This method is used to access an active instance of the Business Add-In class, which is placed in the declared variable MYEXIT. Tip: One of the ways of finding out whether a program supports BADI enhancement is to search for the text “EXITHANDLER” in the program’s source code. The instance of the BADI class may then be used to call the implemented BADI method. Finally, the BADI method is called. This method contains the actual enhancement logic pertinent to the customer or the country in question (we’ll discuss this in detail in the next section). Steps Required in Implementing a BADI As already mentioned, you may create new (or amend existing) implementations of Business Add-Ins via transaction SE19. There are a few steps required in order to implement a Business Add-In. Let us go through them one by one. Step 1: Creating an Implementation The first step involves creating a BADI implementation. Call transaction SE19. The BADI implementation screen appears, as shown in Figure 6. Copyright © 2005 by Klee Associates, Inc. Page 5 www.SAPtips.com
  • 6. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants Figure 6: Transaction SE19 – BADI Implementation Screen Enter a suitable name for your implementation in the field provided, and click the Create button. A pop-up screen appears, as shown in Figure 7. Enter the name of the BADI involved and press the Enter button. Figure 7: Entering the Name of the BADI to Be Implemented This leads you to the screen shown in Figure 8. Copyright © 2005 by Klee Associates, Inc. Page 6 www.SAPtips.com
  • 7. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants Figure 8: BADI Implementation Maintenance Enter an appropriate short text in the field provided. Then, click on the Interface tab. This shows the name of the class that will be generated as a result of the implementation. You may change the class if you like. The Interface tab also contains the name of the BADI method. Note: In case you are implementing a Filter-Dependent BADI, you need to enter a suitable filter value in the table control provided in the Type portion of the Attributes tab. The Filter Value(s) field (in this case) is available for input, as shown in Figure 9. Figure 9: Entering a Filter Value for Filter Dependent BADIs Copyright © 2005 by Klee Associates, Inc. Page 7 www.SAPtips.com
  • 8. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants Then, double-click on the name of the method (in our case SAP_SCRIPT_TABLES). This takes you to the Class Builder’s method editor screen. This is the area where you may write the code that you would like to be executed when the BADI method is called (see Figure 10). Figure 10: Coding the BADI Method Step 2: Writing the Code for the BADI Method The next step is to write the appropriate coding for the BADI method. This code incorporates the enhancement logic and is executed by the application program upon the BADI method call. Most of the ABAP statements are applicable in this case. However, since the BADI technology is based upon ABAP Objects, some ABAP constructs are not allowed. For example, the following form for internal table declaration will give an error: DATA : BEGIN OF ITAB2 OCCURS 0, MYFIELD1, MYFIELD2, END OF ITAB2. As already mentioned, the method has importing, exporting, and changing parameters. The enhancement may be achieved by writing code that assigns suitable values to the changing and exporting parameters of the method. The main application program uses these values for further processing, and in this way the desired enhancement effect is achieved. When you are done with the coding, activate the BADI method. Tip: Effective BADI implementation lies in using the parameters in the best possible manner. Take some time to explore the various parameters provided and use them in best fulfilling your scenario requirements. After carrying out the two necessary steps, activate your BADI implementation. Copyright © 2005 by Klee Associates, Inc. Page 8 www.SAPtips.com
  • 9. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants Putting It All Together In this section, I will use the concepts described in this paper to show how the BADI functionality may be applied for indirectly valuating HR allowances. The formula or criteria for indirect valuation, known as Module, is specified via configuration settings. However, the code for writing the mathematical formula is done in a BADI method. The Business Add-In applicable in this case is HR_INDVAL, and the interface involved is IF_EX_HR_INDVAL. As already mentioned, the first step is to create the implementation. An implementation by the name Z_FIRST_IMP1 was created, as shown in Figure 11. Figure 11: Creating an Implementation for Business Add-In HR_INDVAL Since HR_INDVAL is a filter-dependent BADI, we need to specify an appropriate Filter Value in the Attributes section. The Filter Value, in this case, is the name of the Indirect Valuation Module (in our case Z123). For simplicity’s sake, I have assumed that the indirect valuation module Z123 Copyright © 2005 by Klee Associates, Inc. Page 9 www.SAPtips.com
  • 10. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants has already been created. Next, the method on the Interface tab is accessed. In this case, the name of the method is DO_INDIRECT_VALUATION (see Figure 12). Figure 12: BADI HR_INDVAL’s Interface The important parameters in this case are the VALUATION_INPUT and VALUATION_OUTPUT variables. The appropriate code is written for the method DO_INDIRECT_VALUATION. When the user creates entries for allowances that have been assigned the given module, the formula specified in BADI method DO_INDIRECT_VALUATION is executed, and the resulting allowance value is displayed on the screen. Conclusion In this white paper, I reviewed the rudiments of Business Add-Ins and their benefits for SAP users and developers. Then, I discussed in detail the steps required in implementing an add-in. Finally, I discussed an HR requirement that may be fulfilled via the use of this functionality. I hope this paper will provide you with precious insights to help you in adapting standard SAP programs quickly and easily. Rehan Zaidi, Senior SAP Consultant, Siemens Pakistan Rehan has been involved in both ABAP development and functional configuration for SAP HR implementations at multinational and local companies. He has also contributed articles to the SAP Professional Journal, the HR Expert newsletter, and to the TechRepublic Web site. He is currently working on his first book, which is specifically designed for SAP HR Users and Managers (planned for release in the beginning of 2006). Rehan's email address is Rehan.Zaidi@SAPtips.com or zaidi.rehan@gmail.com. Copyright © 2005 by Klee Associates, Inc. Page 10 www.SAPtips.com
  • 11. Enhancing Standard Programs Quickly and Easily Via Business Add-Ins (BADIs): A Guide for SAP Developers and Consultants The information in our publications and on our Website is the copyrighted work of Klee Associates, Inc. and is owned by Klee Associates, Inc. NO WARRANTY: This documentation is delivered as is, and Klee Associates, Inc. makes no warranty as to its accuracy or use. Any use of this documentation is at the risk of the user. Although we make every good faith effort to ensure accuracy, this document may include technical or other inaccuracies or typographical errors. Klee Associates, Inc. reserves the right to make changes without prior notice. NO AFFILIATION: Klee Associates, Inc. and this publication are not affiliated with or endorsed by SAP AG. SAP AG software referenced on this site is furnished under license agreements between SAP AG and its customers and can be used only within the terms of such agreements. SAP AG and mySAP are registered trademarks of SAP AG. All other company and product names used herein may be trademarks or registered trademarks of their respective owners. Copyright © 2005 by Klee Associates, Inc. Page 11 www.SAPtips.com