Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

hi

Former Member
0 Kudos

can any one tell me the procedure for creating field exits , menu exits & screen exits.

thanks

4 REPLIES 4

Former Member

former_member1052991
Active Participant
0 Kudos

hi swathi,

refer this link...

http://abapprogramming.blogspot.com/2008/03/sap-user-exits.html

rgds,

guna...

ak_upadhyay
Contributor
0 Kudos

Hi,

Field Exits

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

The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. The field exit concept lets you create a special function module that contains this logic.

You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

To create your own logic for a particular data element, proceed as follows:

Enter the Project management transaction by choosing Utilities ® Enhancements ® Project management from the ABAP Development Workbench menu.

Choose Text enhancements ® Field exits.

Choose Field exit ® Create.

Enter the name of data element.

Choose Continue.

The system takes you into the Function Library and suggests a name for your function module ( FIELD_EXIT_BBBNR ). You should use this name.

Create the source code and, if needed, global data for your function module.

Activate the function module.

After you have created the processing logic for your field exit, you must assign the exit to one or more programs and screens. This assignment tells the system which screens to trigger your function module on.

If your processing logic checks naming conventions for a certain field, for example, you might want to trigger the field exit module only on screens where new data can be written to the database. If another screen allows you to display data only, then you can leave out the special function module call. 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.

For some fields, you might want to trigger a different processing logic on different screens. You can trigger screen-specific logic by allocating a field exit identifier when you make your screen assignments. A field exit identifier can be any number or letter. The field exit identifier tells the system to trigger the function module that has this identifier in its name.

If a user makes an entry into the BBBNR-related field in screen 2300, the system triggers the function module called FIELD_EXIT_BBBNR_1 . If the user makes the same entry in screen 3450, the system triggers the function FIELD_EXIT_BBBNR_2 .

After you have created one or more function modules and assigned them to programs and screens, you need to activate the field exit. Choose Field exit ® Activate. The system will trigger the processing logic in your function modules according to the screen assignments you made.

User exit - A user exit is a three character code that instructs the system to access a program during system processing.

SXX: S is for standard exits that are delivered by SAP. XX represents the 2-digit exit number.

UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number

Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s 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. *-- Mani

The following document is about exits in SAP :-

The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications.

SAP creates user 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.

Types of Exits

There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

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.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

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 screen’s flow logic.

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 pull down 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. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs.

These calls have the following syntax:

CALL CUSTOMER-FUNCTION ‘001’.

Field Exits

Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field. Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100.

The field exit concept lets you create a special function module that contains this logic.

You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number.

In 4.6c, you can use "RSMODPRF" program to create field exits.

An example of a user exits :-

MODULE user_exit_0001 INPUT

CASE okcode.

WHEN 'BACK OR EXIT'.

CASE sy-dynnr.

WHEN '100'.

SET SCREEN 0.

LEAVE SCREEN.

WHEN '200'.

Note that you can write any code that satisfy your needs.

But in this case, this was wrote as a sample code for reference sake.

And you can test it.

SET SCREEN 100.

LEAVE SCREEN.

ENDCASE.

ENDCASE.

Procedure for Creating MENU Exits.

1) To get into Area Menu Maintenance Screen Type SE43 T.Code in Command

Line.

2) In Area Menu Paramenter type 'S000' (S triple Zero)

3) Then Press Change Icon in Application Tool Bar. Then It may ask for

Access Key it may display "Specify Processing mode" window. If it ask

for the Access Key Check for the availability of OSS Note and apply to open

Standard SAP Menu to include MENU Exits. Otherwise, if it display "Specify

Processing mode" window with Three Push Button. In which select "Change" and

proceed further.

4) Then it will display "Information" window with the following information

"Caution : The Original Language of the structure is German (editing lang. :

English) ". Then press "Enter Key to proceed further.

5) Then you will get into "Edit Area Menu S000".

6) for eg:- Expand Tools Menu.

7) Then Press ABAP Workbench .

😎 Then you will get into ABAP Workbench Menu Tree.

9) Then Expand Utilities Menu.

10) In the last line you will find one MENU EXIT Provision to include your

own menu. "Node Text Not Found" This text can be change by double Clicking

that. There you can find the T.Code. Here for Eg:- "+DW4".

11) for eg: - Here change the Text to "Sample Menu Exit" and then note down

the T.Code "+DW4".

12) Then Save with Change Request Number and come out of Transaction SE43.

13) Then Goto Transaction SE93.

14) Then type T.Code "+DW4" and press Create.

15) Then proceed further to create transaction called "+DW4".

Do reward if useful....

Regards

AK

Former Member
0 Kudos

Hi,

Use this link

[http://sap.niraj.tripod.com/id21.html]

Regards

Sandipan