‎2008 Jan 09 7:47 AM
hi guys,
I have some 100 values in an internal table.
From that 100 values first i have to pass the 1 st value and 10th value to another Functional module
then again 11th value and 20th value and again 21st value and 30th value so on upto 100
How i can do this?
Regards
senthil
‎2008 Jan 09 8:04 AM
hI,
Index1 = 1.
index2 = 10.
do 10 times.
read table itab into wa1 index index1.
read table itab into wa2 index index2.
from above reads u will get 1st and 10th record.
call the function module andpass the values.
index1 = index1 + 10.
index2 = index2 + 10.
clear : wa,wa1,wa2.
enddo.
Regards,
Nagaraj
‎2008 Jan 09 7:55 AM
hi Senthil,
DATA : lv_index TYPE i VALUE 1.
DO 10 TIMES.
READ TABLE itab INDEX i.
call FM
i = i + 9.
READ TABLE itab INDEX i.
call FM
i = i + 1.
ENDDO.
hope this helps
ec
‎2008 Jan 09 8:04 AM
hI,
Index1 = 1.
index2 = 10.
do 10 times.
read table itab into wa1 index index1.
read table itab into wa2 index index2.
from above reads u will get 1st and 10th record.
call the function module andpass the values.
index1 = index1 + 10.
index2 = index2 + 10.
clear : wa,wa1,wa2.
enddo.
Regards,
Nagaraj
‎2008 Jan 09 8:20 AM
Hi Senthil
Below logic might give you some idea on handling your scenario:
data: add type i,
ind type tabix.
do.
if add = 1.
add = 9.
else.
add = 1.
endif.
ind = ind + add.
read table itab into wa index ind.
if sy-subrc ne 0.
exit.
endif.
enddo.
Kind Regards
Eswar