В общем-то тут надо было с другой стороны подойти и выбрать все расширения которые есть в системе с явками, адресами и паролями, так что чуток докрутил программку (при апгрейдах наверное очень даже пригодиться, чтобы знать кого бить по руками и за какие расширения). Программа базируется на предыдущей версии, так что можно брать эту. Вроде как все работает.
report yuuk_find_user_exit no standard page heading.
tables: tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir,
tstct, modattr, modtext.
data: lt_jtab like tadir occurs 0 with header line,
lt_modact like modact occurs 0 with header line,
lt_modattr like modattr occurs 0 with header line.
data: field1(30) type c,
call_mode type c,
v_devclass like tadir-devclass.
data: begin of lt_bdcdata occurs 0.
include structure bdcdata.
data: end of lt_bdcdata.
************************************************************************
parameters : rb_one radiobutton group grp1 default 'X'
user-command one,
p_tcode like tstc-tcode.
selection-screen skip 1.
parameters :rb_two radiobutton group grp1.
select-options :p_modnam for modattr-name no intervals.
************************************************************************
************************************************************************
start-of-selection.
if rb_one = 'X'.
perform sel_tcode.
elseif rb_two = 'X'.
perform sel_project.
endif.
************************************************************************
************************************************************************
at line-selection.
refresh: lt_bdcdata.
get cursor field field1.
case field1.
* Перейти к просмотру расширения
when 'LT_JTAB-OBJ_NAME'.
perform dynpro using:
'X' 'SAPMSMOD' '2010',
' ' 'MOD0-NAME' sy-lisel+1(10),
' ' 'MODF-CHAM' 'X',
' ' 'MODF-HEAS' ' ',
' ' 'BDC_OKCODE' '=SHOW'.
call_mode = 'E'.
call transaction 'SMOD' using lt_bdcdata mode call_mode.
* Перейти к просмотру проекта
when 'LT_MODACT-NAME'.
perform dynpro using:
'X' 'SAPMSMOD' '1010',
' ' 'MOD0-NAME' sy-lisel+95(8),
' ' 'MODF-HEAD' ' ',
' ' 'MODF-CHAK' 'X',
' ' 'BDC_OKCODE' '=SHOW'.
call_mode = 'E'.
call transaction 'CMOD' using lt_bdcdata mode call_mode.
endcase.
************************************************************************
************************************************************************
at selection-screen output.
loop at screen.
if rb_one = 'X'.
if screen-name = 'P_MODNAM'.
screen-input = '0'.
endif.
elseif rb_two = 'X'.
if screen-name = 'P_TCODE'.
screen-input = '0'.
endif.
endif.
modify screen.
endloop.
************************************************************************
************************************************************************
at selection-screen on value-request for p_modnam-low.
data: modname type modname,
dynfields like dynpread occurs 1 with header line,
funcname type rs38l_fnam.
clear: dynfields[], dynfields.
dynfields-fieldname = 'P_MODNAM'.
append dynfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = 'YTOV_FIND_USER_EXIT'
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 0.
read table dynfields index 1.
modname = dynfields-fieldvalue.
call function 'F4_CUSTOMER_PROJECT'
exporting
object = modname
suppress_selection = space
display_only = space
importing
result = modname.
dynfields-fieldvalue = modname.
modify dynfields index 1.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = 'YTOV_FIND_USER_EXIT'
dynumb = sy-dynnr
tables
dynpfields = dynfields
exceptions
others = 0.
*&---------------------------------------------------------------------*
*& Form DYNPRO
*&---------------------------------------------------------------------*
* Генерация полей для BATCH-INPUT
*----------------------------------------------------------------------*
form dynpro using dynbegin name value.
clear lt_bdcdata.
if dynbegin = 'X'.
move: name to lt_bdcdata-program,
value to lt_bdcdata-dynpro,
'X' to lt_bdcdata-dynbegin.
else.
move: name to lt_bdcdata-fnam,
value to lt_bdcdata-fval.
endif.
append lt_bdcdata.
endform.
*&---------------------------------------------------------------------*
*& Form sel_tcode
*&---------------------------------------------------------------------*
* Выбрать расширения по коду транзакции
*----------------------------------------------------------------------*
form sel_tcode.
select single * from tstc where tcode = p_tcode.
if sy-subrc = 0.
* Проверить на тексты программ
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
if sy-subrc ne 0.
* Проверить на тексты группы функций
select single * from trdir where name = tstc-pgmna.
if trdir-subc = '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 = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
else.
move : tadir-devclass to v_devclass.
endif.
select * from tadir into table lt_jtab where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl = sy-langu and
tcode = p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(108) tstct-ttext.
skip.
if not lt_jtab[] is initial.
write:/(152) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline,
96 'Project',
105 sy-vline,
106 'Status',
113 sy-vline,
114 'Создал', 126 sy-vline,
127 'Изменил', 139 sy-vline,
140 'Активировал', 152 sy-vline.
write:/(152) sy-uline.
* Список модулей расширений
loop at lt_jtab.
* Краткий текст расширения
select single * from modsapt where sprsl = sy-langu and
name = lt_jtab-obj_name.
* Код проекта в которой присвоено расширение
select * into table lt_modact
from modact where member = lt_jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 lt_jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
if lt_modact[] is initial.
write: 105 sy-vline,
113 sy-vline,
126 sy-vline,
139 sy-vline,
152 sy-vline.
else.
loop at lt_modact.
select single * from modattr where name = lt_modact-name.
write: 96 lt_modact-name hotspot on,
105 sy-vline.
* Статус
case modattr-status.
when 'A'. write 106 'Active'.
when space. write 106 'Deact'.
when others. write 106 'PartAct'.
endcase.
write: 113 sy-vline,
114 modattr-cnam, 126 sy-vline,
127 modattr-unam, 139 sy-vline,
140 modattr-anam, 152 sy-vline.
endloop.
endif.
endloop.
write:/(152) sy-uline.
describe table lt_jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(152) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(152) 'Transaction Code Does Not Exist'.
endif.
endform. " sel_tcode
*&---------------------------------------------------------------------*
*& Form sel_project
*&---------------------------------------------------------------------*
* Выбрать расширения по проектам
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
form sel_project.
* Выбрать проекты
select * into table lt_modattr
from modattr where name in p_modnam.
loop at lt_modattr.
* Список проектов
select single * from modtext
where sprsl = sy-langu and name = lt_modattr-name.
format color col_positive intensified off.
write: /(152) sy-uline,
/1 sy-vline, lt_modattr-name, '-',
14 modtext-modtext, 77 sy-vline,
78 'Создал:', lt_modattr-cnam, sy-vline,
100 'Изменил:', lt_modattr-unam, sy-vline,
125 'Активировал:', lt_modattr-anam, 152 sy-vline,
/(152) sy-uline.
* Список расширений к проекту
select * into table lt_modact
from modact where name = lt_modattr-name.
loop at lt_modact where member <> space.
format color col_normal intensified off.
select single * from modsapt where sprsl = sy-langu and
name = lt_modact-member.
write: / sy-vline, 3 lt_modact-member, 14 '-',
modsapt-modtext, sy-vline.
case lt_modattr-status.
when 'A'. write 79 'Active'.
when space. write 79 'Deact'.
when others. write 79 'PartAct'.
endcase.
write: 152 sy-vline.
endloop.
if sy-subrc <> 0.
write: / sy-vline, 2(150) sy-uline, 152 sy-vline,
/.
else.
write: /(152) sy-uline,
/.
endif.
endloop.
endform. " sel_project