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: 

Find User Exits for a Particular Transaction

Former Member
0 Kudos

Hi,

How do we find a User Exits for a Particular Transaction.

Like do we have any Function Module which return the various User Exits for a Particular transaction like for e.g (XD02)

Regards,

1 ACCEPTED SOLUTION

paruchuri_nagesh
Active Contributor
0 Kudos

hi got tcode se 80 choose option edit object choose radio button transaction press enter you can find program name and package name then goto tcode cmod

enter package name press f4 u will get user exit or

execute this prg

&----


*& Report ZNAGUSREXIT

*&

&----


*&

*&

&----


REPORT ZNAGUSREXIT no standard page heading..

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.

*---End of Program

u will get all user exit of particular tcode

reward if u find use full

regards

nagesh.paruchuri

7 REPLIES 7

Former Member
0 Kudos

Get the development class for XD02 and fo to SMOD and search the user exit for the development class.

Former Member
0 Kudos

hi,

how do i find the development class for XD02.

regards

0 Kudos

Hi,

Go to se93 to view the details of XD02. There you can find the package as FBD.

sharat_chandra
Active Participant
0 Kudos

Hi,

Alternatively , you can also check the package of the transaction in SE80 to find the BAdI's, user exits under the folder " Enhancements".

Regards,

Sharat.

paruchuri_nagesh
Active Contributor
0 Kudos

hi got tcode se 80 choose option edit object choose radio button transaction press enter you can find program name and package name then goto tcode cmod

enter package name press f4 u will get user exit or

execute this prg

&----


*& Report ZNAGUSREXIT

*&

&----


*&

*&

&----


REPORT ZNAGUSREXIT no standard page heading..

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.

*---End of Program

u will get all user exit of particular tcode

reward if u find use full

regards

nagesh.paruchuri

Former Member
0 Kudos

Somya,

Take a look at the following code I found on a forum, possible this one. It is quite nice. I'm sorry to say that I can't recall who the author was. The program displays a list of both enhancements and BADis. You can drill down into the enhancement or Badi from the list.

Bruce

----


tables : tstc,

tadir,

modsapt,

modact,

trdir,

tfdir,

enlfdir,

sxs_attrt ,

tstct.

************************************************************************

data : jtab like tadir occurs 0 with header line.

data : field1(30).

data : v_devclass like tadir-devclass.

data wa_tadir type tadir.

*>> At Selection-Screen data items <<

data: w_pgm like sy-repid.

data: itab like rseui_f4 occurs 0 with header line.

data: dyname like d020s-prog value sy-repid,

dynumb like d020s-dnum value '1000'.

data: begin of dynpfields occurs 3.

include structure dynpread.

data: end of dynpfields.

data: w_tabix like sy-tabix.

data: begin of i_var occurs 0,

variant like varit-variant,

vtext like varit-vtext.

data: end of i_var.

*

************************************************************************

*

selection-screen begin of block b2 with frame title text-001.

*

parameters : p_tcode like tstc-tcode,

p_pgm like d010sinf-prog. " TSTC-PGMNA .

*

selection-screen end of block b2.

*

*>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

*

at selection-screen.

*

if p_tcode = space and

p_pgm = space.

message e000 with 'Transaction or program name must be entered'.

endif.

*

*

*>>>>>>>>> AT Selection-Screen on Value-Request for P_PGM <<<<<<

*

  • >> F4 help for Program Name <<

at selection-screen on value-request for p_pgm.

move 'P_PGM' to dynpfields-fieldname.

append dynpfields.

*>> Read screen values, Program <<

call function 'DYNP_VALUES_READ'

exporting

dyname = dyname

dynumb = dynumb

translate_to_upper = 'X'

tables

dynpfields = dynpfields

exceptions

invalid_abapworkarea = 01

invalid_dynprofield = 02

invalid_dynproname = 03

invalid_dynpronummer = 04

invalid_request = 05

no_fielddescription = 06

undefind_error = 07.

call function 'REPOSITORY_INFO_SYSTEM_F4'

exporting

object_type = 'PROG'

object_name = dynpfields-fieldvalue

suppress_selection = 'X'

importing

object_name_selected = w_pgm

tables

objects_selected = itab

exceptions

cancel = 1

wrong_type = 2

others = 3.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

*>> move selected program to selection screen <<

p_pgm = w_pgm.

*>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

*

start-of-selection.

*

if p_tcode gt space.

select single * from tstc where tcode eq p_tcode.

elseif p_pgm gt space.

tstc-pgmna = p_pgm.

endif.

*

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 in ('SMOD', 'SXSD')

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:/(105) sy-uline.

format color col_heading intensified on.

  • Sorting the internal Table

sort jtab by object.

data : wf_txt(60) type c,

wf_smod type i ,

wf_badi type i ,

wf_object2(30) type c.

clear : wf_smod, wf_badi , wf_object2.

  • Get the total SMOD.

loop at jtab into wa_tadir.

at first.

format color col_heading intensified on.

write:/1 sy-vline,

2 'Enhancement/ Business Add-in',

41 sy-vline ,

42 'Description',

105 sy-vline.

write:/(105) sy-uline.

endat.

clear wf_txt.

at new object.

if wa_tadir-object = 'SMOD'.

wf_object2 = 'Enhancement' .

elseif wa_tadir-object = 'SXSD'.

wf_object2 = ' Business Add-in'.

endif.

format color col_group intensified on.

write:/1 sy-vline,

2 wf_object2,

105 sy-vline.

endat.

case wa_tadir-object.

when 'SMOD'.

wf_smod = wf_smod + 1.

select single modtext into wf_txt

from modsapt

where sprsl = sy-langu

and name = wa_tadir-obj_name.

format color col_normal intensified off.

when 'SXSD'.

  • For BADis

wf_badi = wf_badi + 1 .

select single text into wf_txt

from sxs_attrt

where sprsl = sy-langu

and exit_name = wa_tadir-obj_name.

format color col_normal intensified on.

endcase.

write:/1 sy-vline,

2 wa_tadir-obj_name hotspot on,

41 sy-vline ,

42 wf_txt,

105 sy-vline.

at end of object.

write : /(105) sy-uline.

endat.

endloop.

write:/(105) sy-uline.

skip.

format color col_total intensified on.

write:/ 'No.of Exits:' , wf_smod.

write:/ 'No.of BADis:' , wf_badi.

else.

format color col_negative intensified on.

write:/(105) 'No userexits or BADis exist'.

endif.

else.

format color col_negative intensified on.

write:/(105) 'Transaction does not exist'.

endif.

*

end-of-selection.

*

***********************************************************************

*

at line-selection.

*

data : wf_object type tadir-object.

clear wf_object.

get cursor field field1.

check field1(8) eq 'WA_TADIR'.

read table jtab with key obj_name = sy-lisel+1(20).

move jtab-object to wf_object.

case wf_object.

when 'SMOD'.

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

call transaction 'SMOD' and skip first screen.

when 'SXSD'.

set parameter id 'EXN' field sy-lisel+1(20).

call transaction 'SE18' and skip first screen.

endcase.

Former Member
0 Kudos

Hai,

1.First find the package according to the transaction code.

2.copy the package name

3.go to smod and press f4 help in that choose information and provide the package name and enter. It will show all avilable esits for this t.code.

4. then select exit and goto t.code cmod . Start the project name with z or y then choose component in that provide the exit name and save the project.

it will display the function exit menu exit and screen exit waht ever avilable for this t.code. In the function exit include is there doubleclick on that and press enter it will allow u to impliment u r own code according to u r requirement.

Thanks and Regards,

P.N.Reddy.

Rewards some points if it is helpful.