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: 

Query regarding exits

Former Member
0 Kudos
111

Hi ,

Can anybody clearly explain the difference between user exits and customer exits with some example.

5 REPLIES 5

Former Member
0 Kudos
70

hi,

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.

Njoy SAP

former_member181962
Active Contributor
0 Kudos
70

Refer these links:

Regards,

ravi

Former Member
0 Kudos
70

Hi Neetesh

As we know that we cant directly modify SAP standard objects.Though its possible by providing ACCESS key but its not advisable.

But SAP gave some EXITS by using these we can add some extra functionality to SAP standard objects.These are called User-exits

There are different types of exits

Menu exit

Screen exit

Field exit

FM exit

For this we have to use SMOD and CMOD tcode

SMOD is being used for to find out the EXITS for a perticular program provided by SAP

then We will use it in CMOD...These are know as Customer exits.

Now u understand i think..

Reward me points if helpful

Regards

Manas Ranjan Panda

dani_mn
Active Contributor
0 Kudos
70

HI,

<b>User-exits</b> are empty subroutines that SAP have provided to be filled by us. we can fill them with our own source code, they are in the standard sap programs so, technically this is a modification.

<b>Customer exits</b> are nothing but a include name starting with z, Included in a function module which starts with CALL CUSTOMER.

we can write our own logic in this include, and this will be called from the standard program. after the enhancement project get activiated using 'CMOD'.

REgards,

Former Member
0 Kudos
70

Hello,

User exists are the exists provided by SAP in the form of subroutines.

Customer exists are the exists provided by SAP in the form of FM's.

Now SAP has totally implemented this exists in the form of BADI's ( Object oriented).

Follow the below steps to find out what all BADI's are called when you press any button in any transaction.

1) Goto se24 (Display class cl_exithandler)

2) Double click on the method GET_INSTANCE.

3) Put a break point at Line no.25 (CASE sy-subrc).

Now

4) Execute SAP standard transaction

5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.

6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.

7) This way you will find all the BADIs called on click of any button in any transaction.

These customer exists will have the following,

a. Screen exit

b. Menu Exits

c. FM exits

d. BADI's

e. BTE ( Business Transaction Events )

f. Field exits

Regs,

Venkat Ramanan N

Message was edited by: Venkat Ramanan Natarajan

Message was edited by: Venkat Ramanan Natarajan