| Status | |
|---|---|
| Owner | Alexander Bechter |
| Stakeholders | Gilles Madjaran NARAHARI-ext, Bhargavi Matthias Strickx |
| Jira Request ID | |
| Jira Development ID |
| Parameter | Value |
|---|---|
| Application System | S/4 HANA |
| Business Process Reference | 06.10.02.01. Manage Inbound Deliveries 09.11.01.05. Perform Operational Reporting for General Ledger Accounting |
The main purpose of this custom development is to facilitate detailed cost and spend reporting based on material group information in financial reports in S/4 HANA. Due to limitations of SAP standard as explained further in SAP note '2843578 - S/4 HANA Finance: Attribute assignment for material inventory lines' the material group is now available as a table field but it is only populated for specific posting scenarios which is insufficient for comprehensive cost analysis on financial reporting. By implementing this custom development, the material group will be available for all material movements recorded in the system and all financially-relevant relevant sales as well as purchasing transactions and therefore allows for a holistic and flexible reporting of financial costs and spend based on the material group classification defined in S/4 HANA.
In SAP standard, the material group is only captured for integrated, sales-related financial postings in the financial line item tables used for Financial reporting in S/4 HANA. The material group is equally if not more important for cost and spend analysis in integrated, procurement-related financial postings as it provides further and more detailed insights into the nature of the costs that may not always be obvious from just looking at the G/L account used for the financial posting. The Chart of Accounts in S/4 HANA has been condensed to a large extent under the premise that auxiliary reporting dimensions such as the material group can be used for a more detailed and granular analysis of costs incurred in the operational activities of an organization in financial reporting. The material group therefore serves as an important instrument for more detailed cost/spend reporting beyond the G/L account.
The scope of this development therefore includes the following components:

