Sub topic 3
Master data that drives postings
This chapter assumes you know the organizational structures from the previous chapter: company code, controlling area, and chart of accounts. It also assumes you can open apps in the SAP Fiori launchpad. The SQL examples are optional and read-only.
Master data is the set of long-lived records that a journal entry refers to. When you post, the system reads these records to decide which accounts are allowed, which fields are required, which currency applies, and where the amounts roll up. Errors in master data show up later as rejected postings or as wrong numbers in reports.
The four master data families
| Master data | Defined at level | Main job in a posting |
|---|---|---|
| G/L account | Chart of accounts, then company code | Says what the amount is (asset, expense, revenue) |
| Business partner | Client, then company code and sales or purchasing area | Identifies customer or supplier and points to a reconciliation account |
| Cost center | Controlling area | Collects costs by responsible unit |
| Profit center | Controlling area | Groups results for internal reporting and segments |
G/L accounts: two levels
A G/L account has two parts. The chart of accounts segment holds what is shared by all company codes that use the chart. The company code segment holds local settings.
The chart of accounts segment contains:
- The account number and descriptions.
- The account type: balance sheet account or P&L account.
- The account group, which controls number ranges and which fields appear on the screen.
- In S/4HANA, the cost element category for P&L accounts that are also cost elements.
The company code segment contains:
- The account currency.
- The field status group, which sets which fields are hidden, optional, or required on a line item.
- Open item management and line item display.
- Tax settings, such as whether posting without tax code is allowed.
- The reconciliation account indicator, if the account is a control account for a subledger.
The settings you will meet most often:
- Open item management makes the account track items until they are cleared. Use it for clearing accounts, such as goods receipt/invoice receipt (GR/IR), not for ordinary expense accounts.
- Field status group can make the cost center required for an expense account. A posting that leaves it empty is rejected.
- Only balances in local currency stops postings in other currencies, which prevents unexpected foreign currency lines.
Cost elements are G/L accounts
In S/4HANA there is no separate cost element master record. A cost element is a G/L account with a cost element type, such as primary costs, revenue, or secondary costs. Secondary cost elements, for example type 42 for assessment and type 43 for internal activity allocation, exist only for controlling allocations. They are created in the same app as other G/L accounts.
This is why one posting can carry both accounting and controlling information. You cannot post an expense to a cost center unless the expense account is a cost element that is valid on the posting date.
Business partner replaces customer and vendor records
In S/4HANA the business partner (BP) is the single master record for customers and suppliers. A partner takes roles that decide what data you maintain:
- FLCU00 and FLCU01 for customer finance and sales.
- FLVN00 and FLVN01 for supplier finance and purchasing.
The company code data of a customer or supplier contains the reconciliation account. When an invoice posts to the subledger, the system automatically posts the same amount to this account. Users cannot post to a reconciliation account directly. A second field, the payment terms, supplies the due date used later for open items and dunning.
Customer-vendor integration (CVI) keeps the older customer and vendor records in sync with the business partner, so the same partner number can be used in both worlds.
Cost centers and profit centers
A cost center belongs to a controlling area and has a validity period. Its key fields are:
- Cost center category.
- Responsible person.
- Company code.
- Profit center.
- Standard hierarchy node.
The profit center on the cost center is the default used when a posting does not name one.
A profit center also lives in the controlling area, sits in the standard profit center hierarchy, and can carry a segment for segment reporting. Because profit center is a field of the Universal Journal, balance sheet lines can also carry it. Postings usually inherit it from the cost center, order, or material.
Checking master data with a query
You can read master data from tables to check a setup. This query lists the accounts of one chart of accounts that a company code uses, with currency and open item management. The chart YCOA and company code 1010 are sample values. Production code should use released CDS views instead of tables.
SELECT a~saknr,
a~ktoks,
a~xbilk,
b~waers,
b~xopvw
FROM ska1 AS a
INNER JOIN skb1 AS b
ON b~saknr = a~saknr
WHERE a~ktopl = 'YCOA'
AND b~bukrs = '1010'
ORDER BY a~saknr
INTO TABLE @DATA(lt_accounts).xbilk is set for balance sheet accounts. xopvw is set when open item management is on.
Common errors and how to read them
- "Account is not created in company code". The chart of accounts segment exists, but the company code segment does not. Extend the account to the company code.
- "Cost center required". The field status group makes the field mandatory. Supply the cost center, or review the group if the requirement is wrong.
- "Cost center is not valid on the posting date". The validity period has ended or has not begun. Check the dates on the cost center, and on the cost element too.
- Direct posting to a reconciliation account is rejected. This is by design. Post through the customer or supplier line.
- Items never clear. The account has no open item management, or the clearing account is the wrong one.
Change with care
Some changes are safe at any time, such as descriptions or the responsible person. Others affect existing data:
- Switching open item management on is only allowed when the account has a zero balance, or after the system checks that existing items can be converted.
- Changing the reconciliation account of a partner after postings is possible but moves the balance only for new postings. Reconcile the old and new accounts before closing.
- Do not delete accounts that have postings. Set a blocking or deletion flag so that no new postings are accepted.
Exercise
A user tries to post an invoice to an expense account and gets the error "Cost center required". Name the master data setting that causes this, and one way to resolve it.
Show answer
The field status group in the company code segment of the G/L account makes the cost center a required entry. Resolve it by entering a valid cost center in the posting, or, if the requirement is wrong, by assigning the account a field status group where the cost center is optional.
Exercise
Why can you not post directly to a customer reconciliation account, and which master data object determines which reconciliation account is used?
Show answer
The reconciliation account is a control account that the system updates automatically from subledger postings, so direct posting would make the subledger and the general ledger disagree. The company code data of the business partner (customer role) holds the reconciliation account.