Co-Authored by Take Zhou
Figure #1: Extensibility Options
Currently SAP S/4HANA Cloud offers several extensibility options as shown in figure #1:
However, based on the analysis of customer incidents raised to SAP, it has been observed that 10% of the incidents related to General Ledger are still associated with extensibility, particularly concerning Custom Fields, Custom Logic and RAP Service. Meaning that the technical key users still face challenges on how to apply extensibility in General Ledger Accounting. This blog aims to assist technical key users in implementing custom fields using the Coding Block business context for the following SAP Fiori Apps:
Before we explore this topic in depth, let’s take a look at the overview of custom fields in General Ledger Accounting.
Figure #2: Overview of Custom Fields in General Ledger Accounting
The extensibility options for adding new Custom Fields in General Ledger Accounting include three types of business contexts: Coding Block, Market Segment, and Journal Entry Item. Coding Block and Journal Entry Item are used for adding custom fields to Journal Entries in different purposes. For more detailed information on how to use the Coding Block and JEI, please refer to Coding Block & JEI.
It’s important to note that the values for custom fields using the Journal Entry Item business context cannot be manually entered, particularly in analytical queries. On the other hand, a custom field added using the Coding Block business context is not only included in the Journal Entry but also in related business objects outside of Finance, such as the procurement process, as shown in figure #2. Meaning that the Coding Block will carry forward the value entered in custom fields under account assignment from a purchase order to subsequent processes. This allows for seamless integration and consistent data across different business workflows.
Please note that Coding Block custom fields are only applicable to G/L account line items, but not relevant for asset accounting or items in accounts receivable or accounts payable. Additionally, the number of custom fields that can be added using the Coding Block business context is limited to 20 fields with a maximum total of 400 characters. The type of custom fields in the Coding Block business context is limited to CHAR and NUMC data types only.
To enhance Margin Analysis in Sales Accounting, custom fields can be added by using the Accounting: Market Segment business context. Please kindly refer to Market Segment for more detailed information.
If you wish to choose the Association to Business Object as the type while creating your custom code, but there is no existing standard business object available, it is necessary to add a new Custom Business Object. The advantage of utilizing a Custom Business Object is as follows:
The SAP Fiori App Custom Business Objects is used for adding a new Custom Business Object. The key steps involved in this process are as follows:
For more comprehensive understanding, please kindly refer to the following demo on how to add a new Custom Business Object. This demo will provide detailed information and step-by-step instructions on how to successfully complete the task.
Once the Business Object has been created or if there is an existing standard Business Object available, you can proceed to create a new Custom Field for the type of Association to Business Object with SAP Fiori App: Custom Fields and Logic.
Please kindly refer to the following system demo for a detailed demonstration on how to add a new Custom Fields using Coding Block business context for General Ledger Accounting.
Once a new Custom Field has been enabled in the OData Service for SAP Fiori App Post General Journal Entries and successfully published, it becomes visible and ready to be utilized in the SAP Fiori App Post General Journal Entries. To understand how to manually input a value for Custom Field in the Journal Entry Line Item using SAP Fiori App Post General Journal Entries, please kindly refer to the following demo. Additionally, the standard SAP user GL_Accountant is used in the Demo.
If the Custom Field is enabled in the OData Service for SAP Fiori App Post General Journal Entries and successfully published, you can also use Upload General Journal Entries app to upload Custom Field Values for multiple Journal Entries using CSV or Excel. Please kindly refer to the following Demo on how to upload Custom Field Values for multiple Journal Entries using CSV or Excel. The Demo User is also standard SAP user GL_Accountant.
Furthermore, the Custom fields are accessible through the following SOAP APIs for utilization:
About how to enable the SOAP APIs for your Custom Field, please refer to the following Demo. The Demo User assigned is standard SAP user Extensibility Specialist.
Once the Custom Field is activated for SOAP APIs (Journal Entry – Change, Journal Entry – Post…), the value for the Custom Field can be posted or changed via APIs. For detailed instructions on how to change the value of Custom Field using SOAP API, please kindly refer to the following Demo.
Additionally, SAP Note 2453614 FAQ: Universal Journal Extensibility provides the frequently asked questions and answers regarding Extensibility in General Ledger accounting. Moreover, for additional guidance on Custom Field, please kindly refer to the following:
For Custom Logic please kindly refer to the following SAP Online Help.
For RAP service, please refer to the following online help and blog.