查找/显示ABAP类中的方法对应的程序名
REPORT zgyf107.
TABLES:trdir.
SELECT-OPTIONS : s_cls for trdir-NAME.
PARAMETERS : prog LIKE tadir-obj_name NO-DISPLAY.
START-OF-SELECTION.
DATA : BEGIN OF itab OCCURS 0,
line(500),
END OF itab.
DATA :lv_methods(30) TYPE c,
lv_cls(30) TYPE c.
SELECT name INTO TABLE @DATA(lt_name) FROM trdir WHERE name in @s_cls .
LOOP AT lt_name INTO DATA(ls_name).
prog = ls_name-name.
READ REPORT prog INTO itab.
READ TABLE itab INTO DATA(ls_itab) INDEX 1 .
*" * WRITE:/,ls_itab-line,':',prog.
WRITE:/,prog,':',ls_itab-line.
ENDLOOP.
执行效果: