Substitutions, Validations and BAdIs

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

A company’s accounting rules are often stricter or more detailed than what SAP delivers. Every expense line must carry a cost center, a rent posting must always show the same item text, a payment method must come from a customer’s master record. SAP lets you put such rules into the posting itself: a substitution fills or replaces a field while the user enters data, and a validation checks the entry and either warns or refuses the posting. This page explains both, shows the three tools that exist for them in SAP S/4HANA Finance (rules maintained by a business user, classic rules in Customizing, and Business Add-Ins written in ABAP), and says when to choose which. It is written against SAP S/4HANA 2025 FPS02 (on premise and Private Edition) and SAP S/4HANA Cloud Public Edition 2608. The rule app and its Fiori app ID F4406 belong to both editions. The classic Customizing tools are on-premise tools. The Business Add-Ins named here come from the Public Edition help, where they are implemented with the Custom Logic app; on premise they are covered only in general terms, because the help pages read for this page do not list them.

Before you read

Key terms

  • Substitution: a rule that derives, replaces or clears the value of a field while data is being entered.

  • Validation: a rule that checks the values entered and raises a warning or an error when they break the rule.

  • Business context: the circumstances a rule is defined for, which decide the fields available in the rule, for example Journal Entry Item or Coding Block.

  • Event: the exact moment and place in a business process where the rule runs.

  • Control level: the strictness of a validation rule, Error or Warning.

  • Coding block: the account assignment fields of a line, such as cost center, project and internal order.

  • Callup point: in the classic tools, the position in the processing of a posting where a validation or substitution is called.

  • Accounting Business Transaction Interface (ABTI): the interface in Accounting that turns business transaction data from other applications into journal entries.

  • BAdI: Business Add-In, an enhancement option where your own ABAP class plugs into the standard code.

The idea: fill and check at the moment of entry

When a journal entry is created, SAP’s help says, its information is either derived from a source document or business transaction or entered by hand. To fit the business better, a company may want some data checked, derived automatically or replaced by another value. SAP names two ways to change the standard behavior for this at runtime: rules created in the Manage Substitution/Validation Rules app, and Business Add-Ins implemented with the Custom Logic app. The two words mean different things.

  • A validation looks and decides. It reads the entered values and, if they break the rule, shows a message. A warning lets the user finish the posting, an error blocks it.

  • A substitution acts. It writes a value into a field, replaces what is there, or clears it, with no system message.

Both run while the user is still posting, before the entry is saved, so a wrong value never reaches the ledger and nobody has to correct it afterwards with a reversal. SAP lists a business context for each place where a rule can run, and a rule can use only the fields that context offers.

A small case from Example Trading Co. shows the difference. A clerk in company code EX01 posts the rent of 1,000.00 EUR as a debit on the rent expense account and a credit of 1,000.00 EUR on the bank account. A validation can insist that the debit line carries a cost center, otherwise the clerk gets an error. A substitution can write the same item text on every rent line, whatever the clerk typed. The posting balances in both cases (1,000.00 EUR debit, 1,000.00 EUR credit); the rules only decide whether the entry is accepted and what its lines say.

Three tools, one decision

The tools differ in who builds the rule and in what the rule can do.

Tool Who builds it What it is for Where it applies

Rules in the Manage Substitution/Validation Rules app (F4406)

A configuration expert or key user, with no ABAP.

Conditions on fields and a fixed set of actions: constant, field, function, table lookup, clear. SAP says to use the app whenever possible.

On premise and Public Edition. The business contexts and events are fixed by SAP.

Business Add-Ins (BAdIs)

A developer, in ABAP.

Complex requirements that go beyond the app. In the Public Edition they are created with the Custom Logic app (F6957) or, for developer extensibility, with ABAP Development Tools.

The names on this page are from the Public Edition help.

Classic validations and substitutions of Customizing

A consultant, in the Implementation Guide.

The older rule tool, with Boolean statements, application areas, callup points and optional ABAP user exits.

