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: 

list all exits for a particular transaction

Former Member
0 Kudos

Hi,

can anybody tell me how to list all the exits available for a tcode

points will be rewarded

2 REPLIES 2

Former Member
0 Kudos

hi,

In order to find out the user exits for any tcode,

1. get the developement class of the tcode from SE93.

2. Now goto transaction SMOD and press F4,

3. give in the Deve class in the dev class and Press ENTER

this will show u the exits for any tcode.

or execute this report

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

which gives the list of exits for a tcode

Rgds

Reshma

former_member189059
Active Contributor
0 Kudos

Just run this program and specify your tcode as the parameter


*&---------------------------------------------------------------------*
*& Report  Z_FINDEXIT
*&
*&---------------------------------------------------------------------*
*&    Finding the user-exits of a SAP transaction code
*&
*&---------------------------------------------------------------------*

REPORT  z_findexit NO STANDARD PAGE HEADING.

INCLUDE <icon>.

TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
TABLES : tstct, modsap , tftit , modattr.

DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
DATA : v_text(10).

PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.

START-OF-SELECTION.

  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(10) p_tcode,
         35(50) tstct-ttext.
    SKIP.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED OFF.
    WRITE : /3 'E - Function Exit',
            25 'S - Screen Exit',
            45 'T - Table Exit',
            64 'C -  GUI Code',
            103 space.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    WRITE : /3 icon_activate AS ICON,
             5 ' - Part of Active Project',
            31 icon_deactivate AS ICON,
            33 ' - Part of Deativated Project',
            63 'SPACE' ,
            69 '- Not Assignment to Project',
            103 space.


    IF NOT jtab[] IS INITIAL.
      WRITE:/(103) sy-uline.
      FORMAT COLOR COL_HEADING INTENSIFIED ON.
      WRITE:/1 sy-vline,
             2 'Exit Name',
            13 sy-vline ,
            14 'Description',
            75  sy-vline,
            79 sy-vline,
            82 'E',
            84 sy-vline,
            86 'S',
            89 sy-vline,
            91 'T',
            94 sy-vline,
            96 'C',
            99 sy-vline,
            103 sy-vline.

      WRITE:/(103) 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(10) jtab-obj_name HOTSPOT ON,
             13 sy-vline ,
             14 modsapt-modtext,
             75 sy-vline,
             76 icon_information AS ICON HOTSPOT ON,
             79 sy-vline.
*          inserted by pavan
        SELECT SINGLE * FROM modsap
                 WHERE name = jtab-obj_name
                 AND typ = 'E'.
        IF sy-subrc = 0.
          WRITE : 80 icon_green_light AS ICON.
        ELSE.
          WRITE : 80 icon_red_light AS ICON.
        ENDIF.
        WRITE : 84 sy-vline.
        SELECT SINGLE * FROM modsap
                 WHERE name = jtab-obj_name
                 AND typ = 'S'.
        IF sy-subrc = 0.
          WRITE : 85 icon_green_light AS ICON.
        ELSE.
          WRITE : 85 icon_red_light AS ICON.
        ENDIF.
        WRITE : 89 sy-vline.
        SELECT SINGLE * FROM modsap
                 WHERE name = jtab-obj_name
                 AND typ = 'T'.
        IF sy-subrc = 0.
          WRITE : 90 icon_green_light AS ICON.
        ELSE.
          WRITE : 90 icon_red_light AS ICON.
        ENDIF.
        WRITE : 94 sy-vline.
        SELECT SINGLE * FROM modsap
                 WHERE name = jtab-obj_name
                 AND typ = 'C'.
        IF sy-subrc = 0.
          WRITE : 95 icon_green_light AS ICON.
        ELSE.
          WRITE : 95 icon_red_light AS ICON.
        ENDIF.
        WRITE : 99 sy-vline.
        SELECT SINGLE * FROM modact
                        WHERE  member = jtab-obj_name.
        IF sy-subrc = 0.
          SELECT SINGLE * FROM modattr
                          WHERE name = modact-name.
          IF modattr-status = 'A'.
            WRITE : 100 icon_activate AS ICON.
          ELSE.
            WRITE : 100 icon_deactivate AS ICON.
          ENDIF.
        ENDIF.
        WRITE : 103 sy-vline.

      ENDLOOP.
      WRITE:/(103) 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.
  IF field1 = 'ICON_INFORMATION'.
    v_text =  sy-lisel+1(10).
    FORMAT COLOR COL_HEADING.
    WRITE sy-uline(100).
    WRITE: /1 sy-vline,
           3 v_text COLOR COL_HEADING,
           25(60) sy-lisel+13(60) COLOR COL_HEADING,
           99 space COLOR COL_HEADING,
           100 sy-vline.
    WRITE sy-uline(100).
    PERFORM display_exit_details.
  ELSE.
    CHECK field1(4) EQ 'JTAB'.
    SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
  ENDIF.

*& Form  display_exit_details
*&---------------------------
FORM display_exit_details .
  CLEAR modsap.
* FUnction Exits
  FORMAT COLOR COL_GROUP INTENSIFIED OFF.
  SELECT * FROM  modsap
           WHERE name = v_text
           AND   typ = 'E' .
    WRITE : /1 sy-vline,
          3(20) modsap-member.
    SELECT SINGLE * FROM tftit
                    WHERE spras = 'EN'
                    AND   funcname = modsap-member.
    WRITE : 24 sy-vline,
            25(75) tftit-stext,
            100 sy-vline .
  ENDSELECT.
  IF sy-subrc = 0.
    WRITE sy-uline(100).
  ENDIF.
  CLEAR modsap.

* Screen Exits
  FORMAT COLOR COL_KEY INTENSIFIED OFF.
  SELECT * FROM  modsap
           WHERE name = v_text
           AND   typ = 'S'.
    WRITE : /1 sy-vline,
          3 modsap-member,
          99 space,
          100 sy-vline.
  ENDSELECT.
  IF sy-subrc = 0.
    WRITE sy-uline(100).
  ENDIF.
  CLEAR modsap.

* Table Exits
  FORMAT COLOR COL_KEY INTENSIFIED OFF.
  SELECT * FROM  modsap
           WHERE name = v_text
           AND   typ = 'T'.
    WRITE : /1 sy-vline,
          3 modsap-member,
          99 space,
          100 sy-vline.
  ENDSELECT.
  IF sy-subrc = 0.
    WRITE sy-uline(100).
  ENDIF.
  CLEAR modsap.

* GUI Exits
  FORMAT COLOR COL_KEY INTENSIFIED OFF.
  SELECT * FROM  modsap
           WHERE name = v_text
           AND   typ = 'C'.
    WRITE : /1 sy-vline,
          3 modsap-member,
          99 space,
          100 sy-vline.
  ENDSELECT.
  IF sy-subrc = 0.
    WRITE sy-uline(100).
  ENDIF.
ENDFORM.                    "display_exit_details