Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

need logic

Former Member
0 Likes
390

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
375

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

2 REPLIES 2
Read only

Former Member
0 Likes
376

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

Read only

Former Member
0 Likes
375

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