15 Replies Latest reply: Oct 8, 2014 6:16 AM by sunil jain RSS

    Don’t use BSEG – use the sub ledger tables instead?

    Trevor Roth

      I have received numerous valuable tips from this community, so I try to give back when possible. We have used the SAP Connector since 2008 and load a few hundred tables each morning. BSEG is our most difficult table to load, and it takes us around 8-10 hours. We have worked with our SAP Basis team to tune queries, and we pull the table incrementally. Our latest approach to dealing with the ‘BSEG problem' is to just stop using it. Although some of you may already know this, for the benefit of others who may not, I’ll share. BSEG is a cluster table, which is basically a “view” of 6 other physical tables. We are rewriting our apps that rely on BSEG to use the sub ledger tables instead, and our plan is to stop our BSEG load. So far we have not run into a situation where we *must* have BSEG.  I will add that building BSEG from the child tables isn’t just an easy join – there is some logic used by SAP so you will need to do some reverse engineering.

      Sub ledger tables that comprise BSEG:


      BSIS/BSAS - open/cleared items for G/L
      BSIK/BSAK - for vendors
      BSID/BSAD - for customers



      In our investigation, we discovered some tools that are used to replicate the SAP database by reading transaction logs. During demonstrations of these tools, it was interesting to learn that one of them replicates BSEG as well. Since BSEG isn’t a physical table normal database replication will not replicate this table. This tool, however, worked with SAP to understand the logic SAP uses to construct BSEG and then builds BSEG from the sub ledger tables leaving it as a physical table in the replicated database.


      Thought I would take a few minutes to share – hope this helps someone.