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: 

Confusion regarding Cluster table - BSEG & its index tables

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Friends,

I was having a look at this post: [;

In this Max says:

When a account document is posted for a vendor or customer, the system can create an item for the reconciliation g/l account, this particular item is not stored in BSEG table but in BSIK/BSAK or BSID/BSAD tables only

Without going into functional aspect, technically i was under the impression that BSEG is the superset of all the A/C'ing docs & the index tables BSIK/BSAK & BSID/BSAD are subsets.

Can someone clarify this confusion?

BR,

Suhas

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

BKPF and BSEG table are the tables with the data of account documents:

- BKPF header data

- BSEG item data

To manage the Vendor, Customer and G/l account the data of tables above are replaced in secondary index tables.

BSEG table has the field KOART Account Type, the main values are:

D	Customers
K	Vendors
S	G/L accounts

So the data of BKPF and BSEG can be found in:

KOART = D

BSID - Open Item

BSAD - Cleared Item

KOART = K

BSIK - Open Item

BSAK - Cleared Item

KOART = S

BSIS - Open Item

BSAS - Cleared Item

It mean the main fields of BKPF/BSEG table are in index tables too

If u see how the table BSEG is and how the index tables are, u can note the main difference is the field keys:

the key fields of BSEG are the keys for account document, so BUKRS, BELNR and GJAHR

the main key fields of index table are BUKRS and:

- KUNNR (Customer code) for BSID/BSAD

- LIFNR (Vendor code) for BSIK/BSAK

- HKONT (G/l account code) for BSIS/BSAS

So if you need to get the data of account documents starting with the document, it's better to read BKPF/BSEG table, if you need to get the data knowing the vendor or customer or g/l it's better to use the index table.

Max

18 REPLIES 18

ThomasZloch
Active Contributor
0 Kudos

This is also my impression. Technically, all index table entries are created via move-corresponding from BKPF and BSEG values inside function module POST_DOCUMENT, as far as I understand it. So how could there be an index table entry without a corresponding BSEG entry? Let's stick to "normal" postings (BSTAT = space) for the time being.

Thomas

0 Kudos

Hello Thomas,

So can we safely assume that any data available in BSID/BSAD & BSIK/BSAK are bound to be in BSEG?

I mean the subset-superset concept is true. I think the customer/vendor postings are "normal" posting, right?

BR,

Suhas

0 Kudos

> So can we safely assume that any data available in BSID/BSAD & BSIK/BSAK are bound to be in BSEG?

Everyone seems to have forgortten archiving. When a document is archived, it is removed from BSEG, but it may not have been removed from the index tables. This has caused trouble for me.

Rob

0 Kudos

Hello Rob,

And is it any "dirty SAP trick" again?

BR,

Suhas

0 Kudos

Actually, it's pretty standard functionality. If you are reading the index tables and then going to BSEG for more data, you have to know to go to the archive if the BSEG entry is missing.

Rob

0 Kudos

Good learning for me Rob ... Thank you all ...

0 Kudos

Hi

In this case the BKPF data should miss, not BSEG only.

Max

0 Kudos

http://help.sap.com/saphelp_erp60_sp/helpdata/EN/8d/3e517d462a11d189000000e8323d3a/frameset.htm

These tables have their own "index life", amazing...I will remember this once my client gets around to actually do the archiving and not just planning it. Our BSIS is 65 GB large by now, not even counting the secondary indexes...

Thomas

0 Kudos

Yes - also BSEC, BSET, etc, etc.

Rob

0 Kudos

Thomas - remember that BSIS is for open items. I'm pretty sure that arciving only removes cleared items (and I think items for accounts that are not open item managed).

Rob

Former Member
0 Kudos

Hi

BKPF and BSEG table are the tables with the data of account documents:

- BKPF header data

- BSEG item data

To manage the Vendor, Customer and G/l account the data of tables above are replaced in secondary index tables.

BSEG table has the field KOART Account Type, the main values are:

D	Customers
K	Vendors
S	G/L accounts

So the data of BKPF and BSEG can be found in:

KOART = D

BSID - Open Item

BSAD - Cleared Item

KOART = K

BSIK - Open Item

BSAK - Cleared Item

KOART = S

BSIS - Open Item

BSAS - Cleared Item

It mean the main fields of BKPF/BSEG table are in index tables too

If u see how the table BSEG is and how the index tables are, u can note the main difference is the field keys:

the key fields of BSEG are the keys for account document, so BUKRS, BELNR and GJAHR

the main key fields of index table are BUKRS and:

- KUNNR (Customer code) for BSID/BSAD

- LIFNR (Vendor code) for BSIK/BSAK

- HKONT (G/l account code) for BSIS/BSAS

So if you need to get the data of account documents starting with the document, it's better to read BKPF/BSEG table, if you need to get the data knowing the vendor or customer or g/l it's better to use the index table.

Max

0 Kudos

Max, all correct and well known. We were tripping over your statement that there could be BSAK/BSIK etc. entries without a corresponding BSEG entry. Can you confirm or revise this?

Thomas

0 Kudos

Hello Max,

But in the post you said that while posting vendor/customer docs some reconciliation g/l line item amy be created which is not stored in BESG.

My question is simple, is this possible?

I know of some asset postings which are sometimes not available in BSEG. Can this be the case for vendor/customer?

BR,

Suhas

0 Kudos

Hi

Yes, it's just a little SAP trick.

Every time an amount (so a document) is posted for vendor or customer, the same amount has to be posted for the reconciliation g/l (u can find it in the master data of vendor and customer, and it can't post a document for it directly).

But the reconciliation g/l doesn't belong to the document, so it's not stored in BSEG, but it needs to manage it in g/L account, so it's stored in BSIS/BSAS table.

Try to see an invoice for a vendor:

in BSEG table u can see all items u can see by trx FB03

The get the reconciliation g/l from vendor item, u can find a record in BSIS/BSAS table for the invoice, this record is not in BSEG, the field BSIS/BSAS-BUZEI has the BUZEI of vendor item.

The reconciliation g/l is used to manage/see all amount posted for vendor/customr in single account (g/l account), else it needs to see the amount in every single vendor/customer account.

So if it needs to know the total of invoices posted for a certain period, it's easier to see that data in reconciliation account

Max

0 Kudos

Hello Max,

Thanks for the info.

I just checked a vendor which has a reconciliation a/c.

I check for the reconciliation a/c document in BSIS/BSAS but i find none.

Is the amount posted in the reconciliation a/c everytime a vendor/customer doc is posted?

BR,

Suhas

0 Kudos

I dont think there is any possiblity of vendor/customer docs missing Bseg table.

yes, some of the asset postings may not be available and the documents which are on hold.

Apart from these if you can observe recurring documents in Fbd1 they will be posted

in Bseg table but will not hit your Reconcilation account.

0 Kudos

Hi

U need to see the document:

See a document in FB03, doubleclick of vendor/customer item: here u should see the reconciliation account at the right top.

If you can see it, u should find an item in BSIS/BSAS table for it

Max

0 Kudos

Hello Max,

Thanks for sharing this info. It was definitely a nice-to-know thing.

Currently i am looking into the sandbox(which is a prod replica) but dont find any recon a/c items. But may be next time i encounter this i will make a point to recheck.

Thanks again.

Cheers,

Suhas