Académique Documents
Professionnel Documents
Culture Documents
U V S Varma
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 : Function 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.
3 Copy right 2009
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 a Business Add-In interface a Business Add-In class that implements the interface
Defining BAdIs
SE18
Click on CREATE
Defining BAdIs
10
11
12
13
Exceptions
14
BADI Implementation
SE19
15
BAdI Implementation
16
Modify the method code within the METHOD/ENDMETHOD statements and activate
17
Using a BAdI
18
19
20
21
22
Three BAdIs used in this program. Double click requi 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
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 Copy right 2009
Select the Interface tab Double click on the Method to enter source code
45
46
Selection screen parameter for Company code Call BADI from within the program
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 Menu enhancements are for Single Use BAdIs only
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 texts screen shows all codes for associated program Function attributes popup allows definition of code type and static texts
50
51
52
Dont forget to activate during all steps in this process! Copy right 2009
53
Dont forget to activate during all steps in this process! Copy right 2009
Dont forget to create a reference to the BADI instance in GLOBAL memory of the application as follows:
54