SELECT * FROM t100 INTO wa WHERE sprsl = 'D' AND arbgb = 'BC' AND msgnr LIKE '1%'. ... ENDSELECT.
Cause:
The Open-SQL and SELECT statements have replaced LOOP AT. The latter only works with database tables, whose name corresponds to R/2-ATAB naming conventions (no more than five places, beginning with T) or with table work areas declared using theTABLES statement, which is not allowed in ABAP Objects. Access is by generic key values, which are taken from the filled part of the table work area from left to right. For this reason, you should declare keys explicitly in the WHERE clause of the SELECT statement instead.