Sub topic 14
Intercompany Transactions and Reconciliation
This chapter assumes you know how company codes, the Universal Journal (table ACDOCA), and subledger postings work from earlier chapters. You should also be comfortable with the trading partner field and with basic SQL reading. The chapter shows how a transaction between two legal entities of the same group is recorded on both sides, and how to prove that the two sides agree before consolidation.
What an intercompany transaction is
An intercompany transaction is a business event between two company codes that belong to the same group. Examples are a sale of goods from a plant company to a sales company, a service charge from a shared service center, and a loan between entities.
Each company code keeps its own books. The seller books a receivable and revenue. The buyer books a payable and an expense or inventory. Neither company code sees the other's postings. When the group is consolidated, these balances must cancel out, because the group cannot owe money to itself. If the two sides differ, the consolidation shows a difference that someone has to explain.
The trading partner
The link between the two sides is the trading partner. In S/4HANA this is a field on the line item that identifies the partner company. Two fields matter in practice:
- The trading partner on the G/L account or business partner. It is set from the business partner master data, where you enter the trading partner company ID.
- The partner company, which is carried into the Universal Journal line item so reports can select by it.
Because the trading partner is stored on the line item in ACDOCA, you can analyze intercompany balances without extra tables. This also means a missing or wrong trading partner on a posting is the most common cause of reconciliation breaks.
Intercompany processes
Intercompany flows fall into a few patterns. The table shows the common ones and where each side posts.
| Process | Seller side | Buyer side |
|---|---|---|
| Intercompany sales order and billing | Customer invoice, revenue, receivable | Supplier invoice, payable, expense or inventory |
| Intercompany stock transfer | Delivery, stock reduction | Goods receipt, stock increase |
| Cross-company cost allocation | Credit to cost center or expense | Debit to cost center or expense |
| Intercompany loan | Loan receivable, interest income | Loan payable, interest expense |
| Manual journal entry | Posting in own company code | Matching posting in partner company code |
Automatic flows, such as an intercompany billing, post both sides from one business document chain, so the amounts tend to agree. Manual entries are riskier. Two people post separately, and any difference in amount, date, or currency creates a mismatch.
Cross-company postings in one document
A single journal entry can contain lines for more than one company code. The system then adds clearing lines between the company codes so that each company code balances on its own. These automatic lines post to intercompany clearing accounts that are set in configuration. This is why a cross-company journal entry still passes the check that every company code in the document nets to zero.
Where mismatches come from
Reconciliation breaks have a small set of causes. Knowing them helps you triage quickly.
- Timing. One side posted in the current period and the other side posted in the next one.
- Missing trading partner. The line was posted without the partner, so it is not matched.
- Different amounts. A price difference, a tax difference, or a manual typing error.
- Currency. The two company codes have different local currencies, and each side translates at a different rate or on a different date.
- Wrong account. One side used an intercompany account and the other used a normal trade account.
- One-sided posting. One company code posted and the other did not post at all.
Reconciling with a query
The Universal Journal lets you check the two sides directly. The query below sums the signed amount in company code currency for every pair of company code and trading partner on an intercompany receivable and payable account. The company codes, year, and ledger are sample values. In production you would normally use released CDS views and the standard apps instead of reading the table.
SELECT rbukrs,
rassc,
SUM( hsl ) AS balance
FROM acdoca
WHERE rldnr = '0L'
AND gjahr = '2025'
AND poper <= '012'
AND rassc <> @space
GROUP BY rbukrs, rassc
ORDER BY rbukrs, rassc
INTO TABLE @DATA(lt_ic_balances).Here rassc is the trading partner field on the line item. The result has one row per company code and partner. Company code 1010 with partner 2010 should hold the opposite of company code 2010 with partner 1010, when both use the same currency. For example, if 1010 shows 50,000.00 and 2010 shows -50,000.00, the pair is reconciled. The sum of both rows is zero.
You can turn this into a check by comparing each row with its mirror row. The next program reads the balances and prints only the pairs that do not net to zero. It assumes both company codes use the same local currency.
REPORT zic_check.
SELECT rbukrs, rassc, SUM( hsl ) AS balance
FROM acdoca
WHERE rldnr = '0L'
AND gjahr = '2025'
AND poper <= '012'
AND rassc <> @space
GROUP BY rbukrs, rassc
INTO TABLE @DATA(lt_bal).
LOOP AT lt_bal INTO DATA(ls_bal) WHERE rbukrs < rassc.
DATA(lv_mirror) = REDUCE acdoca-hsl(
INIT s = 0
FOR m IN lt_bal WHERE ( rbukrs = ls_bal-rassc AND rassc = ls_bal-rbukrs )
NEXT s = s + m-balance ).
DATA(lv_diff) = ls_bal-balance + lv_mirror.
IF lv_diff <> 0.
WRITE: / ls_bal-rbukrs, ls_bal-rassc, lv_diff.
ENDIF.
ENDLOOP.The condition rbukrs < rassc makes each pair appear once. A pair where one side is missing shows the full balance of the other side as the difference.
Standard tools for the close
You do not have to write queries for routine work. S/4HANA provides apps for intercompany reconciliation, which compare the two sides for a company code pair and period and list matched and unmatched items. Open items can be reviewed, assigned a reason, and corrected by a posting in the right company code. In the closing task list, the intercompany reconciliation is a task that precedes the hand-off to group reporting.
A practical order of work is:
- Finish all sub-ledger and logistics postings for the period.
- Run valuation and accrual tasks that affect intercompany accounts.
- Run the intercompany reconciliation for each company code pair.
- Post corrections in the responsible company code.
- Rerun the reconciliation until the differences are zero or explained.
- Release the balances for consolidation.
Edge cases
- Different fiscal year variants or open periods. If one company code has closed the period and the other is still open, the correction can only be posted on one side. Plan period control so both are open during the reconciliation.
- Reversals. A reversal posts with the same trading partner. If only one side is reversed, the pair breaks.
- Non-leading ledgers. Check the ledger you reconcile. A manual adjustment in a non-leading ledger can leave the leading ledger matched and the other ledger unmatched.
- Tolerances. Small differences from rounding can be accepted by a threshold, but the threshold must be agreed with the group controller. Do not use it to hide timing differences.
- Unrealized profit. Even a perfectly matched pair can leave profit inside group inventory. That elimination belongs to consolidation, which the group reporting chapter covers.
Exercise
Company code 1010 shows a balance of 80,000.00 with trading partner 2010. Company code 2010 shows -78,500.00 with trading partner 1010. Both use the same currency. Name two likely causes and say how you would check each one.
Show answer
The difference is 1,500.00. One cause is timing: an invoice or credit memo posted in one company code in a later period. Check by listing the line items of the pair by posting date and document date. A second cause is a missing or different posting such as a price, tax, or freight difference. Check by comparing the document amounts on both sides and filtering for lines with an empty trading partner on the intercompany accounts.
Exercise
Why is it risky to compare the field hsl for two company codes with different local currencies, and which field is a better choice?
Show answer
hsl is the amount in each company code's own local currency, so the numbers are in different units and will not offset. Compare the group currency amount, field ksl, or translate both to one currency, and accept small rounding differences.