Code: Alles auswählen.
Data:
begin of itab occurs 0,
tabname type tabname,
count type i,
end of itab,
lv_count type i.
select tabname
from dd02l
into corresponding fields of table itab
where tabname like 'Z%'
and as4local eq 'A'.
if not itab[] is initial.
loop at itab.
select count( * ) as count
into (lv_count)
from (itab-tabname).
itab-count = lv_count.
modify itab-count.
endloop.
endif.
Code: Alles auswählen.
DATA: gv_tabname TYPE tabname,
gv_count TYPE i.
SELECT tabname FROM dd02l
INTO gv_tabname
WHERE tabname LIKE 'Z%'
AND as4local EQ 'A'
AND tabclass IN ('TRANSP', 'POOL', 'CLUSTER').
SELECT COUNT(*) FROM (gv_tabname)
INTO gv_count.
WRITE: / gv_tabname COLOR 4,
gv_count.
ENDSELECT.