10-16-2007 4:16 AM
i am having a internal table of 5000 records which are not distinct... out of which I am selecting 1500 records for blocking..
it should calculate 500 distinct records out of those 1500 records and first it should block the 1st 500 and in the second slot the second 500 and in the final shot the last 500 records...
eg: 101
101
101
102
102
...................
101 should be considered as 1 record and 102 as 2nd record and so on with the rest of the records
If my selection reaches more than 500 records
in 1st slot first 500 records has to be processed and in the second slot next 500 records has to be processed...
this is how it should be working
please let me know how to identify and process out of 1500 records 1st 500 records ,....2nd next 500 so on...
thanks
yamini
10-16-2007 4:22 AM
Hi yamini,
Just use PACKAGE SIZE in the select query. Just do F1 on PACKAGE SIZE and you will get its use.
Regards,
Atish
10-16-2007 4:40 AM
this is after selection ...
it has to be done........in user comment when clicking a block button
10-16-2007 4:43 AM
Then just create a variable and as soon as its value reaches over 500(or whatever you want) to the processing and once again refresh the varibale and use again.
Regards,
Atish
10-16-2007 4:51 AM
Hi,
Try this.
DATA: V_COUNT TYPE I.
V_COUNT = 1.
LOOP AT ITAB.
IF V_COUNT > 500.
Process your records here...
CLEAR: V_COUNT. " Clear the count variable..
ENDIF.
V_COUNT = V_COUNT + 1. " Increment the variable..
ENDLOOP.
Thanks
Naren