Application Development 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: 

Selection and processing data from internal table

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Hi yamini,

Just use PACKAGE SIZE in the select query. Just do F1 on PACKAGE SIZE and you will get its use.

Regards,

Atish

Former Member
0 Kudos

this is after selection ...

it has to be done........in user comment when clicking a block button

0 Kudos

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

Former Member
0 Kudos

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