Professional Documents
Culture Documents
Business Add-Ins
November, 2003
deeper
Lesson Objectives
After completing this lesson you will be able to : Understand what Business Add Ins (BAdIs) are Define BAdIs Implement BAdIs
Use BAdIs
Create an implementation for an existing SAP BAdI Create Multiple Use BAdIs Create Filter Dependent BAdI Create Menu Enhancement with BAdI
Introduction
Traditional way of doing code modifications Exits 3 Tier Architecture
PRESENTATION :
Field Exits Screen Exits Menu Exits
APPLICATION:
Programs -> Program exits -> call customer function -> Include
DATABASE
Table -> SE11 -> Goto -> Append Structure
With BAdIs you can make changes only at the Application Layer.
BAdIs
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects They can be inserted into the SAP system based on specific user requirements Business Add-Ins should be considered generalized Business Transaction Events that can be used to bundle program, menu and screen enhancements into a single add-in. Each Business Add-In has :
at least one Business Add-In definition
Defining BAdIs
SE18
Click on CREATE
Defining BAdIs
10
11
12
13
Exceptions
14
BADI Implementation
SE19
Click on create
15
BAdI Implementation
16
Modify the method code within the METHOD/ENDMETHOD statements and activate
17
Using a BAdI
18
Execute SAP transaction and test if method with custom code is being invoked
19
20
21
22
Three BAdIs used in this program. Double click required BAdI to see the source code
23
24
25
Click on CREATE
26
Enter description
27
28
29
30
31
32
33
34
35
36
37
38
39
Enter text Double click on the Interface to add parameters and methods
40
41
42
43
Click on button to create an entry for filter value Select a value from the search help or enter a valid value
44
45
Enter code for the Method to calculate the tax rate based on the company code in Parameter FLT_VAL
46
Call method get_bukrs passing the company code The Tax rate is returned
47
Fcodes tab is only available when multiple use box is not checked
48
Enter related program and function code information. Double clicking on the new line will take you to dialog for defining an icon and function texts
49
Function attributes popup allows definition of code type and static texts
50
51
Dont forget to create a reference to the BADI instance in GLOBAL memory of the application as follows: DATA o_exit TYPE REF TO zif_ex__menu_exit_badi_1. "BADI interface
54
55