Skip to content

Filter tables

Construct a table as a subset of another table using FILTER #( ).

bank_accounts = FILTER #( accounts
                          WHERE account_type = 'B' ).

Old style:

DATA bank_account TYPE bank_account.
LOOP AT accounts INTO bank_account WHERE account_type = 'B'.
  INSERT bank_account INTO TABLE bank_accounts.
ENDLOOP.
From SAP/styleguides under CC BY 3.0 — more details
Last updated on