04-03-2009 7:30 AM
hi guys,
assume that an internal table has 1000..records...
while processing,
after every 100 records, we need to get a message..saying...number of records processed :100
number of records processed :200
number of records processed :300..in this way...
asssume the other case..even if we have around 552 records...then the number meintioned in this statemenst and the total number must match like...we will be writing...100,200,300,400,500 and lastly 52
please give me reply ASAP.
Regards
Satya
04-03-2009 7:34 AM
You mean, the message should be shown immediately after processing every 100 records? If this is the case, one suggestion is:
go for a pop-up window which shows the succesful message and when enter is pressed, process will continue.. for this u can use FM POPUP_TO_CONFIRM...
04-03-2009 7:36 AM
Hi Satya,
Do like this for 552
Loop at itab.
cnt = cnt + 1.
If cnt = 100 or cnt = 200 or cnt = 300......
Message (cnt) type i.
cnt1 = cnt.
endif.
endloop.
cnt1 = cnt - cnt1.
Message (cnt1) type i. (52)
Message (cnt) type i. (552)
Thanks& Regards,
Dileep .C
04-03-2009 7:37 AM
Hi,
Try the code given below
data : w_count type i.
loop at itab into wa.
w_count = sy-tabix mod 100.
if w_count = 0.
write : 'number of records processed :', sy-tabix.
" or use message i010(ad) with 'number of records processed :' sy-tabix.
endif.
"processing steps...
endloop.
if w_count ne 0.
write : 'number of records processed :', w_count.
" or use message i010(ad) with 'number of records processed :' sy-tabix.
endif.
Regards,
Siddarth
04-03-2009 7:50 AM
Hi,
code it like below,
data : count type i, "Counts for every 100
n type i. "Counts no of Hundreds
LOOP AT itab.
count = count + 1.
IF count EQ 100.
n = n + 1.
count = count * n.
write : 'number of records processed' :, count.
clear count.
endif.
at last.
write : 'number of records processed' :, count.
endat.
endloop.
Hope it helps!!
Regards,
Pavan
10-30-2009 2:49 PM