12-05-2007 8:57 AM
hi experts,
why the performance of select query involving BSEG table gets increased. I found that this is a cluster table. But i'm not able to grasp the technical reason behind this delay.
thanks in advance
12-05-2007 10:49 AM
Hi Gaurav,
BSEG table is a cluster table which is combination of many tables like BSAD, BSID ( Secondary Index for Customer). BSIK and BSAK ( Secondary Index for Customer) and there are some other tables related to G/L accounts as well whose data is stored in BSEG but I do not remember the name at this time.
Hence the data is very huge in this table and so the poor performance.
Thanks,
Lalit Kabra
12-05-2007 9:04 AM
Hi Gaurav,
BSEG is a big table which contains all items of financial transaction.
To reduce the access time, or to speed up your query, you'll have to, first, select data in BKPF and then using the "for all entries" statement to retrieve data on BSEG. ( optimize using the key )
( Joins aren't allowed on cluster tables )
Hope this helps,
Erwan
12-05-2007 9:14 AM
hi,
thanks for reply.
but i have nothing to do with bkpf. Now you have any solution?
Gaurav
12-05-2007 10:39 AM
Hi Gaurav,
The BKPF is the header table. So you must first select the accounting document number from this table then get all the line item details from BSEG.
Fields AWKEY, AWTYP of BKPF will be helpful to you in identifying the accounting docs.
Please mention your reqmnt, then I will be able to help you in a better way.
Reward points to helpful answers.
Thanks.
12-05-2007 10:47 AM
Gaurav,
No you don't have nothing to do with bkpf !
If you want to improve your performance, you'll have to do a "<b>select</b>" on BKFP then a "<b>for all entries</b>" in BSEG.
( BKPF is the header table linked to BSEG )
I guess, you can restrict you selection in BKPF on BUKRS or GJAHR or even BALRT, BLDAT, BUDAT ... this is very important.
Then you retrieve the following fields :bukrs, belnr, gjahr which will be in input of the "for all entries" on BSEG.
Your perf. will be much better.
Hope this helps,
Erwan
12-05-2007 10:49 AM
Hi Gaurav,
BSEG table is a cluster table which is combination of many tables like BSAD, BSID ( Secondary Index for Customer). BSIK and BSAK ( Secondary Index for Customer) and there are some other tables related to G/L accounts as well whose data is stored in BSEG but I do not remember the name at this time.
Hence the data is very huge in this table and so the poor performance.
Thanks,
Lalit Kabra
12-05-2007 2:11 PM
This should clear it up a bit:
<a href="/people/rob.burbank/blog/2007/11/12/quickly-retrieving-fi-document-data-from-bseg">Quickly Retrieving FI document Data from BSEG</a>
Rob