*&---------------------------------------------------------------------*
*&Report ZLM_ENHANMENT_SEARCH
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZLM_ENHANMENT_SEARCH.
*&---------------------------------------------------------------------*
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits and BADIs
*&
*&---------------------------------------------------------------------*
*&For field 'SUBC' of table 'TRDIR':
*& M Module Pool
*& F Function group
*& S Subroutine Pool
*& J Interface pool
*& K Class pool
*& T Type Pool
*& X XSLT Program
*&---------------------------------------------------------------------*
*&Tables
*&---------------------------------------------------------------------*
TABLES: tstc , " SAP Transaction Codes
tadir , " Directory of Repository Objects
modsapt , " SAP Enhancements - Short Texts
sxs_attrt, " SAP BADI - short text
modact , " Modifications
trdir , " System table TRDIR
tfdir , " Function Module
enlfdir , " Additional Attributes for Function Modules
tstct . " Transaction Code Texts
*&---------------------------------------------------------------------*
*&Variables
*&---------------------------------------------------------------------*
DATA: jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA: field1(30).
DATA: v_devclass LIKE tadir-devclass.
DATA: object LIKE tadir-object.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA: opt TYPE ctu_params.
*&---------------------------------------------------------------------*
*&Selection Screen Parameters
*&---------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS: p_tcode LIKE tstc-tcode OBLIGATORY. "事物代码
SELECTION-SCREEN SKIP.
PARAMETERS: exit RADIOBUTTON GROUP 1 DEFAULT 'X', "用户出口
badi RADIOBUTTON GROUP 1. "BADI
SELECTION-SCREEN END OF BLOCK a01.
*--------------------------------------------------------------------*
"屏幕跳转
DEFINE bdc_program.
clear bdcdata_wa.
bdcdata_wa-program = &1.
bdcdata_wa-dynpro = &2.
bdcdata_wa-dynbegin = &3.
append bdcdata_wa to bdcdata_tab.
END-OF-DEFINITION.
DEFINE bdc_detail.
clear bdcdata_wa.
bdcdata_wa-fnam = &1.
bdcdata_wa-fval = &2.
append bdcdata_wa to bdcdata_tab.
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*&Start of main program
*&---------------------------------------------------------------------*
START-OF-SELECTION.
IF exit = 'X'.
object = 'SMOD'. " User-exit!
ELSE.
object = 'SXSD'. " BADI!
ENDIF.
*Validate Transaction Code:
SELECT SINGLE * FROM tstc WHERE tcode = p_tcode.
*Find Repository Objects for transaction code:
IF sy-subrc EQ 0. " IF 1
SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'
AND object = 'PROG'
*&
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT
*&---------------------------------------------------------------------*
*&
*&
*&
*&---------------------------------------------------------------------*
*&
*&
*&
*&
*&
*&
*&
*&
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
TABLES:
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
DATA:
DATA:
DATA:
DATA:
DATA:
DATA:
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
SELECTION-SCREEN
SELECTION-SCREEN
PARAMETERS:
SELECTION-SCREEN
PARAMETERS:
SELECTION-SCREEN
*--------------------------------------------------------------------*
"屏幕跳转
DEFINE
END-OF-DEFINITION.
DEFINE
END-OF-DEFINITION.
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
START-OF-SELECTION.
*
*