2017 Jul 17 4:21 PM
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
2017 Jul 17 4:49 PM
From ABAP 7.51 on, there's an addition OFFSET to SELECT.
Before, the PACKAGE SIZE addition to the INTO clause should also be sufficient.
From ABAP 7.51 on, there's an addition OFFSET to SELECT.
Before, the PACKAGE SIZE addition to the INTO clause should also be sufficient.
2017 Jul 17 4:47 PM
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)
2017 Jul 17 4:49 PM
From ABAP 7.51 on, there's an addition OFFSET to SELECT.
Before, the PACKAGE SIZE addition to the INTO clause should also be sufficient.
2017 Jul 17 5:22 PM
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,
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |