While praparing our system for the S/4 migration, we recognized that there are many empty development classes in our system. To find them all, I wrote a simple report to list all packages without any DDIC objects and other development classes assigned to it:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
DATA: lf_count_tadir TYPE i,
lf_count_tdevc TYPE i.
DATA: ls_outtab TYPE t_outtab.
SELECT devclass
FROM tdevc
INTO TABLE @DATA(lt_devclass)
WHERE devclass LIKE 'Z%'
OR devclass LIKE 'Y%'
ORDER BY devclass.
LOOP AT lt_devclass ASSIGNING FIELD-SYMBOL(<s_devc>).
CLEAR: ls_outtab, lf_count_tadir, lf_count_tdevc.
ls_outtab-devclass = <s_devc>-devclass.
SELECT SINGLE COUNT( * )
FROM tadir
INTO @lf_count_tadir
WHERE devclass EQ @<s_devc>-devclass
AND object NE 'DEVC'.
SELECT SINGLE COUNT( * )
FROM tdevc
INTO @lf_count_tdevc
WHERE parentcl EQ @<s_devc>-devclass.
ls_outtab-count = lf_count_tadir + lf_count_tdevc.
CHECK ls_outtab-count EQ 0.
APPEND ls_outtab
TO gt_outtab.
ENDLOOP.
With this snippet you can get a list of development classes without any assigned objects/sub development classes. Just pass the generated gt_outtab
to the CL_SALV_TABLE
to view the data in an ALV Grid.