A business add-in contains the components of an enhancement. Currently, each business add-in can contain the following components:
Program enhancements
Menu enhancements
In future releases, the other components included in customer exits will also be available as add-in components.
Several components are created when you define a business add-in:
Interface
Generated class (add-in adapter)
The generated class performs the following tasks:
Filtering: If you implement a filter-dependent business add-in, the adapter class ensures that only the relevant implementations are called
Control: The adapter class calls the active implementations.
This graphic shows the process flow of a program that contains a business add-in call. It enables us to see the possibilities and limitations inherent in business add-ins.
Not displayed: You must declare a reference variable in the declaration part.
In the first step, an existing service class, CL_EXITHANDLER, creates an object reference. We will discuss the precise syntax later on. This completes the preparations for using the program enhancement.
When you define a business add-in, the system generates an adapter class, which implements the interface. In call (2), the interface method of the adapter class is called. The adapter class searches for all of the implementations of the Business Add-In and calls the implemented methods.
First, you must define a reference variable with reference to the business add-in interface. The name of the reference variable does not necessarily have to contain the name of the business add-in.
In the first step (1), an object reference is created. This creates an instance of the generated adapter class, restricted to the methods of the interfaces ("narrowing cast").
You can use this object reference to call the required methods (2).
There are various ways of searching for business add-ins:
You can search in a relevant application program for the string "CL_EXITHANDLER". If a business add-in is called from the program, the "GET_INSTANCE" method of this class must be called.
You can then reach the definition of the business add-in using forward navigation. The definition also contains documentation and a guide for implementing the Business Add-In.
You can also use search tools: Since SAP provided fewer than 50 Business Add-Ins in Release 4.6A, even a list of them all is still manageable.
However, you can also use the application hierarchy to restrict the components in which you want to search. Start the Repository Information System, then choose Environment -> EXIT techniques -> Business Add-Ins" to start the relevant search program.
To implement business add-ins, use transaction SE19 (Tools -> ABAP Workbench -> Utilities -> Business Add-Ins ->Implementation).
Enter a name for the implementation and choose Create. A dialog box appears. Enter the name of the business add-in. The maintenance screen for the business add-in then appears.
Alternatively, you can use the Business Add-In definition transaction to reach its implementations. The menu contains an entry "Implementation", which you can use to get an overview of the existing implementations. You can also create new implementations from here.
You can assign any name to the implementing class. However, it is a good idea to observe the proposed naming convention. The suggested name is constructed as follows:
Namespace prefix, Y, or Z
CL_ (for class)
IM_ (for implementation)
Name of the implementation
To implement the method, double-click its name. The system starts the Class Builder editor.
When you have finished, you must activate your objects.
In the implementing class, you can create your own methods that you then call from the interface method.
You cannot create them using forward navigation. Instead, you must define a regular method in the Class Builder (along with its interface). Specify a visibility for the method, and implement it.
Use the "Activate" icon to activate the implementation of a Business Add-In. From now on, the methods of the implementation will be executed when the relevant calling program is executed.
If you deactivate the implementation, the methods will no longer be called. However, the corresponding calls in the application program are still processed. The difference is that the instance of the adapter class will no longer find any active implementations. Unlike the "CALL CUSTOMER-FUNCTION" call, the "CALL METHOD CL_EXITHANDLER=>GET_INSTANCE" call is still executed even if there are no implementations. The same applies to the statement calling the method of the adapter class.
You can only activate or deactivate an implementation in its original system. Changing it anywhere else constitutes a modification. The activation or deactivation must be transported into subsequent systems.
If a business add-in can only have one implementation, there can still be more than one implementation in the same system. However, only one can be active at any time.
As with customer exits, you can use menu enhancements with Business Add-Ins. However, the following conditions must be met:
The developer of the program you want to enhance must have planned for the enhancement.
The menu enhancement must be implemented in a BAdI implementation.
Function codes of menu enhancements begin with a plus sign '+'.
The menu entry will only appear if there is an active business add-in implementation containing the corresponding enhancement.
You can only create function codes for business add-ins that can only be used once. Moreover, the business add-in cannot be filter-dependent.
These restrictions are necessary to ensure that there are no conflicts between two or more implementations.
If the user chooses the menu entry in the program to which the function code "+" is assigned, the system processes the relevant method call.
The method call and the menu enhancement belong inseparably to one another. Having the former without the latter would make no sense. For this reason, it is important that the two enhancement components are combined in a single enhancement - the business add-in.
To create a BAdI, use the BAdI Builder (Tools -> ABAP Workbench -> Utilities -> Business Add-Ins -> Definition).
RELATED POSTS
Subscribe to:
Post Comments (Atom)
Content
-
▼
2009
(120)
-
▼
March
(87)
- WORK FLOW SCENARIOS IN SD SAP II
- WORK FLOW SCENARIOS IN SD SAP I
- WORK FLOW SAP IV
- WORK FLOW SAP III
- WORK FLOW SAP II
- WORK FLOW SAP I
- BDC SAP X
- BDC SAP IX
- BDC SAP VIII
- BDC SAP VII
- BDC SAP VI
- BDC SAP V
- BDC SAP IV
- BDC SAP III
- BDC SAP II
- BDC SAP I
- BADI SAP III
- BADI SAP II
- BADI SAP I
- BAPI SAP IV
- BAPI SAP III
- BAPI SAP II
- BAPI SAP I
- TABLE CONTROL IN BDC
- USER EXITS IN DETAIL
- BDC AND LSMW COMPARISION
- MODIFICAITONS EXITEDED 57
- SAP MODIDICAITONS 56
- BUSINESS ADD INS 55
- BUSINESS TRANSACTION EVENTS 53
- ENHANCEMENTS USING COSTMER EXITS 54
- ENHANCEMENTS TO DICTIONERY ELEMENTS 52
- CHANGING THE SAP STANDARD 51
- AUTHORISATION CHECKS 50
- COMPLEX LUW PROCESSING 49
- ORGANIZING DATA BASE UPDATES 48
- SAP LOCK CONCEPT 47
- LUW’S AND CLIENT/SERVER ARCHITECHERE 46
- OVERVIEW OF DATABAE UPDATES XXXXV
- LISTS IN SCREEN PROGRAMMING XXXXIV
- CONTEXT MENUS ON SCREENS XXXXIII
- SCREEN ELEMENTS ANDTABLE CONTROLS XXXXII
- SUBSCREEN TABSTRIPS XXXXI
- SCREEN ELEMENTS FOR INPUT AND OUTPUT XXXX
- SCREEN ELEMENTS FOR OUTPUT XXXIX
- IDOC AND BAPI
- DIFFERENCE BETWEEN CONVERSION AND INTERFACE
- INTRODUCITON TO SCREEN PROGRAMMING XXXVIII
- INTERACTIVE LIST TECHNIQUES XXXVII
- SAP LANDSCAPE
- PROGRAM INTERFACE XXXVI
- BASICS OF INTERACTIVE REPORTS XXXV
- ALV GRID CONTROL XXXIV
- SAVING LISTS AND BACK GROUND PROCESSING XXXIII
- DATA FORMATTING AND CONTROL LEVEL PROCESSING XXXII
- SAP QUARY ADMINSTRATION XXXI
- PROGRAMMING DATA RETRIVAL XXX
- LOGICAL DATA BASES XXVIII
- SELECTION SCREENS ABAP REPORT XXIX
- ALV DOCUMENTATION COMPLETE
- FAQ'S ON ABAP CROSS APPLICATIONS
- TECHNIQUES FOR LIST CREATION AND SAP QUARY XXVI
- CALLING PROGRAM AND PASSING DATA XXV
- FUNCTION MODULES AND GROUPS OF ABAP XXIV
- SUB ROUTIENS IN ABAP XXIII
- INTERNAL TABLES IN ABAP XXII
- ABAP STATEMENTS XXI
- DATA TYPES AND DATA OBJECT XX
- ABAP RUN TIME ENVIRONMENT XIX
- SEARCH HELP XVIII
- VIEWS IN ABAP XVII
- CHANGES TO DATA BASE TABLES XVI
- DEPENDENCIES OF DICTIONARY OBJECTS XV
- CONSITENCEY THROUGH INPUT CHECKS XIV
- PERFORMANCE DURING TABLE ACCESS XIII
- ABAP DICTIONARY XII
- ABAP PROJECT OVERVIEW - XI
- REUSE COMPONENTS - X
- DIALOGS AND SCREENS - IX
- USER DIALOGS AND SELECTION SCREEN - VIII
- USER DIALOGS-LISTS - VII
- INTERNAL PROGRAM MODULARIZATION - VI
- DATA BASE DIALOG - V
- ABAP DATA OBJECTS AND STATEMENTS - IV
- ABAP WORK BENCH AND TOOLS - III
- SAP ARCHETECHERE AND DESIGN - II
- SAP NAVIGATION - I
-
▼
March
(87)
Privacy Policy
The articles are copyrighted to Technical Information and can only
be reproduced given the author's permission.Information furnished
in the blog is collected from various Resources.This blog does not
host any files on its server. Please report any broken links in
comment.
If u have any queries contact me at
technicalinformation.websites@gmail.com
0 comments:
Post a Comment