Thursday, March 25, 2004

For all entries is evil

It was not the first time that I was bitten by this. One time should have been enough to learn, but using for all entries in select queries really requires extra care. If you write

select *
from afpo
into table lt_afpo
for all entries in lt_aufnr
where aufnr = lt_aufnr-aufnr.

be sure to guarantee that lt_aufnr will never be empty, or else, you end up with an internal table with all data from the database table. Arggh.



Post a Comment

Links to this post:

Create a Link

<< Home