Application Development and Automation 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: 
Read only

Questions regarding User Exits

gopalkrishna_baliga
Participant
0 Likes
1,611

Hi Experts,

I kindly request if you can answer my following questions on User exits.

Q1: Can a user exit defined for a transaction be used for another transaction? For example Can I use user exit, CSSS2000 used for transaction ME21N for transaction ME22N? If Yes, then what is procedure to use it in another transaction?

Q2: How to find the transaction name from User exit? That is, I have a user exit. How do find in which transaction this user exit is used?

Q3: How to debug a user exit?

Q4: What does the following components of an user exit used for?

Function Codes

Screen areas

INCLUDEs

Kindly Help

Gopal

Hi Experts,

I kindly request if you can answer my following questions on User exits.

Q1: Can a user exit defined for a transaction be used for another transaction? For example Can I use user exit, CSSS2000 used for transaction ME21N for transaction ME22N? If Yes, then what is procedure to use it in another transaction?

Q2: How to find the transaction name from User exit? That is, I have a user exit. How do find in which transaction this user exit is used?

Q3: How to debug a user exit?

Q4: What does the following components of an user exit used for?

Function Codes

Screen areas

INCLUDEs

Kindly Help

Gopal

4 REPLIES 4
Read only

Former Member
0 Likes
1,074

Hi Gopal,

1) It depends on the transactions. Some times an user exit will be used in both create and change mode and hence gets triggered.BUt we cannot generalize that.

2) go to smod transaction and find the package to whichh the user exit has been attached to.

go to se93 and press f4, give the package name to get the list of transactions that come under that package.(Not all those transaction use that user exit though).

(or)

place the cursor on your exit in smod and do a where used list.you can find the parts of the code where it is being called.

3) Its simple. Place a break point in the user exit's code and run the transaction.

Read only

Former Member
0 Likes
1,074

1 .You cannot use the same user exit for more than one program.

2. http://www.erpgenie.com/sap/abap/code/abap26.htm

which gives the list of exits for a tcode.

Have a look at the code and the standard tables used in the same. You will understand how to get information abt the tcode in which the user exit is used.

3. Just put a breakpoint in the code of the user exit and then you can debug it.

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

former_member772790
Participant
0 Likes
1,074

Hi Gopal,

A1:Yes u can use one user exit for 2 transactions.it is automatically triggered.

Ex: For IW31/IW32 transactions, Enhancement IW010009- to save the order.just add ur own code in that exit,then it is automatically triggered.

A2: Go to SMOD,give ur enhancement name ,press display,go to components, function modue exits- it self it represents program name in the function module.

Ex: EXIT_SAPLCOIH_009 (ref: A1 EX).here take SAPLCOIH,and then go to se38,type SAPLCOIH,and then press where used list button,check transactions and then enter.then it will display corresponding transactions.

A3: Put the break point in the exit.

A4: Screen areas: To adding the sub screens to the existing transactions.

Includes: To add ur own code to the exit.

-Prasanth.M

Read only

Former Member
0 Likes
1,074

Hi,

A1: ME21N & ME22N refer to the same pgm.So the userexit that you use for tcode ME21N will work for ME22N.You have to check the pgm name for your tcodes.If the pgm names for a pair of tcodes are same then the userexit will work for both.

A2: Generally we try to find whether a particular transaction has an userexit.For that you can go and search for : CALL CUSTOMER-FUNCTION within the source code of your pgm.

A3: Just put a breakpoint in the source code of your userexit that is present in the Z include

A4:-

<u><b>Function Codes</b></u> - Are you talking of menuexits ? They are :

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.

<u><b>Screen Areas</b></u> - Are you talking of screenexits ? They are:

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.

<u><b>INCLUDEs</b></u> - These are the Z* includes.This is the place where you write your source code. This you can find within the Function module exits.

Pravat.