Code: Alles auswählen.
SELECT d2~tabname, d3~fieldname, d3~rollname, d3~precfield, d2~clidep,d2~contflag FROM dd02l AS d2 JOIN dd03l AS d3 ON d2~tabname = d3~tabname WHERE d2~tabclass = 'TRANSP'
AND d3~tabname = '/IDXGL/TOU_VERS' OR d3~tabname = '/IDXGL/TOU_HEAD' AND d3~rollname LIKE '/IDX%' ORDER BY d2~tabname
INTO TABLE @DATA(test).
LOOP AT test INTO DATA(ls_test) WHERE fieldname <> ''.
Data(condition) = | { ls_test-fieldname } <> '' |.
SELECT COUNT(*) FROM (ls_test-tabname) WHERE (condition) INTO @counter.
ENDLOOP.