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: 

tcode exit

Former Member
0 Kudos

hi all,

is there any tcode where i enter the tcode and it gives me the exits implemented for that tcode , not the list of exits for the tcode.

1 ACCEPTED SOLUTION

former_member480923
Active Contributor
0 Kudos

There is no Tcode but you can use the following custom program to find out the Active exits in a package.



*&---------------------------------------------------------------------*
*& Report  ZTEST_READ_EXIT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ztest_read_exit.

TYPE-POOLS: abap.

TYPES: BEGIN OF types_exits,
       obj_name TYPE obj_name,
       korrnum  TYPE trkorr_old,
       cproject TYPE cproject,
       project  TYPE modname,
       active   TYPE abadr_flag,
       END OF types_exits.


CONSTANTS: c_prog TYPE pgmid     VALUE 'R3TR',
           c_exit TYPE trobjtype VALUE 'SMOD'.


DATA: gt_exits TYPE STANDARD TABLE OF types_exits.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
PARAMETER: p_dev TYPE devclass OBLIGATORY,
           p_act TYPE boole_d DEFAULT abap_true.
SELECTION-SCREEN: END OF BLOCK b1.



** Start of Selection

START-OF-SELECTION.


  SELECT obj_name
         korrnum
         cproject
         FROM tadir INTO TABLE gt_exits
         WHERE pgmid    = c_prog
           AND object   = c_exit
           AND devclass = p_dev.
  IF sy-subrc = 0.
** Modify the table to find only active exits.
    PERFORM sub_find_active.
** Display the output
    PERFORM sub_display_output.
  ELSE.

  ENDIF.
*&---------------------------------------------------------------------*
*&      Form  SUB_FIND_ACTIVE
*&---------------------------------------------------------------------*
*       Find Only Active Exits
*----------------------------------------------------------------------*
FORM sub_find_active .

  FIELD-SYMBOLS: <l_exit> TYPE types_exits.

  DATA: l_mod TYPE modmember.


  LOOP AT gt_exits ASSIGNING <l_exit>.

    l_mod = <l_exit>-obj_name.

    CALL FUNCTION 'ABADR_CHECK_EXIT_ACTIVE'
      EXPORTING
        i_enhancement = l_mod
      IMPORTING
        e_project     = <l_exit>-project
        e_is_active   = <l_exit>-active.

  ENDLOOP.

  IF p_act = abap_true.
    DELETE gt_exits WHERE active EQ abap_false.
  ENDIF.

ENDFORM.                    " SUB_FIND_ACTIVE
*&---------------------------------------------------------------------*
*&      Form  SUB_DISPLAY_OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM sub_display_output .

  DATA: lt_return   TYPE REF TO cl_salv_table.
** Call the SALV table
  TRY.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = lt_return
        CHANGING
          t_table      = gt_exits.
    CATCH cx_salv_msg .
  ENDTRY.
** Display the output
  lt_return->display( ).

ENDFORM.                    " SUB_DISPLAY_OUTPUT

Hope That Helps

Anirban M.

4 REPLIES 4

former_member480923
Active Contributor
0 Kudos

There is no Tcode but you can use the following custom program to find out the Active exits in a package.



*&---------------------------------------------------------------------*
*& Report  ZTEST_READ_EXIT
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  ztest_read_exit.

TYPE-POOLS: abap.

TYPES: BEGIN OF types_exits,
       obj_name TYPE obj_name,
       korrnum  TYPE trkorr_old,
       cproject TYPE cproject,
       project  TYPE modname,
       active   TYPE abadr_flag,
       END OF types_exits.


CONSTANTS: c_prog TYPE pgmid     VALUE 'R3TR',
           c_exit TYPE trobjtype VALUE 'SMOD'.


DATA: gt_exits TYPE STANDARD TABLE OF types_exits.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-s01.
PARAMETER: p_dev TYPE devclass OBLIGATORY,
           p_act TYPE boole_d DEFAULT abap_true.
SELECTION-SCREEN: END OF BLOCK b1.



** Start of Selection

START-OF-SELECTION.


  SELECT obj_name
         korrnum
         cproject
         FROM tadir INTO TABLE gt_exits
         WHERE pgmid    = c_prog
           AND object   = c_exit
           AND devclass = p_dev.
  IF sy-subrc = 0.
** Modify the table to find only active exits.
    PERFORM sub_find_active.
** Display the output
    PERFORM sub_display_output.
  ELSE.

  ENDIF.
*&---------------------------------------------------------------------*
*&      Form  SUB_FIND_ACTIVE
*&---------------------------------------------------------------------*
*       Find Only Active Exits
*----------------------------------------------------------------------*
FORM sub_find_active .

  FIELD-SYMBOLS: <l_exit> TYPE types_exits.

  DATA: l_mod TYPE modmember.


  LOOP AT gt_exits ASSIGNING <l_exit>.

    l_mod = <l_exit>-obj_name.

    CALL FUNCTION 'ABADR_CHECK_EXIT_ACTIVE'
      EXPORTING
        i_enhancement = l_mod
      IMPORTING
        e_project     = <l_exit>-project
        e_is_active   = <l_exit>-active.

  ENDLOOP.

  IF p_act = abap_true.
    DELETE gt_exits WHERE active EQ abap_false.
  ENDIF.

ENDFORM.                    " SUB_FIND_ACTIVE
*&---------------------------------------------------------------------*
*&      Form  SUB_DISPLAY_OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM sub_display_output .

  DATA: lt_return   TYPE REF TO cl_salv_table.
** Call the SALV table
  TRY.
      CALL METHOD cl_salv_table=>factory
        IMPORTING
          r_salv_table = lt_return
        CHANGING
          t_table      = gt_exits.
    CATCH cx_salv_msg .
  ENDTRY.
** Display the output
  lt_return->display( ).

ENDFORM.                    " SUB_DISPLAY_OUTPUT

Hope That Helps

Anirban M.

Former Member
0 Kudos

hi,

apart from this any other method....this also solves the problem but it's not a permanent solution....

0 Kudos

HI

one more procedure

steps

1) GOTO SE93 TCODE

2)ENTER THE TCODE WHICH YOU WANT TO FIND THE USER EXIT

3)CLICK ON DISPLAY

4)DOUBLE CLICK ON THE PROGRAM NAME

5)IT WILL TAKE YOU TO THE PROGRAM

6)GOTO -> ATTRIBUTES

7)TAKE THE PACKAGE NAME

NEXT OPEN ANOTHER TCODE CMOD

1)PRESS F4

2)CLICK ON INFORMATION SYSTEM

3)ENTER THE PACKGE NAME

4) CLICK ON OK

5)IT WILL GIVE LIST OF USER EXITS AVAILBALE FOR THAT TCODE

Former Member
0 Kudos

Hi,

You could try searching the main program for "userexit_"

This would give you a list of all the available user exits within the application.

For Customer exits, you could search SMOD with a short description ex: order in the F4 help. Another way is to search for CUSTOMER-FUNCTION in the main program. You can then navigate to the enhancement in the customer function and use the Z Program in the enhancement.

http://www.easymarketplace.de/userexit.php - has a complete list.

More specifically, in case you're looking for SD exits - http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm.

Regards

Kiran