Code: Alles auswählen.
SELECT var_1 var_2
FROM DB-TAB
INTO CORRESPONDING FIELDS OF TABLE INT_TAB
WHERE var_3 = var_3
GROUP BY var_1
var_2
.
SORT int_tab by var_1 var_2.
LOOP at int_tab ASSIGNING <int_fs>.
SELECT COUNT( * )
FROM db_tab
INTO <int_fs>-var_count
WHERE var_3 = var_3
AND var_1 = <int_fs>-var_1
AND var_2 = <int_fs>-var_2.
ENDLOOP.
Code: Alles auswählen.
TABLES mard.
SELECT DISTINCT COUNT( * ) as BSKRF werks lgort
INTO CORRESPONDING FIELDS OF mard
FROM mard
GROUP BY werks lgort.
WRITE: / mard-werks, mard-lgort, mard-BSKRF EXPONENT 0 DECIMALS 0.
ENDSELECT.