‎2007 Oct 16 8:16 AM
hi all,
i have a scenario like i have 8 different assigment process and i am giving COUNT in the selection screen.
if my count = 6, then only first 6 process should be done. how can i do this?
if it is = 4, then only first 4 should be done.
how can i do th is? kindly provide the code
thanks in advance
points will be rewarded
‎2007 Oct 16 8:19 AM
Hi
DO <count> times.
l_index = sy-index
CASE l_index.
WHEN 1..
-do process 1
WHEN 2.
do process 2..
and so on
ENDCASE.
ENDDO.
regards,
Atish
‎2007 Oct 16 8:19 AM
Hi
DO <count> times.
l_index = sy-index
CASE l_index.
WHEN 1..
-do process 1
WHEN 2.
do process 2..
and so on
ENDCASE.
ENDDO.
regards,
Atish
‎2007 Oct 16 8:23 AM
Hi,
try this
i am not getting your requirement clearly
so i am giving you an example .... to the extent what i understood..
if you give a number then it will process that many times....
PARAMETERS: count TYPE i.
DATA: a TYPE c VALUE 'A',
b TYPE c VALUE 'b',
c TYPE c VALUE 'c',
d type c value 'd',
e type c value 'e',
f type c value 'f',
g type c value 'g',
h type c value 'h'.
DO count TIMES.
CASE sy-index.
when '1'.
write:/ a.
when '2'.
write:/ b.
when '3'.
write:/ c.
when '4'.
write:/ d.
when '5'.
write:/ e.
when '6'.
write:/ f.
when '7'.
write:/ g.
when '8'.
write:/ h.
ENDCASE.
ENDDO.
regards,
Venkatesh