5 Best ACDOCA Extensibility Options

SAP S/4HANA offers various ACDOCA extensibility options to add custom fields, with some interesting differences between the S/4HANA Simple Finance, S/4HANA On-Premise, and S/4HANA Cloud products.

For example, the widely-used classic Coding Block extension is still available On-Premise but not the cloud version. However, S/4HANA Cloud introduced a new Coding Block context for key user extensibility to serve as its successor. All products now allow local extension of journal entries, while classic CO-PA characteristics remain in use for On-Premise only.

And an important new option for CO-PA extensibility using the Market Segment context is just becoming available for S/4HANA Cloud and On-Premise in 2020. Read on to understand the key features, limitations, analytics support, and transaction vs Fiori app usage for each ACDOCA extensibility option across the S/4HANA products.

Understanding S/4HANA ACDOCA Extensibility

In the realm of modern enterprise management, SAP S/4HANA has emerged as a transformative force, propelling organizations toward more efficient, agile, and data-driven operations. At the heart of this advanced enterprise resource planning (ERP) solution lies ACDOCA, the Universal Journal.

ACDOCA is more than just a table that stores financial and management accounting data; it serves as a real-time hub that unifies business data, offering unprecedented insights into an organization’s financial data at one place.

Add Custom Fields in ACDOCA

Every S/4HANA implementation is unique and have business requirements to add custom fields in ACDOCA table. SAP provides 5 different extensibility options to extend ACDOCA and ACDOCP table.

Below are the recommended ACDOCA extensibility options available in SAP S/4HANA on-premise and SAP S/4HANA Cloud. Let’s understand the key features of these extensibility options in detail.

1. Class Coding Block Extension

The classic Coding Block extension using transaction OXK3 and structure CI_COBL is still widely used to extend many SAP GUI transactions and processes leading to journal entries in S/4HANA Finance(sFIN) and S/4HANA On-Premise system. Key features include:

  • Extends ACDOCA and many additional tables like MSEG, EBKN, and EKKN, allowing wide extensibility but potentially more tables than needed.
  • Available in many Fiori apps posting journal entries as of S/4HANA Finance 1605 and S/4HANA On-Premise 1610.
  • Allows derivation and validation using GGB0/GGB1 transactions.
  • Limited to 18 fields of data types CHAR and NUMC only. But, there is workaround available to add more fields (SAP Note 885181).
  • Not used for customer/vendor line items but substitution possible via FI callup point 2 – Line Item.
  • Can publish custom fields to key user extensibility apps for analytics using SCFD_EUI transaction as of S/4HANA On-Premise 1610 and higher releases.
  • Supported in relevant BAPIs like BAPI_ACC_DOCUMENT_CHECK/POST.
  • Supported in interfaces to post FI data using BAdI: Enhance Processing of posting Data from Third-Party Systems (BADI_FINS_CFIN_EX_INTF).

In summary, it provides wide extensibility capabilities but with some key restrictions on number of fields and data types. It remains an option for many extensibility scenarios in On-Premise systems.

2. S/4HANA Key User Extensibility

SAP S/4HANA Key User Extensibility provide below flexible and simplified way to extend ACDOCA table without core/code modifications. These leverage Custom Fields and Logic (CFL) fiori app along with business contexts tailored to SAP S/4HANA LoB.

  • Coding Block context as a successor to classic Coding Block extension for journal entry extensibility.
  • Journal Entry Item context for ACDOCA extension only.
  • Market Segment context for simplified CO-PA operating concern extensibility.

2.1. Coding Block business context

Coding Block business context extension is the successor to classic Coding Block extension in both S/4HANA Cloud and On-Premise. It has the following key features and limitations:

  • Extends the same tables and processes leading to journal entries as classic Coding Blocks.
  • Available in Fiori UIs which are relevant for posting journal entries, but not SAPGUI transactions.
  • Allows derivation and validation using enhancement options.
  • Limited to 20 fields (400 characters total in S/4HANA Cloud, 200 in On-Premise). Only CHAR and NUMC data types allowed.
  • Not used for customer/vendor line items but derivation possible via enhancement.
  • Custom fields available in CDS analytics in both products.
  • Supported in relevant BAPIs like BAPI_ACC_DOCUMENT_CHECK/POST in On-Premise.
  • Supported in SAP S/4HANA On-Premise read APIs and S/4HANA Cloud SOAP services to post journal entries.

This approach provides a more modernized approach to Coding Block extensibility with improved analytics support, but field and size limitations remain.

2.2. Journal Entry Item business context

