picture of Prof. Dr. Nick Gehrke

written by

Prof. Dr. Nick Gehrke

Businessman being depressed by accounting in his office

In this blog post, we look at the basic relationships between external and internal accounting in SAP, and, more precisely: between expenses in external accounting and their allocation to elements in cost accounting, such as cost centers or cost objects. A simple analysis consists of looking to see whether there are expenses in accounting that do not appear in cost accounting. That would of course be inconsistent, and here I'll show you how to find out if such a situation exists.

 

First of all, you may ask yourself the question why it should be so important that expenses in accounting should also appear in cost accounting. Of course, it may just be a matter for investigation within the framework of an internal audit. An internal audit is after all really only interested in establishing the correctness of the external accounting. The statutory auditor sees things from quite a different perspective however: He is mainly interested in the correctness of the annual financial statements, i.e. the "pure" external accounting. But even the statutory auditor cannot leave cost accounting "totally to one side": because the results of cost accounting can get back into external accounting “through the back door”. Material overhead surcharges and production overhead surcharges come into play at the latest in the valuation of finished products and semi-finished products (production costs) (see also Section 255 Para. 2 of the German Commercial Code [HGB]). And these overheads are usually also determined on the basis of cost accounting when SAP is used. So, in the end, the statutory auditor has to keep an eye on cost accounting too.

 

What can costs be allocated to in SAP?

There are various cost accounting objects in SAP to which you can allocate accounting expenses. Normally, expenses are also posted to cost centers, but there are many more cost accounting objects in SAP than just cost centers:

  • Cost centers
  • Orders
  • Projects
  • Networks
  • Make-to-order sales orders
  • Cost objects
  • Result objects
  • Real estate properties
  • Business processes

So there is much more to it than just cost centers. For example, projects (WBS elements) or (internal) orders can also be debited with costs. Activity-Based Costing can also be implemented by account assignment, for example, to business processes (which, however, is seldom the case).

 

How do you find unallocated expenses in cost accounting?

Now we want to check whether there are expenses in accounting that have not also been assigned to a cost accounting object. To do this, we examine all document lines of the account system (BSEG table) and only consider expense items (thus postings in the P&L on the debit side) (tested on a HANA data base):

 

1 SELECT BSEG.MANDT, BSEG.BUKRS, BELNR, BUZEI, SHKZG, KOART, HKONT, SKAT.TXT50, DMBTR

Document number, posting line, debit or credit indicator, account type, account, account name, amount

FROM BSEG

from the BSEG table (Accounting document segment)

LEFT JOIN T001 ON (T001.MANDT = BSEG.MANDT AND T001.BUKRS = BSEG.BUKRS)

table with the master data of the company code

LEFT JOIN SKAT ON (SKAT.MANDT = BSEG.MANDT AND SKAT.KTOPL = T001.KTOPL AND SKAT.SAKNR = BSEG.HKONT AND SKAT.SPRAS='D')

table with the chart of accounts

WHERE SHKZG='S' AND XBILK = ''

only consider debit postings (=expenses) and no analysis of balance sheet accounts, only profit and loss statement

AND BSEG.BUKRS='1000' AND BSEG.GJAHR=2017

restriction to company code "1000" and fiscal year "2017"

AND KOSTL = '' AND KSTRG = '' AND AUFNR = '' AND NPLNR = '' AND PRZNR = '' AND IMKEY = '' AND (PROJK = '' OR PROJK='00000000') AND (PAOBJNR = '' OR PAOBJNR='0000000000')

and a check to establish that the item has not been allocated to any single cost accounting object.

 

If you want to try this query out on your own SAP system, simply use the "DBACOCKPIT" transaction and navigate to the "SQL Editor" using the "Diagnosis" function.

Remember that you must adjust the query with your company code and the fiscal year to be examined (BSEG.BUKRS='1000' AND BSEG.GJAHR=2017).

If everything is complete for you with regard to account assignments in cost accounting, this query should give you a very simple result:

Absolutely nothing!

 

If no result is obtained, all expenses have been properly allocated to cost accounting objects. However, if you do find some unallocated expenses, check with the specialist department concerned why certain expenses on the listed financial accounting accounts do not appear anywhere in cost accounting. It should be possible to establish valid reasons for why this has occurred.

 

Do you have any questions or suggestions regarding this procedure? Then simply leave us a comment below, or write to us at: questions@zapliance.com

 

Comments