Obtain the relevant user-exit/finding user-Exits of a sap transaction code based on T-code.

Source: Internet
Author: User

You can use the following program and enter T-code to obtain the relevant user-exit. You can double-click the corresponding user-exit to view the corresponding function module and function group information.

*&---------------------------------------------------------------------*
* & Report zuserexit
*&
*&---------------------------------------------------------------------*
* & * Finding the user-Exits of a sap transaction code
*
* Enter the transaction code in which you are looking for the user-exit
* And it will list you the list of user-exits in the transaction code.
* Also a drill down is possible which will help you to branch to smod.
*&
*&---------------------------------------------------------------------*

Report zuserexit 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 exist '.
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.