2017 Mar 04 5:05 PM
Hi Experts,
I have a question for ABAPER, in my program fetching data from BKPF table based on input fields BELNR, GJAHR and XBLNR. Here XBLNR is a non primary key field, so when data volume is huge system giving dump at BKPF table select query. Anyone can help on this whether i need to create secondary index for BKPF table or I need to fetch data based on BELNR and GJAHR then in loop i will filter by xblnr.
Which one is better performance.
Thanks,
Pradeep.
2017 Mar 06 8:51 AM
You should look into creating a secondary index if it is not already in place.
Check with your BASIS-team and perhaps do some tests around this ...
I see a lot of SAP-KBA's with regard to the use of (secondary) indexes on table 'BKPF' in SAP-Standard FunctionModules. So if SAP-Stdrd makes use of it, it is worth checking this out for your own Development as well.
2017 Mar 06 9:50 AM
2017 Mar 06 1:13 PM
What am I missing here...
.
An ABAP loop after bringing all the data over to the application server will never be as efficient as even letting the database server work on un-indexed data. That said, as Raymond said - there is an index - figure out how to use it!
2017 Mar 06 4:24 PM
Use all the three Key fields "BUKRS", BELNR" and "GJAHR" to fetch data from BKPF.