Navigating SAP S/4HANA Conversion: A Comprehensive Guide for Coding Block Enhancement


Embarking on the journey from SAP ECC to SAP S/4HANA can be a complex endeavor, especially when dealing with an active coding block in the FI-GL module. This blog post serves as a vital resource for Customers, Partners, Solution Experts, Enterprise Architects, and SAP Finance Consultants facing this scenario. It provides insights into the challenges, solutions, and key considerations during the transition.

Understanding the Challenge: Enhancing Coding Blocks in SAP ECC

In the realm of SAP ECC, you might have opted to activate an additional attribute in the FI-GL module, enriching GL line items for robust reporting. To achieve this, you extended the coding block through the inclusion of a new field in the CI_COBL include structure. This inclusion, guided by SAP standards, ensures the new field is seamlessly integrated into relevant tables.



Configuration path of coding block (Reference system image, actual system may vary)




Coding block activation sample display (Reference system image, actual system may vary)

Transition to SAP S/4HANA: Evaluating the Impact

As you gear up for the conversion to SAP S/4HANA, a critical analysis of the coding block extension's impact on migrated FI-GL line items in the ACDOCA table becomes imperative.

Guidelines for Classic Coding Block Functionality in SAP S/4HANA:

  1. Classic Coding Block extensibility is available using OXK3 transaction and CI_COBL structure.
  2. It seamlessly integrates into SAP GUI transactions, MM, FI, and CO processes, affecting entries in the ACDOCA table.
  3. Fiori apps support this functionality, starting from SAP S/4HANA Finance 1605 and SAP S/4HANA (On-Premise) 1610 onwards.
  4. Derivation and validation are possible through the Validation/Substitution tool (GGB0/GGB1 transactions).
  5. Limited to 18 fields (refer to SAP Note 885181 for a workaround).
  6. Supports only CHAR and NUMC data types (refer to SAP Note 130174).
  7. Not applicable for customer or supplier line items (account type D or K in ACDOCA table).

Key Points During Conversion:

  • Ensure custom fields from BSEG, FAGLFLEXA table are present in ACDOCA by incorporating them in the CI_COBL structure.
  • If using customer enhancement CI_FAGLFLEX04 for FAGLFLEXA table, not in CI_COBL, add these fields to CI_COBL for ACDCOCA inclusion.
  • Generate the CDS view post additional activation, making fields available in ACDOCA.
  • Migrate data logic is available for standard fields from New G/L to ACDOCA and customer fields via append structure.
  • Consider append fields from COEP and BSEG missing in ACDOCA for a scenario overview (refer to SAP Note 2160045).

Conversion Considerations:

  • Custom fields in BSEG via CI_COBL ensure automatic presence in ACDOCA.
  • 'ZZ*' fields in totals table FAGLFLEXT (check FAGLFLEXT_BCK) via coding block extension prevent additional technical documents in ACDOCA.
  • Use 'FGL_MIG_REGENERATE_CDS' report for CDS view regeneration after any DDIC structure changes.
  • 'FINS_MIG_UJ_MAPPING_GENERATE' dynamically generates the class for line item migration logic, essential for updated artifacts.

Additional SAP Notes for Reference:

  • 2453614 – FAQ: Universal Journal Extensibility
  • 2827405 – BADI_FINS_ACDOC_POSTING_EVENTS: Performance problems / No access to split data in it_acdoc_item
  • 2880462 – Error enabling Custom Field for Accounting: Coding Block
  • 3337214 – Include CI_COBL fields in ACDOCT

Frequently Asked Questions (FAQ):

1. Can I extend the coding block in SAP S/4HANA for specific business processes?

  • Yes, the "Classic" Coding Block extensibility allows you to do so using the OXK3 transaction and CI_COBL structure. However, it's important to consider the limitations mentioned in the guidelines.

2. How do I ensure my custom fields from SAP ECC are present in the ACDOCA table after the conversion?

  • Ensure that custom fields from BSEG, FAGLFLEXA tables are incorporated into the CI_COBL structure. This ensures their automatic inclusion in ACDOCA during the conversion.

3. What should I do if I encounter issues during the regeneration of the CDS view?

  • If issues arise during CDS view regeneration, utilize the 'FGL_MIG_REGENERATE_CDS' report to address any changes to DDIC structures. Follow it up with 'FINS_MIG_UJ_MAPPING_GENERATE' for updated migration logic.

4. Can I use the classic Coding Block functionality for customer or supplier line items in ACDOCA?

  • No, the classic Coding Block functionality is not used for customer or supplier line items (account type D or K in ACDOCA table). However, substitution is possible with FI callup point 2.

Conclusion: While this technical guide provides valuable insights, every conversion scenario is unique. If you encounter challenges beyond the scope of this information, reach out to SAP support through the appropriate channels. The intricacies of the conversion process may vary, and SAP is committed to assisting you on your journey to SAP S/4HANA.