Sub topic 12
How SD postings reach accounting
This chapter assumes you know the document types in order-to-cash (sales order, delivery, billing document) and basic double-entry accounting. It explains how Sales and Distribution (SD) documents create Financial Accounting (FI) documents without anyone posting them by hand.
Two points where SD posts to FI
A sales order and a delivery create no accounting entries. Two events do:
- Post goods issue creates a material document and an accounting document. It reduces inventory and records the cost of goods sold.
- Billing creates a billing document and an accounting document. It records the customer receivable and the revenue.
Account determination
SD does not store a G/L account on the document. The system finds the account at posting time with the condition technique. For billing, the main steps are:
- The billing document type points to an account determination procedure, which is usually
KOFI00. - The procedure uses condition type
KOFKto read access sequences that look up combinations of keys. - The keys include the chart of accounts, the sales organization, the customer account assignment group, the material account assignment group, and an account key such as
ERL(revenue) orERS(sales deductions). - The matching entry in table
VKOA, maintained in transactionVKOA, returns the G/L account.
For goods issue, the material movement type and the valuation class of the material determine the accounts (transaction OBYC). Typical keys are BSX for the inventory account and GBB with modifier VAX for cost of goods sold.
Typical entries
| Event | Debit | Credit |
|---|---|---|
| Post goods issue | Cost of goods sold | Inventory |
| Billing | Customer receivable | Revenue |
| Incoming payment | Bank | Customer receivable |
The payment row is covered in a later chapter. It is listed here so you can see the full cycle on one page.
Verifying the postings
In S/4HANA, accounting line items are stored in the Universal Journal, table ACDOCA. A billing document is referenced by object type VBRK and its number. The following query shows the receivable and revenue lines in the leading ledger 0L.
DATA(lv_billing) = CONV vbeln_vf( '0090001234' ).
SELECT rbukrs, gjahr, belnr, docln, racct, hsl
FROM acdoca
WHERE rldnr = '0L'
AND awtyp = 'VBRK'
AND awref = @lv_billing
INTO TABLE @DATA(lt_journal).hsl is the amount in company code currency. Debits are positive and credits are negative.
Common errors
- Account determination error at billing. The message says that no G/L account was found. The cause is usually a missing
VKOAentry for a new combination of account assignment groups. Billing is blocked for accounting and the document stays in the billing due list or the accounting block until you maintain the entry. - Posting period closed. Goods issue or billing fails because the posting period is not open for the company code.
- Wrong valuation class. Inventory or cost of goods sold lands in an unexpected account because the material master has the wrong valuation class.
Exercise
A new customer is billed for the first time and billing returns an account determination error. The material and the sales organization were used before without problems. Which table do you check first, and what is the likely cause?
Show answer
Check the VKOA entries (transaction VKOA). The likely cause is that the new customer has a customer account assignment group that has no revenue account entry for the combination of chart of accounts, sales organization, material account assignment group and account key.