Code: Alles auswählen.
DATA gs_dd03l TYPE dd03l.
DATA gt_tables TYPE STANDARD TABLE OF tabname.
DATA lv_table TYPE tabname.
DATA lv_anzahl TYPE i.
PARAMETERS p_tabnm2 LIKE gs_dd03l-tabname DEFAULT 'V%'.
SELECT-OPTIONS s_fields FOR gs_dd03l-fieldname.
START-OF-SELECTION.
DATA lv_fields TYPE i.
lv_fields = lines( s_fields ).
SELECT COUNT( * ) dd03l~tabname FROM dd03l
INNER JOIN dd02l on dd03l~tabname = dd02l~tabname
INTO (lv_anzahl, lv_table)
WHERE dd02l~tabname LIKE p_tabnm2
and dd02l~tabclass = 'TRANSP'
AND fieldname IN s_fields
GROUP BY dd03l~tabname
HAVING COUNT( * ) = lv_fields.
WRITE: / lv_table.
ENDSELECT.