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: 

Select Data from nth row using ABAP

Former Member
0 Kudos

Hello Experts,

My requirement is as follows:

I want to select records from large tables like BSEG etc.

In that case, I want to select only 25000 records at first attempt, do processing on it and then select next 25000 records. this will happen till the last record.

Currently I am using sy-dbcnt variable to do that but it's impacting the performance.

Please suggest if there's any other way to do that.

Regards,

OS

1 ACCEPTED SOLUTION

horst_keller
Product and Topic Expert
Product and Topic Expert
3 REPLIES 3

0 Kudos

Have a look at open cursor/fetch package size. (e.g. at https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapopen_cursor.htm)

horst_keller
Product and Topic Expert
Product and Topic Expert

former_member235395
Contributor
0 Kudos

Hi Onkar,

Try to avoid to do Select on BSEG Table: For that use BSIK/BSAK for Vendor, BSID/BSAD for Customer and BSIS/BSAD for document details (All Based on Opening or close documents).

Now, in reference on every 25,0000 documents; previously, you can fill an internal table with 25,0000 records and for each 25,0000 records you can use a LOOP sentences in this way.

LOOP AT internal_table INTO structure FROM value_from TO value_final.

ENDLOOP.

Regards,