Beruflich Dokumente
Kultur Dokumente
Topics
Overview How to create enhancements Function Module exits Menu exits Screen exits BADI
2
10
11
Menu Exits
Attach functions to menu options in SAP. Adds text to the menu entry.. Becomes visible in the SAP menu when we activate the exit. When this menu is chosen SAP executes standard code or custom code.
12
Menu Exits
Requirements
The GUI interface should have function codes with plus sign (+) Function codes appear in GUI only on activation. Function codes do not appear on screen.
13
Screen Exits
Makes use of reserved sections of main screen Use
Displays additional information Users can also input data in this section.
Screen Exit
Screen Exits are inactive at first & skipped when screen is processed. For processing screen exit
Create subscreen in enhancement project Activate the project
15
Screen Exit
Transporting Data to Subscreen
Global data of calling program is not known to function grp containing subscreen. Function module exits are used CALL CUSTOMER-FUNCTION 001 EXPORTING I_var = gi_field Gi_field (Global data)
16
Screen Exit
Transporting data from subscreens
Transports data from subscreen to global data Function module exits are used CALL CUSTOMER-FUNCTION 001 IMPORTING I_var = gi_field Gi_field (Global data)
17
Screen Exit
Steps
Create subscreen Create PBO/PAI modules Do not change the interfaces in the calling function grp that the subscreen & function module exit belong Do not add function modules to the calling function group
18
BADI
Object Oriented
BADI
Advantages
Reusable Implemented using OOPs
Until 4.0 function groups & modules were nearest to OOPs. However the differentiation factor was instance management (Global Data)
20
BADI Working
How BADI works
Enhancements are possible by SAP application programs Requires 1 interface & 1 adapter class that implements this interface Interface is implemented by the user
21
BADI Components
BADI contains components of enhancement Following components are contained in BADI
Program enhancements Menu enhancements
BADI Components
Following components get created when we define BADI
Interface Generated Class (Adapter) which implements the interface
23
BADI Components
Interface
Has definition of its own No implementation of its own Implemented by classes
24
BADI Components
Adapter Class performs following functions:
Filtering (Ensures only relevent implementations are called) Control (Calls the active implementation)
25
26
3. Use this object reference to call required methods available with enhancement
27
28
BADI Definition
Naming
<BADI> <ZBADI> /Namespace/<BADI>
30
Interface
Naming
IF_EX_<BADI> ZIF_EX_<BADI> /namespace/IF_EX_<BADI>
31
Adapter Class
Naming
CL_EX_<BADI> ZCL_EX_<BADI> /namespace/CL_EX_<BADI>
32
BADI Implementation
Naming
<IMPL> <ZIMPL> /namespace/<impl>
There can be only 1 active implementation Activation/Deactivation possible only in original system.Has to be transported
33
BADI Reusability
Define the BADI once Tick the checkbox multiple use/ Reusable Define multiple implementations. Note :- We cannot define the sequence in which the implementations will be processed.
34
BADI Implementation
1 BADI defn can have multiple BADI implementations even though the multiple use box is not ticked. Here there will be only 1 active implementation.
35
BADI Filters
BADI can be filter dependant Specify filter type in form of Data Element When enhancement called pass the filter value.
36
Questions
37
Thank You
38