*&---------------------------------------------------------------------* *& Enter the transaction code that you want to search through in order *& to find which Standard SAP User Exits exists. *& *&---------------------------------------------------------------------*
*&---------------------------------------------------------------------* *& Start of main program *&---------------------------------------------------------------------*
START-OF-SELECTION.
* Validate Transaction Code SELECTSINGLE * FROM tstc WHERE tcode EQ p_tcode.
* Find Repository Objects for transaction code IF sy-subrc EQ0. SELECTSINGLE * FROM tadir WHERE pgmid = 'R3TR' AND object = 'PROG' AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE0. SELECTSINGLE * FROM trdir WHERE name = tstc-pgmna.
IF trdir-subc EQ'F'.
SELECTSINGLE * FROM tfdir WHERE pname = tstc-pgmna.
SELECTSINGLE * FROM enlfdir WHERE funcname = tfdir-funcname.
SELECTSINGLE * FROM tadir WHERE pgmid = 'R3TR' AND object = 'FUGR' AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass. ENDIF. ENDIF.
* Find SAP Modifactions SELECT * FROM tadir INTOTABLE jtab WHERE pgmid = 'R3TR' AND object = 'SMOD' AND devclass = v_devclass.
SELECTSINGLE * FROM tstct WHERE sprsl EQ sy-langu AND tcode EQ p_tcode.
LOOPAT jtab. SELECTSINGLE * FROM modsapt WHERE sprsl = sy-langu AND
name = jtab-obj_name. FORMATCOLORCOL_NORMALINTENSIFIED OFF. WRITE:/1 sy-vline, 2 jtab-obj_name HOTSPOTON, 21 sy-vline , 22 modsapt-modtext, 95 sy-vline. ENDLOOP.
WRITE:/(95) sy-uline. DESCRIBETABLE jtab. SKIP. FORMATCOLOR COL_TOTAL INTENSIFIEDON. WRITE:/ 'No of Exits:' , sy-tfill. ELSE. FORMATCOLORCOL_NEGATIVEINTENSIFIEDON. WRITE:/(95) 'No User Exit exists'. ENDIF. ELSE. FORMATCOLORCOL_NEGATIVEINTENSIFIEDON. WRITE:/(95) 'Transaction Code Does Not Exist'. ENDIF.
* Take the user to SMOD for the Exit that was selected. ATLINE-SELECTION. GETCURSORFIELD field1. CHECK field1(4) EQ'JTAB'. SETPARAMETERID'MON'FIELD sy-lisel+1(10). CALLTRANSACTION'SMOD'ANDSKIPFIRSTSCREEN.
Serkan AKKAVAK Computer Engineer ABAP Developer & SAP MM SD Consultant Contact : serkurumsal@yandex.com
Social Plugin