2016 Feb 24 12:08 PM
Hi All,
Here I am using BSID, BSAD, BSIK, BSAK table instead of BSEG table for performance optimization. For one document I got 2 line items (1 & 6) from BSAD table which have some value in AUGDT. I want rest of the line items from any index table but i could not get the line items from those table.
I checked the bseg table, there the line items are below.
Can anyone give me any clue where i will get the other line items.
Thanks,
Satya
2016 Feb 24 5:54 PM
You're simply going about this in the wrong way. As soon as you have a document from the index table, you have the full BSEG key. So use it and get the remaining document line items from BSEG. There is absolutely nothing wrong (no performance hit) with going to BSEG with the full key.
Rob
Which, now that I look at it more closely, is what Raymond was saying.
Message was edited by: Rob Burbank
2016 Feb 24 1:18 PM
Hi Satya,
If you are seeing those cleared items in BSAD then I would expect to see the corresponding items for that document that are still open within the BSID index table.
Regards,
Ryan Crosby
2016 Feb 25 7:29 AM
No, In BSDI table I am not able to find out the other item details. That document is not there in BSID table. For that reason I think some other index table should be there...
Please check and let me know.
Thanks,
Satya
2016 Feb 24 2:27 PM
2016 Feb 24 5:54 PM
You're simply going about this in the wrong way. As soon as you have a document from the index table, you have the full BSEG key. So use it and get the remaining document line items from BSEG. There is absolutely nothing wrong (no performance hit) with going to BSEG with the full key.
Rob
Which, now that I look at it more closely, is what Raymond was saying.
Message was edited by: Rob Burbank
2016 Feb 25 7:31 AM
For some time the document I am not getting the document no when the document does not cleared fully. Please suggest some more.
Thanks,
Satya
2016 Feb 25 4:26 PM
Well, to answer your question - the other line items appear to be uncleared GL items, so they should be in BSIS. But I would still get them from BSEG.
Rob
2016 Feb 26 10:50 PM
Satya Pal wrote:
For some time the document I am not getting the document no when the document does not cleared fully. Please suggest some more.
[facepalmslap] Let me be the 3rd person to reiterate that you can read data from BSEG if you have at least the Company/Year/Document combination.
Your first example might be more clear if you looked at it in FB03. When a customer invoice is posted to accounting, it creates postings into different accounts. You have posting into the customer account, to revenue account, taxes and what's not. Because only one of these lines is relevant to the customer, then it's the one that goes into the customer index tables (BSID/BSAD depending on whether it's cleared or not). If you are reading from BSID/BSAD and looking for other lines for the same document then just read BSEG by document #. Attempting to analyze in what other index tables those other entries might be in this case would be rather silly.
Now the plot thickens and "For some time the document I am not getting the document no". I'm not really sure what this means, but, as you noticed, there are tables for cleared and non-cleared items, so the entries should be in either one of them.
Also keep in mind that in HANA all this cluster table nonsense goes away and accounting documents will be stored differently, so you might actually end up rewriting this altogether.
2016 Feb 26 6:40 AM
Hello Satya,
BSEG Table consists of data from BSIS, BSAS, BSID, BSAD, BSIK, and BSAK tables.
BSIS: G/L Open Items
BSAS: G/L Closed Items
BSID: Customer Open Items(Account Receivables)
BSAD: Customer Closed Items)(Account Receivables)
BSIK: Vendor Open Items(Account Payables)
BSAK: Vendor Closed Items(Account Payables)
Check with BSIS and BSAS tables.
Regards,
Thanga
2016 Feb 27 5:34 AM
Big Thanks to all for your suggestion... Got my records from BSIS table.
Thanks,
Satya