On-premise systems. Documented for Controlling and for the Special Purpose Ledger (FI-SL).

SAP’s help page for BAdIs recommends the app first: besides being easy to use, it lets you analyze substitution and validation logs in a dedicated app. A BAdI is the choice when the requirement goes beyond what the app can express. The Public Edition keeps extensions upgrade-proof by allowing only key user tools and released extension points; the clean core levels are explained in Extensibility and Clean Core.

flowchart TD A["A posting rule is needed:
fill a field or check an entry"] --> B{"Can conditions on fields
and a fixed action express it?"} B -- "Yes" --> C["Rule in the Manage
Substitution/Validation Rules app, F4406"] B -- "No, own logic needed" --> D{"Public Edition or
on premise?"} D -- "Public Edition" --> E["BAdI implemented with the
Custom Logic app, F6957"] D -- "On premise" --> F["Classic user exit or an
enhancement, see Enhancements and BAdIs"] A --> G["Older on-premise system with
classic rules already in use"] G --> H["Classic validation or substitution
in Customizing"]

The Manage Substitution/Validation Rules app

SAP describes the app (App ID F4406) as the place to display, change and create substitution and validation rules for selected business contexts and events, so that values can be validated, derived or replaced at the time of entry. Its key features are four: create validation rules, create substitution rules, change rules and display rules.

Business contexts and events

A rule is always written for a business context and an event. The context decides which fields the rule may use. The event says when the rule runs, for example when a user executes a particular step of a business process. SAP defines the contexts and events and they cannot be changed, but you can create your own fields for them with the Custom Fields app, and the rule app supports those fields. The rows below are the ones that matter for general ledger work, taken from the Public Edition page.

Solution area Business contexts Kinds of rule

General Ledger Accounting

Journal Entry, Journal Entry Item, Coding Block

Substitution and validation

Management Accounting and Margin Analysis

Market Segment; Financial Planning

Market Segment: substitution only. Financial Planning: both.

Joint Venture Accounting

Journal Entry Item, Coding Block

Both

Sales

Profit Center Derivation in Sales Documents

Substitution only

Service

Service Document (separate app F7818)

Substitution only

Public Sector Management

Own context documentation (separate app F7603)

Both

The Treasury Management area also lists a context, with substitution rules only and its own pages. The page’s table also names an app variant for each row; the Journal Entries variant covers most of the rows above. The step-by-step pages that SAP links per context (for example Rules for Substitution/Validation for the general ledger contexts) are the reference for the available fields.

Fields a rule can fill

For the three general ledger contexts, SAP’s page lists the fields that substitution rules can target. A fixed value that is not in the field’s value help raises a warning or an error message. With a warning the rule can still be saved and activated, with an error it cannot.

Context and event Target fields (technical name, meaning) Remark

Journal Entry (event Journal Entry)

AccountingDocumentHeaderText (document header text), DocumentReferenceID (document reference), Reference1InDocumentHeader and Reference2InDocumentHeader (internal IDs of reference keys 1 and 2)

Header data of the whole entry.

Journal Entry Item (event Journal Entry Item)

AssignmentReference (assignment number), DocumentItemText (item text), FinancialTransactionType, PaymentMethod, PaymentReason, HouseBank, HouseBankAccount, BPBankAccountInternalID, and Reference1IDByBusinessPartner to Reference3IDByBusinessPartner

HouseBank, HouseBankAccount and PaymentMethod can be substituted only when the entry is being created (the field JournalEntryIsPosted is initial) and the line is for a customer or supplier (FinancialAccountType equals D or K).

Coding Block (event Coding Block)

BillableControl, CostCenter, FunctionalArea, WorkItem

Only for accounts of the type primary costs or revenue, or secondary costs. CostCenter cannot be overwritten.

SAP names the business processes where these rules apply: Post Journal Entry, Activity Allocation, Goods Receipt, Enter Incoming Invoice and Payment for the header and item contexts, and in addition Sales Order Creation and Reverse Document for the coding block.

How a validation rule is built

SAP’s page "Create Validation Rules" describes these steps. The app itself requires an SAP system; not run here.

  1. Choose Create Rule. In the dialog choose a context and an event and select Validation Rule as the rule type.

  2. On the detail page, three sections appear: General Information, Precondition and Validation. In General Information give the rule a name and a description and choose a control level, Error or Warning.

  3. In Precondition set the conditions under which the check is made. If they are met the values are checked; if they are not met, the entry is not subject to the validation. If you leave the section empty, the values are always checked.

  4. In Validation define one or more check statements, each with a field, an operator and a value.

  5. Save the rule. It has the status New, and it must be activated before it is used at runtime.

Two rules of logic apply both to preconditions and to the statements. Filters for different fields or functions are combined with AND. Filters for the same field or function are combined with OR, with one exception: a filter with a negative operator such as Not equal to is combined with AND with the filters that use positive operators. The Matches operator compares a string field against a regular expression based on the POSIX standard 1003.2, in validation rules and in the precondition of substitution rules.

SAP’s own example shows the shape: when a user posts to a G/L account between 41640000 and 41649999 in company code 1000, the cost center must be between 200 and 300 but not 210, and the distribution channel must be 01. The fields in that example are GLAccount, CompanyCode, CostCenter and DistributionChannel.

How a substitution rule is built

The steps mirror those of a validation. After choosing a context, an event and Substitution Rule as the type, the detail page has General Information, Precondition and Substitution. A substitution line has four settings.

Setting Meaning

Target Field

The field whose value is substituted.

Substitution Type

Clear value; Substitute with Constant; Substitute with Field / Function; or Table Lookup, which reads a source value from a custom business object.

Source

A constant, or the source field or function, depending on the type.

Overwrite

If selected, an existing value of the target field is replaced. If not, an existing value is kept. For some contexts the checkbox is disabled because the field cannot be overwritten.

SAP delivers two functions for use in both kinds of rule: CONCATENATE joins field values or constants, and SUBSTRING takes part of a string given a string, an optional offset (default 0) and a length, both literals. You can add your own function, as described under custom functions below. SAP’s example fills the Product Sold Group field with a constant and the Functional Area field from the functional area of a WBS element when the billing document type is F1 and the company code is 1000.

Messages of a validation rule

The control level Error blocks the posting until the user corrects the entry. The control level Warning only warns. When you choose a control level, the app shows a standard message pattern. You can change the message by choosing a message from the message class FINRE_UI_STD, delivered by SAP, or by choosing a message class of your own. Placeholders in the message text can take a constant or the value of a field or function. The values you enter are not translated into other languages. In a three-system landscape you create your own message class in ABAP Development Tools and translate it with the Maintain Translations app.

The life of a rule: drafts, activation, disabling

A rule is not live when you save it. SAP’s page "Change Rules" describes the states.

stateDiagram-v2 [*] --> New: Save a new rule New --> Active: Activate Active --> Modified: Edit, a draft is created Modified --> Active: Activate the draft Active --> Disabled: Disable Disabled --> Active: Activate again Active --> [*]: Delete, the draft goes too

Only active rules are used at runtime. After a rule is active, the first edit creates a draft, and the rule still shows as Active with a link to the draft; the draft has the status Modified, and activating it overwrites the active version. Disabling an active rule stops it from running until you activate it again, which is useful to switch a rule off for a while. Deleting an active rule also deletes its draft. For auditability the system records every change to the rules on database table level, with the user name and the time stamp.

Which rule runs first

SAP’s page on substitution and validation for journal entries says that all rules are put into a topological order according to the fields they access. A rule that substitutes a field always runs before another rule that reads the same field. If several rules substitute the same field, they run in alphabetical order. If rules read and write the same fields in a cycle, the rule execution stops with an error. A practical consequence: when two rules write the same field, their names decide which runs first, so give rules names that make the intended order obvious.

Who may use it, how rules move, how to see what ran

  • Authorization. In the Public Edition a configuration expert needs a business role that contains the business catalog Accounting - Configuration (SAP_CA_BC_ACC_CONFIG_PC); SAP delivers the business role template Configuration Expert - Business Process Configuration (SAP_BR_BPC_EXPERT). A business user who gets an error from a rule can open the rule display only with a business role that contains the catalog General Ledger - Journal Entry Processing (SAP_FIN_BC_GL_JE_PROC_PC).

  • Transport. Rules are configured in the configuration system. An administrator with the transport catalogs SAP_CORE_BC_SL_IMP and SAP_CORE_BC_SL_EXP exports them with the Export Software Collection app (item type Financial Substitution and Validation) and imports the collection with the Import Collection app in the production system. All changes can be transported, but a rule that still has a draft cannot be exported: delete or activate the draft first.

  • Logs. The Substitution/Validation Logs app (App ID F4886) shows, for an event, the log of each rule execution at runtime as a tree: the event, the input document, the rule content and the result, such as whether the precondition was met and whether the validation succeeded or the substitution ran. You can filter by event, user and execution time. SAP recommends the app over a BAdI partly for this reason.

Custom functions

Beyond CONCATENATE and SUBSTRING, you can add a function with your own ABAP logic. SAP released the interface IF_FIN_RE_CUSTOM_FUNCTION, "Custom Function", for development in the SAP S/4HANA ABAP environment. When the class that implements it is activated, it becomes available as a function inside the rule app. Put the function in your own namespace. SAP ships a demo class, CL_SUBVAL_WEEKDAY, which calculates a weekday, as a starting point; the interface and class carry ABAP Doc inside the code. Implementing it requires an SAP system; not run here, and this page does not show a class, because the method signature is documented only inside the system.

A worked example: two rules for Example Trading Co.

Example Trading Co. wants two things in company code EX01. Every posting to the expense accounts of the company must name a cost center, and every rent posting must carry the same item text. All values below are illustrative; account numbers and the cost center pattern are chosen for this page and are not delivered content. Both listings require an SAP system; not run here.

Rule 1, a validation. Context Coding Block, event Coding Block (SAP lists the coding block context for accounts with primary costs or revenue, and for secondary costs).

Section Field Operator Value

General Information

Rule name

guide-ex01-expense-needs-cost-center; control level Error; message chosen from the message class FINRE_UI_STD

Precondition

CompanyCode

Equal to

EX01

Precondition

GLAccount

Between

40000000 and 49999999 (the illustrative expense range of EX01)

Validation

CostCenter

Matches

EX-.+

Before writing a pattern such as EX-.+, look at the value help of the cost center field to see exactly how the system holds cost center values, because a regular expression compares the stored text. With this rule active, a clerk who posts the 1,000.00 EUR rent debit to an expense account in EX01 without a cost center gets an error and cannot finish the posting, while the same line with EX-ADM (the administration cost center of the running example) passes. Set the control level to Warning if management wants the clerk only to be reminded.

Rule 2, a substitution. Context Journal Entry Item, event Journal Entry Item.

Section Field Operator or type Value

Precondition

CompanyCode

Equal to

EX01

Precondition

GLAccount

Equal to

the rent expense account of EX01

Substitution

DocumentItemText (target field)

Substitute with Constant

Office rent EX01; the Overwrite box is selected so that the text is the same whatever the clerk typed

DocumentItemText is one of the item fields SAP lists for substitution, and the constant is one of the substitution types. Rule 2 does not need a validation, because it changes a text rather than checking one. Activate both rules, then post the rent entry (debit rent expense 1,000.00 EUR on EX-ADM, credit bank 1,000.00 EUR). The entry balances, the debit line shows the substituted text, and the Substitution/Validation Logs app lists the execution of each rule. To move the rules to production, export them as a software collection, as described above, after activating any draft.

Business Add-Ins for journal entries

When the app cannot express a requirement, for example a check that must read other master data before posting, SAP’s Public Edition help offers Business Add-Ins under the Journal Entry business context of the Custom Logic app (App ID F6957). You implement them for key user extensibility in the Custom Logic app, or for developer extensibility in ABAP Development Tools. The Custom Logic app and the Custom Fields app (App ID 1481) are described together by SAP. Each BAdI comes with sample coding, message classes and system documentation, which you open with View Details on the Description tab. SAP asks you to read the comments in the sample coding.

Validation BAdIs. Their job is to add checks on top of the standard checks, with a message for the end user when a check fails.

BAdI What it checks

FIN_ACDOC_HEADER_VALIDATION

The values in the header fields of a journal entry, at company code level.

FIN_ACDOC_ITEM_VALIDATION

Each line item of a journal entry being posted, at company code level.

FIN_CODING_BLOCK_VALIDATION

The account assignment fields of each line item, at company code level.

FIN_ACDOC_VALIDATION

Header and line items together, at company code level.

FIN_CO_SNDR_RECR_VALIDATION

Sender and receiver in Controlling postings; can be activated at company code level.

The validation BAdIs consider only error messages (type E), except FIN_ACDOC_VALIDATION, which also considers warnings (type W); every other message type is ignored. Error messages prevent postings for both manual and automatic journal entry creation. A check can use only the fields, including custom fields, that are in the importing parameters of the BAdI.

Substitution BAdIs. Their job is to replace an element of a posting by your own logic, for example to record trading partners correctly in an intercompany posting, or to substitute a source cost center for some G/L accounts.

BAdI What it changes

FIN_ACDOC_HEADER_SUBSTITUTION

Individual fields of the journal entry header, for each company code.

FIN_ACDOC_ITEM_SUBSTITUTION

Individual fields of each line item, for each company code.

FIN_CODING_BLOCK_SUBSTITUTION

Individual fields of the account assignment block of a line item.

FIN_ACDOC_SUBSTITUTION

Individual fields of the journal entry as a whole, for each company code.

FIN_ACDOC_EXT_SUBSTITUTION

Individual extension fields of the line items, for each company code.

FIN_ACDOC_EXT_REV_SUBSTITUTION

The same, for manual and automatic reversal of journal entries, such as canceling a billing document.

FIN_ACDOC_EXT_CHG_SUBSTITUTION

The same, for changes of journal entry items.

You can substitute only the fields that the substitution BAdI delivers. When the system creates journal entries for billing documents, the substitution BAdIs FIN_ACDOC_SUBSTITUTION, FIN_ACDOC_HEADER_SUBSTITUTION and FIN_ACDOC_ITEM_SUBSTITUTION (among others) receive the billing document number, so your logic can read billing document fields through CDS views while posting. SAP adds a limit: this works only when the billing document is already on the database, that is, when it was created without automatic posting to accounting. With automatic posting, SAP says to call the class CL_SDBIL_ACCTGINF_BPD_RTME_DTA to read the transient billing document data, and points to a knowledge base article. For tracing which methods and parameter values a BAdI used, SAP offers custom logic traces.

Writing a BAdI implementation needs the Custom Logic app or ABAP Development Tools in a Public Edition system and the sample coding of the chosen BAdI, so no code is shown here; this page prints no method signature, because the signatures are documented only in the BAdI documentation inside the system. How a BAdI is built, defined and implemented in general is explained in Enhancements and BAdIs.

On premise, a BAdI is a classic enhancement option and is implemented in the ABAP development tools of the system. The pages read for this page do not list finance-specific on-premise BAdI names for these checks, so none is named here; look for them in the BAdI Builder of your system and in the Cloudification Repository viewer, and treat a name from a blog or from memory as unconfirmed until you have found it there.

The Accounting Business Transaction Interface

Not every journal entry is created by a person in a posting app. The finance business transaction interface (FIBTI) receives business transaction data from a sending application and passes the data that Accounting needs, as finance notifications, to the accounting business transaction interface (ABTI). The ABTI interprets that data and turns it into journal entries. It also decouples the sender from Accounting: steps such as G/L account determination and valuation happen in Accounting and not already in the sender. SAP names two senders: In-House Banking, which can send payment items, and payroll systems, which send payroll data that is posted in financial accounting. The Manage Finance Notifications app is one function that uses the ABTI.

Two facts matter for rules. First, you can create substitution and validation rules for journal entries posted through the ABTI with the same app, by choosing the business context and event Journal Entry Item in ABTI (Accounting Business Transaction Interface). SAP states that the ordinary Journal Entry Item event is not used in the ABTI, so rules written for that event do not apply there and you must create rules for the ABTI event. Second, SAP states that the system calls no BAdIs for substitution or validation when the ABTI posts journal entries, so in this path a rule in the app is the way to substitute or validate.

The classic validations and substitutions of Customizing

Older systems, and many on-premise systems that were upgraded, still use the classic rule tool. SAP’s Controlling documentation says you can validate or substitute data directly at the input stage, with settings in Customizing for Controlling under Controlling General, Account Assignment Logic, Define Validation or Define Substitution. The book Configuring SAP S/4HANA Finance, 3rd edition (2025), names transaction GGB1 as the entry point for defining substitutions and walks through a cost center substitution; the SAP help pages read for this page reach the tool through Customizing paths and give no transaction code. All of this is on premise and requires an SAP system; not run here.

Restrictions SAP states for Controlling: substitution and validation are intended only for actual postings. For CO-internal transactions such as order settlement, assessment, distribution, periodic reposting, indirect activity allocation, variance calculation, overheads and accrual calculation, and confirmation, the system cannot convert the rules completely. It can substitute only the fields of the include structure CI_COBL (the customer enhancement of the account assignment block) and the document text COBK-BLTXT; all other fields can be substituted only for the manual CO-internal postings that SAP lists (reposting of costs, revenues and line items, activity allocation, indirect activity, non-allocable activities and statistical key figures). SAP also warns that substituting fields from cycle rules or settlement rules causes data inconsistencies.

For the Special Purpose Ledger (FI-SL) and the other application areas, SAP documents the concepts of the same tool:

Concept What it is

Application area

A two-character code for the general area where the rule runs, for example GL for FI-SL postings. SAP’s table lists, among others, AM (asset management), CO (Controlling), FI (Financial Accounting), GL (Special Purpose Ledger), PC (Profit Center Accounting) and PS (Project System); not every area allows all of validations, substitutions and rules.

Callup point

A four-digit number for the place in processing where the rule runs. For application area FI, SAP’s examples are 0001 for the document header, 0002 for the line item and 0003 for the total document (used for matrix validations and substitutions). The same number means different places in different application areas.

Boolean statements

A validation has a prerequisite statement, which decides whether the data is checked, a check statement, and messages for the failed check. A substitution has a prerequisite and the substitution values, optionally through a substitution exit. The tool validates before it substitutes, so a value that is going to be substituted can be validated first.

Activation

A defined validation is inactive until you assign it to a callup point and a company code (or a global company) with an activation level.

User exit

A user-defined FORM routine with a name made of U (customer) or S (SAP standard) and a three-digit number, for example U001. The form pool names are stored in table T80D; SAP ships example form pools RGGBS000 and RGGBR000, which you copy to a name starting with Z so that an upgrade does not overwrite them.

An ABAP user exit in this tool is classic procedural code. New development for a clean core is better placed in the app or in a released extension point, which is the reason the rule app exists. Compare also Profit Center Accounting, where a substitution can derive the profit center, and SAP’s warning there not to let a substitution change the profit center of the master data being processed during a change.

In the two editions

Topic On premise and Private Edition (2025 FPS02) Cloud Public Edition (2608)

Rule app F4406

Available; the ABTI page describes creating rules in it.

Available; the app page lists the business contexts and the authorization catalog.

BAdIs

Classic enhancement options in the ABAP development tools; finance names not confirmed on the pages read.

Journal entry BAdIs implemented with the Custom Logic app or ABAP Development Tools.

Classic validations and substitutions

Customizing for Controlling and for the Special Purpose Ledger.

Not described on the Public Edition pages read; use the app.

Moving rules to production

The classic tools have a Transport function that puts a validation, substitution or rule, with its sets and Boolean classes, into a transport request.

Export Software Collection and Import Collection apps, item type Financial Substitution and Validation.

The Public Edition row for the classic tools states what the pages say; it is not a claim that the classic tool is absent.

Common errors and pitfalls

Symptom Cause Remedy

A new rule does nothing.

A saved rule has the status New or Modified. Only active rules run.

Activate the rule or the draft.

The rule works in the posting app but not for payroll or In-House Banking entries.

Those entries are posted through the ABTI, which uses the event Journal Entry Item in ABTI, not Journal Entry Item.

Create the rule for the ABTI event. SAP calls no substitution or validation BAdIs in this path.

A rule cannot be activated.

A fixed value in the rule is not in the value help of the field and the system answers with an error message.

Use a value from the value help, or change the value.

A substitution of HouseBank, HouseBankAccount or PaymentMethod is rejected.

SAP allows them only when the entry is being created and the line is for a customer or supplier.

Add those preconditions or choose another field.

Two rules write the same field and the result is surprising.

Rules that substitute the same field run in alphabetical order, so a later rule can overwrite the value of an earlier one.

Name the rules for the intended order, or merge them.

The rule execution stops with an error.

Rules read and write the same fields in a cycle.

Break the cycle by changing which rule reads which field.

Export of a rule to production is refused.

The rule has a draft.

Activate or delete the draft, then export.

A BAdI warning does not appear.

Only FIN_ACDOC_VALIDATION considers warnings; the other validation BAdIs consider only errors.

Use that BAdI for warnings, or use the rule app with control level Warning.

A Controlling substitution is ignored for an allocation.

The classic tool is intended only for actual postings, and cannot convert rules for most CO-internal transactions.

Use it for actual postings only.

What older books show, and what has changed

Stoil Jotev’s Configuring SAP S/4HANA Finance (3rd edition, 2025) shows the classic route to substitution in Controlling step by step: it names transaction GGB1, a sample substitution delivered by SAP, and the three methods of constant value, exit and field assignment. Its text on this topic does not describe the Manage Substitution/Validation Rules app, the business contexts, the Custom Logic BAdIs or the ABTI event, which is why this page puts the app first. It is not wrong for an on-premise system that still uses the classic tool. Andrew Okungbowa’s SAP S/4HANA Financial Accounting Configuration (2nd edition, 2023) concentrates on the configuration of the general ledger, document control and subledgers, and does not treat substitutions or validations as a topic of its own. For this topic, rely on the SAP Help Portal pages in the references.

Summary

  • A validation checks an entry and warns or blocks; a substitution writes, replaces or clears a field, silently, while the user is still posting.

  • The Manage Substitution/Validation Rules app (F4406) is SAP’s first choice: a rule has a context, an event, a precondition and a validation or substitution part, and runs only when it is active.

  • Filters on different fields combine with AND, filters on the same field with OR, and a negative operator combines with AND; rules run in dependency order, then alphabetically.

  • For requirements the app cannot express, the Public Edition offers the journal entry BAdIs of the Custom Logic app, such as FIN_ACDOC_ITEM_VALIDATION and FIN_ACDOC_ITEM_SUBSTITUTION; on premise the classic tool and classic enhancements remain.

  • Entries posted through the ABTI need rules for the event Journal Entry Item in ABTI, and no substitution or validation BAdI runs there.

  • Rules and BAdIs are tested in an SAP system; every listing on this page requires an SAP system and was not run here.

References