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

user Exits

Former Member
0 Likes
816

Hi

Do we have any other ways to find the user exits except SMOD

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
774

hi,

just run this program and in the parameters give the tcode for which you want the user exit

REPORT ZPS_EXIT.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

call transaction 'SMOD' and skip first screen.

regards,

pankaj singh

<b>

          • please donot forget to give points</b>

7 REPLIES 7
Read only

Former Member
0 Likes
775

hi,

just run this program and in the parameters give the tcode for which you want the user exit

REPORT ZPS_EXIT.

tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.

tables : tstct.

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

parameters : p_tcode like tstc-tcode obligatory.

select single * from tstc where tcode eq p_tcode.

if sy-subrc eq 0.

select single * from tadir where pgmid = 'R3TR'

and object = 'PROG'

and obj_name = tstc-pgmna.

move : tadir-devclass to v_devclass.

if sy-subrc ne 0.

select single * from trdir where name = tstc-pgmna.

if trdir-subc eq 'F'.

select single * from tfdir where pname = tstc-pgmna.

select single * from enlfdir where funcname =

tfdir-funcname.

select single * from tadir where pgmid = 'R3TR'

and object = 'FUGR'

and obj_name eq enlfdir-area.

move : tadir-devclass to v_devclass.

endif.

endif.

select * from tadir into table jtab

where pgmid = 'R3TR'

and object = 'SMOD'

and devclass = v_devclass.

select single * from tstct where sprsl eq sy-langu and

tcode eq p_tcode.

format color col_positive intensified off.

write:/(19) 'Transaction Code - ',

20(20) p_tcode,

45(50) tstct-ttext.

skip.

if not jtab[] is initial.

write:/(95) sy-uline.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Exit Name',

21 sy-vline ,

22 'Description',

95 sy-vline.

write:/(95) sy-uline.

loop at jtab.

select single * from modsapt

where sprsl = sy-langu and

name = jtab-obj_name.

format color col_normal intensified off.

write:/1 sy-vline,

2 jtab-obj_name hotspot on,

21 sy-vline ,

22 modsapt-modtext,

95 sy-vline.

endloop.

write:/(95) sy-uline.

describe table jtab.

skip.

format color col_total intensified on.

write:/ 'No of Exits:' , sy-tfill.

else.

format color col_negative intensified on.

write:/(95) 'No User Exit exists'.

endif.

else.

format color col_negative intensified on.

write:/(95) 'Transaction Code Does Not Exist'.

endif.

at line-selection.

get cursor field field1.

check field1(4) eq 'JTAB'.

set parameter id 'MON' field sy-lisel+1(10).

call transaction 'SMOD' and skip first screen.

regards,

pankaj singh

<b>

          • please donot forget to give points</b>

Read only

0 Likes
774

Pankaj,

The code you have given is sexy Buddy.Thanks.

K.Kiran

Read only

Former Member
0 Likes
774

u can also search for the term "CUSTOMER-FUNCTION" in the main program of the transaction.

Read only

Former Member
0 Likes
774

take the prog name from tcode and go to se38 give the prog name and in menu utilities---->find in source code i the pop up give call customer it will show you the code like

ALL CUSTOMER-FUNCTION '001'

EXPORTING

I_RM61B = P_AM61B

I_MT61D = P_MT61D

I_SESTA = P_SESTA

I_MKAL = P_MKAL

I_PLAF = P_PLAF

I_WE = P_WE

I_PART_CANC = P_PART_CANC

I_MODE = P_MODE

I_REPTP = P_REPTP

I_NO_DIALOG = P_NO_DIALOG

I_PZPSX_TABIX = P_PZPSX_TABIX

I_T437S = P_T437S

I_TPRRU = P_TPRRU

I_PKOSA = P_PKOSA

IMPORTING

E_RM61B = P_AM61B

TABLES

I_PLAFZ = P_PLAFZ

I_PZPSX = P_PZPSX

EXCEPTIONS

OTHERS = 1.

dbl click on that it will go to abap editor dbl click on 001 it will show you the fn module name copy that ..

come to smod press F4 choose information system give the fn mod name in component name it will show you the enhancement ..

regards

shiba dutta

Read only

kiran_k8
Active Contributor
0 Likes
774

Sarath,

SMOD is one way.The other way is

go to the TCode.

get the program name (for ex-sapm45a or whatever)

open the corresponding program in se80.

pick the search button from Menu bar.

and search for _exit.

If it is what you are seeking then don't forget to reward points.

K.Kiran.

Read only

Former Member
0 Likes
774

Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT

If you know the Exit name, go to transaction CMOD.

Choose menu Utillities->SAP Enhancements.

Enter the exit name and press enter.

You will now come to a screen that shows the function module exits for the exit.

Read only

Former Member
0 Likes
774

Hi Sarath

There are ways to get the userexits. You can go to SPRO and go to the module

where you need the exit (SD or MM). There you will find a icon for Enhancements or Modifications. From the list you can select one.

The other way is go to the transaction for which you need the exit. Get the main program of the transaction. Get the package name. Seach in SMOD with the package name. You will get a list of exits. From the list you can select one.

Or else go to SE80. There will be a a drop down as Enhancements. There also you will get the exits.

Hopw this helps.

Britto