如何使用
执行report,输入要查看version 信息的ABAP class name和method name:
执行后输出结果:
download到本地后即可使用各种文本处理工具进行所需的查询:
source code
REPORT ZTEST_CAG_CAT.
PARAMETERS: cname TYPE SEOCOMPO-clsname OBLIGATORY DEFAULT 'CL_CRM_OPPORTUNITY_MPC_EXT',
mname TYPE seocompo-cmpname OBLIGATORY DEFAULT 'DEFINE_OPPORTUNITY'.
data: lv_name TYPE vrsd-objname,
lt_version TYPE STANDARD TABLE OF vrsd,
lt_table TYPE STANDARD TABLE OF ABAPTXT255,
lt_trdir TYPE STANDARD TABLE OF TRDIR,
lt_VSMODISRC TYPE STANDARD TABLE OF SMODISRC,
lt_VSMODILOG TYPE STANDARD TABLE OF SMODILOG.
lv_name = cname && '%' && mname.
SELECT objname versno datum zeit FROM vrsd INTO CORRESPONDING FIELDS OF TABLE lt_version
WHERE objname LIKE lv_name ORDER BY versno DESCENDING.
LOOP AT lt_version ASSIGNING FIELD-SYMBOL(<version>).
CALL FUNCTION 'SVRS_GET_REPS_FROM_OBJECT'
EXPORTING
object_name = <version>-objname
object_type = 'METH'
versno = <version>-versno
TABLES
repos_tab = lt_table
TRDIR_TAB = lt_trdir
VSMODISRC = lt_VSMODISRC
VSMODILOG = lt_VSMODILOG.
ASSERT sy-subrc = 0.
WRITE: / 'version number: ' COLOR COL_GROUP, <version>-versno COLOR COL_NEGATIVE,
'Date: ' COLOR COL_KEY, <version>-datum COLOR COL_HEADING, ' time: ' COLOR COL_POSITIVE, <version>-zeit COLOR COL_NORMAL.
LOOP AT lt_table ASSIGNING FIELD-SYMBOL(<line>).
WRITE: / <line>-line.
ENDLOOP.
ENDLOOP.