Skip to Content
0
Former Member
Apr 13, 2006 at 08:38 AM

Dynamic Where Clause in a Loop ??

2128 Views

I need a dynamich where-clause in a Loop-Statement, like this:

LOOP AT gt_outtab INTO gs_outtab

WHERE ( delta IS INITIAL AND <f_per> IS INITIAL ).

gs_outtab-delta = gs_outtab-per01.

MODIFY gt_outtab FROM gs_outtab.

ENDLOOP.

First I tried this:

LOOP AT gt_outtab INTO gs_outtab

WHERE ( delta IS INITIAL AND (ls_per) IS INITIAL ).

gs_outtab-delta = gs_outtab-per01.

MODIFY gt_outtab FROM gs_outtab.

ENDLOOP.

but with both I get a syntax error.

Do you have an idea, how can I use the component I need dynamically?

thanks.

Samir