Insert the flowchart and fill in the steps
Step | Description | Comment |
|---|---|---|
| 1 | Financial posting executed by end user. | This posting can come from various source applications and processes such as goods receipt, invoice receipt, process order settlement, etc. |
| 2 | Check if material group is populated in universal journal ledger. | In some scenarios as explained in note 2843578 the material group is populated automatically. In this case, no further action is required. |
| 3. | Posting contains reference to purchase order line item. | The material group used in the purchase order should take precedence over the material group assigned in the material. Spend analysis between Procurement and Financial reporting based on material groups shall be kept in sync. |
| 3 | Derive material group from purchase order line item captured in universal journal ledger record. | The material group should be directly read from the purchase order line item if a PO reference is present in the financial line item record. |
| 4 | Posting contains reference to material but no purchase order details. | Should a material movement be posted without a reference to a PO and the material group does not get determined by SAP standard behavior, it shall be derived from the material master. |
| 5 | Derive material group from material captured universal journal ledger record. | |
| 6 | Derive material group text and capture it in universal journal ledger custom field. | Ideally the material group text should be stored in a custom field in ACDOCA for easier identification of the actual spend category. |
| 7 | Execute financial report and drill-down by material group and material group description. | The fields for material group and material description can be added as drill-down dimension in key Finance reports used in S/4 HANA. |
Not applicable. No dependencies with other custom developments identified.
No specific requirements for authorization checks identified. For the CUI instance, the overarching export control principles shall apply and data shall be masked as per CUI classification requirements.
Apart from that, for this custom development the calling program's s authorization checks shall be followed.
Configuration Requirements
Materials Management:
Sales and Distribution:
Financial Accounting:
No specific language requirements for this custom development. Material groups shall be translated as per rules defined in KDD055 - Multi-Language Support.
No other special requirements identified for this custom development.
The following functional requirements must be covered by this custom development:
The above details shall be enriched for all line items posted in the universal journal table (ACDOCA) in S/4 HANA where material group details are required for financial reporting in S/4 HANA.
Custom Field for material group text "WGBEZ" to be added in universal journal ledger (ACDOCA)
The proposed technology to use is a custom enhancement via pre-defined BAdIs enhancement spots to update records in the universal journal ledger directly (e.g. enhancement spot: FINS_ACDOC_MODIFY) before the database updates are performed.
The advantages of this enhancement method are as follows as opposed to other methods such as classic FI substitutions via user exits:
This section is not applicable for this custom development
This section is not applicable for this custom development
This section is not applicable for this custom development.
This section is not applicable for this custom development.
This section is not applicable for this custom development.
Selection Screen Enhancement
This section is not applicable for this custom development.
The processing logic shall be sequenced as follows:
a) To limit the number of line items to be processed, the following exclusions can be defined:
b) For all documents that need to be included, proceed with the following steps in the given sequence:
1.) Check if material group is populated. If yes, do nothing and exit. If no, proceed with step 2.)
2.) Check if purchase order and purchase order line item is populated in table record (ACDOCA-EBELN and ACDOCA-EBELP <> 'blank')
3.) If it's not populated, exit and proceed to step 5.)
4.) If populated, go to the PO line item table EKPO and retrieve the material group (MATKL) using the purchase order (EBELN) and (EBELP) as matching criteria for both tables (ACDOCA, EKPO). Populate ACDOCA-MATKL.
5.) If the purchase order and order line item is not populated (ACDOCA-EBELN and ACDOCA-EBELP = <blank>), check if a material (ACDOCA-MATNR) is populated. If not, do nothing and exit. If yes, proceed to step 6.)
6.) Go to table MARA and read out MARA-MATKL using MATNR as the matching criteria for both tables (ACDOCA, EKPO). Populate ACDOCA-MATKL.
c) Fetch material class description and populate it in a custom field created via the ACDOCA extensibility framework in the universal journal ledger. This part of the processing logic is applicable to all documents and line items that pass the first check defined under a).
Volumes are expected to be high as most Financial Accounting documents line items are required to be checked and potentially enriched. To limit the volume of call-ups for the custom development, exclusion criteria at document header level have been defined in the processing logics.
The volumes of custom code processing is expected to be high on the high side as most Financial Accounting document line items are required to be checked and potentially enriched.
Technical team is requested to propose an ideal enhancement technology considering performance aspects and optimize the custom code such that system performance is not impeded.
No specific error handling is required as part of this custom development.
Missing attribute derivations in the universal journal ledger need to be investigated by IT on a case-by-case basis via a support ticket as it requires custom code analysis.
Testing needs to be done in collaboration with the functional consultant in charge of the custom development.
The functional consultant shall provide sample documents that can either be reversed and re-posted by the developer or copied with reference for repetitive and continuous testing.
The following scenarios need to be tested:
| ID | Condition | Expected Result |
|---|---|---|
| 1 | Purchase Order details and material populated in ACDOCA but no material group | Material group derived from purchase order line item. Material group and description populated in ACDOCA. |
| 2 | Purchase order details populated in ACDOCA but no material | Material group derived from purchase order line item. Material group and description populated in ACDOCA. |
| 3 | Purchase order details empty in ACDOCA but material populated | Material group derived from material master. Material group and description populated in ACDOCA. |
| 4 | Material group populated in ACDOCA | Material group must not be re-derived. |
| 5 | Document type included in set 'Z_BLART_MATKL' | Processing logic must be executed. |
| 6 | Document type not included in set 'Z_BLART_MATKL' | Processing logic can be skipped. |
This section is not applicable to this custom development.
| Package Name | Parent Package |
|---|---|
| Enhancement Type | Standard Definition Name | Custom Implementation Name | Design Rationale Reference |
|---|---|---|---|
| Object Type | Object Name | Purpose/High Level Logic | Design Rationale Reference |
|---|---|---|---|
This table is based on the Syensqo development standards document. It provides the naming conventions for authorization groups to associated with custom reports and tables to comply with security requirements.
ABAP | ZFI | ZMM | ZPS | ZCO | ZSD | ZBC | ZFI | ZCA |
|---|---|---|---|---|---|---|---|---|
| TABLES | ZFIT | ZMMT | ZPST | ZCOT | ZSDT | ZBCT | ZFIT | ZCAT |
Insert links and references to other documents which are relevant when trying to understand this decision and its implications. Other decisions are often impacted, so it's good to list them here with links. Attachments are also possible but dangerous as they are static documents and not updated by their authors.
