Sie sind auf Seite 1von 18

Customer Exits

Enhancements to the SAP Standard


with Customer-Exits

October 2004, Growel Softech Ltd.

Usage
Customizing exits allow you to add your own
functionality to SAPs standard business
applications without having to modify the original
applications. SAP creates customer exits for
specific programs, screens, and menus within
standard R/3 applications. These exits do not
contain any functionality. Instead, the customer
exits act as hooks. You can hang your own add-on
functionality onto these hooks.
2

October 2004, Growel Softech Ltd.

Usage
There are two main reasons why you should
use exits rather than modifying SAP software
yourself. Add-ons attached to exits have the
advantage that:
They do not affect standard SAP source code
They do not affect software updates

October 2004, Growel Softech Ltd.

Types of Exits
Menu Exits - Menu exits add items to the
pulldown menus in standard SAP applications.
You can use these menu items to call up your own
screens or to trigger entire add-on applications.
Screen Exits - Screen exits add fields to screens in
R/3 applications. SAP creates screen exits by
placing special subscreen areas on a standard R/3
screen and calling a customer subscreen from the
standard screens flow logic.
4

October 2004, Growel Softech Ltd.

Types of Exits
Function Module Exits - Function module exits add
functions to R/3 applications. Function module exits
play a role in both menu and screen exits. When you
add a new menu item to a standard pulldown menu,
you use a function module exit to define the actions
that should take place once your menu is activated.
Function module exits also control the data flow
between standard programs and screen exit fields.

October 2004, Growel Softech Ltd.

Types of Exits
Field Exits - Field exits allow you to create
your own programming logic for any data
element in the ABAP Dictionary. You can use
this logic to carry out checks, conversions, or
business-related processing for screen fields.

October 2004, Growel Softech Ltd.

Locating Applications that Have


Exits
Choose Utilities Enhancements
Project management from the ABAP
Workbench menu. From here, choose
Utilities SAP enhancements to call a
selection screen that lets you look for the
exits available in standard applications.

October 2004, Growel Softech Ltd.

Locating Exits Using Application


Hierarchy
The SAP Application Hierarchy lists all of the standard
SAP applications and their component parts. You can use
the hierarchy with the Repository Information System to
locate exits available for specific applications or
programs.
1.
2.

Place the cursor on the Materials Management branch of


the Application Hierarchy tree and choose Sel./desel.
subtree. The system marks the application area.
Choose Repository Infosys. The system lets you search
for any objects assigned to a particular application.
October 2004, Growel Softech Ltd.

Locating Exits Using Application


Hierarchy
3. Expand the Environment subtree in the
Repository Information System.
4. Expand the Exit Techniques subtree. Choose either
Enhancements or Projects for specific customer exit
by double-clicking. The system offers a selection
screen that allows you to narrow down your search.
You can leave the fields on this screen empty.
5. Choose Execute.
9

October 2004, Growel Softech Ltd.

Locating Exits Using Application


Hierarchy
The system will retrieve all the enhancements
assigned the category you marked in the
Application Hierarchy.
To display the individual exits that each
enhancement package contains, select the
enhancement and choose the Display icon.

10

October 2004, Growel Softech Ltd.

Creating an Add-On Project


An add-on project contains a series of exits,
as well as the add-ons that you develop to
attach to these exits (like menu entries or
function modules). To create an add-on
project from within the ABAP Workbench
menu, choose Utilities Enhancements
Project management.
11

October 2004, Growel Softech Ltd.

Creating an Add-On Project


1. After you have specified the name of your new project, proceed as
follows:
2. Choose Create.
3. Describe the nature of the project by providing a short descriptive
text.
4. Choose Save. The system then prompts you to assign a change
request. This assignment allows you to transport the project and its
components into a productive system once you have completed it.
5. Specify which SAP enhancement packages you want to include in
your project by choosing SAP enhancements.
6. Enter the names of these SAP enhancements in the spaces
provided.
12

October 2004, Growel Softech Ltd.

Activating and Deactivating a


Project
After you have attached add-on
functionality to the exits in your project, you
need to activate the project. Activating a
project turns on all your add-ons.
When you activate your project, the system
turns on all add-ons that the project
contains. You cannot activate individual
add-ons separately.
13

October 2004, Growel Softech Ltd.

Creating Customer-Specific
Menus

14

Menu exits allow you to add your own functions to the pulldown
menus in standard R/3 transactions.
1. Select Enhancement components and choose Change. The system
lists all customer exits contained in the enhancements included in
your project.
2. Place the cursor on the menu exit you want to add your own
function to.
3. Choose Edit component. The system displays technical information
about the menu entry. It also displays two input fields where you
can specify a language and the text you want your menu item to
have.
4. Enter the name of your menu function (such as Special order
method) in the field New text.
5. Choose Save text.
October 2004, Growel Softech Ltd.

Creating Customer-Specific
Subscreens

Screen exits allow you to add your own fields to specified screens in
standard R/3 transactions.
1.
2.
3.

4.
5.
6.
7.

15

Select Enhancement components and choose Change. The system lists all
customer exits contained in the enhancements included in your project.
Place the cursor on the screen exit you want to create your own subscreen for.
Choose Edit component. The system prompts you to enter a development class
for your subscreen. Use the development class that contains all of the objects
created for this specific enhancement project. The system then transfers you to
the Screen Painter.
Create your subscreen using the Screen Painter.
Add modules to the screen flow logic as needed. Enter the name of the module in
the flow logic editor, then double-click on the module name and the system
automatically creates the module in the corresponding function module program.
Generate your screen and choose Back (the green arrow) to return to the Project
management transaction.
Once you activate your enhancement project, the fields defined in your
subscreen will appear in the standard R/3 transaction.
October 2004, Growel Softech Ltd.

Creating Customer-Specific
Function Modules

Function module exits allow you to implement your own functions and
processing logic in standard R/3 programs.
1.
2.
3.

4.
5.
6.
7.

16

Select Enhancement components and choose Change. The system lists all the
customer exits contained within the enhancements included in your project.
Place the cursor on the function module exit you want to use.
Choose Edit component. The system displays the exits corresponding function
module, which has been prepared by an SAP application developer. You can fill
this module with functions you want by calling the include program (called
ZXnnnU01) contained within the module and inserting your own source code
into it. Both the function module and the include program lie within the
namespace reserved for customers.
Call the function modules include program by double-clicking on it. The system
asks you if you want to create the include program.
Confirm that you want to create the include program.
Enter your functions source code in the editor.
Save your include program.

October 2004, Growel Softech Ltd.

Using Field Exits


1.
2.
3.
4.
5.
6.
7.

17

Enter the Project management transaction by choosing Utilities


Enhancements Project management from the ABAP Workbench
menu.
Choose Text enhancements Field exits.
Choose Field exit Create.
Enter the name of the data element.
Choose Continue. The system takes you into the Function Builder
and suggests a name for your function module
(FIELD_EXIT_BBBNR). It is advisable to use this name.
Create the source code and, if needed, global data for your function
module.
Activate the function module.

October 2004, Growel Softech Ltd.

Using Field Exits


After you have created the processing logic for your
field exit, you must assign the exit to one or more
programs and screens.
To assign your field exit module to one or more
screens, proceed as follows:
Select the field exit.
Choose Assign prog./screen.
Enter the name of the program and the screen number.
Choose Save.
18

October 2004, Growel Softech Ltd.

Das könnte Ihnen auch gefallen