Direct answer

In SAP FI, a posting key is a two-digit control used on each document line item. SAP documents that it determines the account type, whether the line is a debit or credit, and aspects of the entry-screen layout. Standard examples include 40 for a G/L debit and 50 for a G/L credit.

Why posting keys matter

A financial document may be identified by its document type at header level, but the accounting logic becomes more specific at line-item level. The posting key tells the system what kind of account the line can use and on which side of the account the amount is posted. This is why two lines in one journal entry can legitimately use different posting keys.

ExampleTypical meaningWhy it matters
40G/L debitLine is posted to the debit side of a G/L account.
50G/L creditLine is posted to the credit side of a G/L account.
01 / 11Customer debit / creditRestricts the line to customer-account logic.
21 / 31Vendor debit / creditRestricts the line to vendor-account logic.

Posting key versus document type

These controls are related but not interchangeable. The document type classifies the overall accounting document and can restrict which account types are allowed in it. The posting key controls the individual line. SAP explicitly notes that the two must be compatible. A document type may allow customer and G/L postings, while a specific posting key narrows one line to a customer account.

DOCUMENT TYPEoverall document rulesPOSTING KEYline-item rules
Document type works at header level; posting key refines the rules for each line item.

Field control is the part beginners often miss

Posting keys can also influence whether line-item fields are available, required or hidden. That means an error that looks like a user-entry problem can actually come from configuration. The effective screen behavior can also depend on the G/L account’s field status, so consultants troubleshoot the combination rather than looking at the posting key alone.

Think Like a Consultant

Ask which control is rejecting the line.

If a user cannot enter a field, do not immediately assume the field is missing from the transaction. Check the posting key, the G/L account field status, the document design and any screen variants that may be influencing entry.

Account typeDebit / creditField statusOne posting key coordinates several line-item controls
A posting key is best understood as a bundle of line-item controls rather than simply a debit/credit code.

What to remember

Posting keys are a practical bridge between accounting logic and system behavior. Learn the standard examples, but focus on the control principles: account type, debit/credit direction and field behavior. That mental model transfers better than memorizing numbers alone.

Official SAP References

Continue the SAP FI control chain.