Skip to Content
0
Former Member
Jul 18, 2016 at 11:49 AM

How to create a range table dynamically to be used in Dynamic select query?

1665 Views

Hello Experts,

I am facing an issue in creating the range table which can be used in a dynamic select query.

E.g. As below

loop at itab into wa.

lv_fieldname = wa-fieldname.

Now, have to create range table for this field which can be known in run time.

append this range table to final <condition> table till the loop ends.

endloop.

Now write a select query :

Select * from <dbtable> into <itab_data> where <(condition)>.

Could someone please guide me on how to proceed with this..or any better ways please...

Thanks in advance.

Vinay.