I need to loop on an internal table with a dynamic where. The where should contain 'in range'.
For example, Instead of writing
DATA: lrng TYPE RANGE OF bkpf-blart. LOOP AT <lt_bkpf> ASSIGNING FIELD-SYMBOL(<ls_bkpf>) WHERE blart IN lrng.
I want to write something like:
rng_fld_name = 'LRNG'. ASSIGN (rng_fld_name) TO FIELD-SYMBOL(<rng>). DATA(lv_where) = 'BLART IN ' && <rng>. LOOP AT <lt_bkpf> ASSIGNING FIELD-SYMBOL(<ls_bkpf>) WHERE (lv_where).
The problem is that the above raises a dump in runtime
The dump is logical. But how can I write it correctly?
Thanks in advance,