Google Search - Blog...........

Get All Obsolete Function Modules Or Tables Or Classes

REPORT ztest.

TABLES:rodir.

TYPES: BEGIN OF ty_rodir,
objecttype TYPE rodir-objecttype,
object TYPE rodir-object,
released TYPE rodir-released,
END OF ty_rodir.

DATA: itab TYPE TABLE OF ty_rodir WITH HEADER LINE.

SELECT-OPTIONS: s_objtyp FOR rodir-objecttype,
s_object FOR rodir-object.

INITIALIZATION.

s_objtyp-sign = 'I'.
s_objtyp-option = 'EQ'.
s_objtyp-low = 'FUNC'. " Function module
APPEND s_objtyp.

s_objtyp-low = 'CLAS'. " classes
APPEND s_objtyp.

s_objtyp-low = 'TABL'. " tables
APPEND s_objtyp.

s_objtyp-low = 'VIEW'. " views
APPEND s_objtyp.

s_objtyp-low = 'TTYP'. " table types
APPEND s_objtyp.

s_objtyp-low = 'TYPE'. " types like icons
APPEND s_objtyp.

START-OF-SELECTION.

SELECT objecttype
object
released
FROM rodir
INTO TABLE itab
WHERE objecttype IN s_objtyp
AND object IN s_object
AND obsolete = 'X'.

LOOP AT itab.
AT NEW objecttype.
FORMAT COLOR 7.
CASE itab-objecttype.
WHEN 'FUNC'.
WRITE:/ 'Obsolate function modules are:'.
WHEN 'CLAS'.
WRITE:/ 'Obsolate classes are:'.
WHEN 'TABL'.
WRITE:/ 'Obsolate tables are:'.
WHEN 'VIEW'.
WRITE:/ 'Obsolate views are:'.
WHEN 'TTYP'.
WRITE:/ 'Obsolate table types are:'.
WHEN 'TYPE'.
WRITE:/ 'Obsolate types are:'.
WRITE:/1(60) sy-uline .
ENDCASE.
WRITE:/ .
ENDAT.
FORMAT COLOR OFF.
WRITE: itab-object,
itab-released.
WRITE:/ .

ENDLOOP.


selection-screen is


output is like this :


1 comment: