Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
To subscribe to ERPtips, go to
www.ERPtips.com/Subscribe.asp.
Pssstt…wanna check out something HOT in SAP? Take a look at the newly enhanced BAdIs available in
Editor’s Note: Pssstt…wanna check out something HOT This article is primarily intended for ABAP developers.
in SAP? Take a look at the newly enhanced BAdIs avail- I will assume that the reader is familiar with ABAP
able in ECC 6.0. Rehan Zaidi addresses the benefits of programming, as well as the Classic BAdIs. For more
the new Business Add-Ins, how they differ from previ- information, refer to the SAP documentation on
ous versions, their implementation, single vs. multi-use http://help.sap.com. All the screenshots in this article have
BAdIs, and even answers this question: What is an been taken from ECC 6.0.
Enhancement Spot? Take a tour with Rehan and learn
how you can get the most out of the BAdIs in your SAP
system.
• How are the new BAdIs implemented? In addition to the benefits provided by the Classic BAdI,
one major advantage that comes with the new BAdIs is
that they are faster in execution.
BAdIs may be developed by SAP or may be custom • The GET BADI statement is used to generate a new BAdI
defined. We refer to the developer of the BAdI or any object, and assigns the reference to this object to the
other enhancement option as the Option provider. The specified variable (in our example, g_BADI_ME59_
methods and their signatures (or the parameters) for EXCLUDE). This is also termed as the handle to the
each respective method’s imports, exports, changes, or BAdI object.
returns, are defined by the BAdI developer. The meth-
ods defined in the BAdI interface are implemented Prior to the GET BADI statement, the variable used must
by the BAdI implementer. The option provider (BAdI be defined based on the BAdI that is to be used.
creator) defines what has to be done, but it is the
implementer who carries out the actual implementation In case you have defined filters for your BAdI, you may
of the BAdI. Within the new BAdIs, the actions of the include suitable filter values in your GET BADI statement.
implementer are controlled by the option provider, who The GET BADI statement will be changed as shown below:
controls the class upon which the BAdI is based.
GET BADI myobject filter = filters.
A developer must use BAdI when he or she wants a par-
ticular procedure to be executed at a particular position, • The CALL BADI statement is then used to call the rel-
but does not want to specify the exact content of that evant BAdI method. This method call may involve
procedure. This might happen if the procedure details importing, exporting, and changing parameters (see
used are different among various potential implement- Figure 1).
ers. It might also occur if the procedure details are so
specific that the developer is not familiar with them, or Multiple- and Single-Use Business Add-Ins
if adding different implementations at a later stage. The new Business Add-ins may either be Single-use or
Multiple-use. These two types of BAdIs are quite dif-
Note: In addition to BAdIs, the new Enhancement ferent. In single-use BAdIs, the business logic requires
Framework provides another option of enhancement exactly one single calculation result. The program’s
known as Source Code Plug-ins. The possibility of next steps may need this result; therefore at least one
attaching a source code plug-in is allowed when an BAdI implementation is needed. In this case, exactly
enhancement point in the code is inserted by the option one result is required because there is no way to handle
provider. The implementer may add her or his own many return values. The system takes care that there is
code at this enhancement point. This has a few dis- exactly one active implementation in a single-use BAdI.
advantages. Because the written code
is generally implemented later in the
development, the option provider has
no control over it. All the variables that
are visible in the enhanced modulariza-
tion unit may be accessed by the code
within this source code plug-in. There-
SAPtipsJournal