Skip to Content
0
Former Member
Feb 06, 2009 at 03:55 PM

Dynamic loops

97 Views

Hi friends,

I have got a wierd sort of requirement.Suppose my select query fetches 3 rows which contains values CT1,CT2,CT3.then my loop should go this way.

do CT1 times.

-


-


do CT2 times.

-


-


do CT3 times.

-


-


enddo.

enddo.

enddo.

But if select query fetches 5 rows then it should be..

do CT1 times.

-


do CT2 times.

-


do CT3 times.

-


do CT4 times.

-


do CT5 times.

-


enddo.

enddo

enddo.

enddo.

enddo.

This should be dynamic in my ABAP code.How can i fulfill this requirement.

Thanks and Regards,

Gaurav