The Journal Entry Item business context for S/4HANA key user extensibility allows localized extension of journal entries using the Custom Fields and Logic (CFL) Fiori app. This option is available in S/4HANA Cloud, On-Premise 1511 and later releases, as well as S/4HANA Finance 1605.

  • Custom fields are added to the accounting interface structure ACCIT and tables ACDOCA/ACDOCP via the include INCL_EEW_ACDOC.
  • Derivation of custom field values can be done using the BADI_FINS_ACDOC_POSTING_EVENTS in On-Premise and the FIN_ACDOC_EXT_SUBSTITUTION enhancement option in Cloud. However, these will only affect ACDOCA.
  • As of S/4HANA 2020, the custom fields are also added to table BSEG, enabling substitution in transaction GGB1 and affecting BSEG, ACCIT, and ACDOCA.
  • Custom field values cannot be entered manually but can be displayed in various apps and transactions.
  • Limited to 120 custom fields of any data type.
  • Available in relevant analytical CDS views, interfaces and BAPIs.

Overall, this approach provides localized extensibility to only ACDOCA table with minimal disruption to standard objects.

2.3. Market Segment business context

Market Segment business context for S/4HANA key user extensibility allows extension of the CO-PA operating concern. This is available in S/4HANA Cloud and S/4HANA On-Premise as of 2020 release.

  • Custom fields can be entered manually in Fiori apps and SAPGUI transactions when posting to a profitability segment.
  • Derivation of values is possible with the CO-PA derivation tool (KEDR) in On-Premise systems, while S/4HANA Cloud uses the Manage Substitution and Validation Rules app.
  • Limited to 60 custom fields in S/4HANA On-Premise and allows up to 120 custom fields for margin analysis S/4HANA Cloud with CHAR and NUMC types.
  • The custom fields are only usable for cost or revenue accounts, not balance sheet.
  • Key benefits include availability in CDS analytics and support in interfaces and BAPIs.

This provides modernized CO-PA extensibility capabilities natively in S/4HANA system.

3. Classic CO-PA custom characteristics 

The classic CO-PA custom characteristics created using transaction KEA5 provide an extensibility option that is available in S/4HANA Finance and S/4HANA On-Premise systems. This approach extends the CO-PA operating concern as well as generating the custom fields in journal entry table ACDOCA.

Key capabilities include the ability to manually enter field values in SAPGUI transactions when posting to a profitability segment. Derivation of values is possible using the CO-PA derivation tool (KEDR). There is a limit of 60 custom fields of data types CHAR and NUMC in the operating concern.

The custom characteristics can only apply to cost or revenue general ledger accounts, not balance sheet accounts. Analytics enablement requires custom code. Support is available in relevant BAPIs and other interfaces.

ACDOCA Extensibility Options Comparision

Here is a comparison table of key features for the different SAP S/4HANA extensibility options:

FeatureClassic Coding BlockCoding Block ContextJournal Entry ItemClassic CO-PAMarket Segment Context
ProductsS/4HANA Finance,
S/4HANA On-Premise
S/4HANA Cloud,S/4HANA On-PremiseAll S/4HANA productsS/4HANA Finance,S/4HANA On-PremiseS/4HANA Cloud, S/4HANA On-Premise 2020+
TransactionsSAPGUIFiori appsDisplay onlySAPGUIFiori & SAPGUI
Tables ExtendedACDOCA + many additionalPrimarily ACDOCAACDOCA, ACDOCP, BSEGCO-PA tablesCO-PA tables
Max Fields18201206060/120
Field TypesCHAR, NUMCCHAR, NUMCAll typesCHAR, NUMCCHAR, NUMC
AnalyticsPublish using appNative CDSNative CDSEnable via custom codeNative CDS
InterfacesBAPIs, othersBAPIs, OData, SOAPBAPIs, OData, SOAPBAPIs, othersBAPIs, OData, SOAP
Derivation/ValidationGGB0/GGB1 transactionsEnhancement optionsGGB1 transaction with FI callup point 2KEDR transactionKEDR transaction/
Manage Substitution and Validation Rules

ACDOCA Extensibility Decision Tree

Here is a decision tree to help determine which ACDOCA extensibility option to select in SAP S/4HANA:

Are you extending CO-PA operating concern?

  • Yes:
    • Using S/4HANA Cloud or S/4HANA On-Premise 2020+?
      • Use Market Segment context
    • Using S/4HANA Finance or pre-2020 S/4HANA On-Premise?
      • Use classic CO-PA custom characteristics (KEA5)
  • No, extending journal entries:
    • Need wide extensibility to multiple tables?
      • Using S/4HANA Finance or On-Premise?
        • Use classic Coding Block extension (OXK3)
      • Using S/4HANA Cloud?
        • Use Coding Block context
    • Need localized extensibility to journal entry tables?
      • Use Journal Entry Item context
    • Other specialized extensibility?
      • Evaluate other key user extensibility options

Leave a Comment