High- Level Specification
| Parameter | Value |
|---|---|
| Application System | S/4Hana ROW, S/4Hana China, S/4Hana CUI |
| Business Process Reference | 03.04.03.01. Create Purchase Orders |
Functional Overview
The functional design of the enhancements describes the scenario(s) where enhancements to existing SAP programs are required.
This document outlines the functional requirements for the direct asset procurement process, which focuses on automating the asset creation process within S/4HANA for direct asset purchases originating from Guided Buying.
Scope and Objectives
Scope
The scope of this enhancement is to implement a Business Add-In (BADI) in S/4HANA that automates the following functions upon receiving a Purchase Order (PO) from Ariba Guided Buying:
Automatic Asset Creation: For each PO line item with the custom account assignment 'Z', the BADI will automatically create a new asset in S/4HANA.
Derivation of Asset Data: The BADI will derive key asset master data, such as the cost center (from the WBS element on the PO line) and the asset class (from a pre-defined mapping file).
Line Item Splitting: If the PO line item has a quantity greater than one, the BADI will automatically create line item splits in S/4HANA, with each split linked to a uniquely created asset.
Account Assignment Update: The BADI will automatically change the account assignment on the PO line item from 'Z' to the standard SAP asset account assignment 'A'.
Handling PO Changes: The enhancement will manage changes to the PO quantity:
Increase: It will create new assets and line item splits for the increased quantity.
Decrease: It will cancel the corresponding assets and remove their line item splits.
Handling PO Cancellation: The BADI will automatically cancel all assets that were created for a PO if that PO is subsequently cancelled.
Objectives
The key objectives of implementing this enhancement are:
Automation: Eliminate the need for manual asset creation in S/4HANA for direct asset purchases, reducing a labor-intensive and error-prone process.
Data Integrity: Ensure that every asset is correctly linked to its corresponding PO, providing a clear audit trail from procurement through to asset management.
Efficiency: Streamline the end-to-end procurement process by automatically converting a requisition from Ariba Guided Buying into a complete and correct asset record in S/4HANA.
Compliance: Enforce the correct application of accounting rules (capitalization vs. expense) based on pre-defined thresholds without requiring manual user intervention.
Gap Addressed (Compared to SAP Standard)
The core gap addressed by this enhancement is that SAP's standard functionality does not automatically create individual fixed assets upon the creation of a purchase order.
In a standard SAP S/4HANA process, a purchase order with an asset account assignment will lead to a single asset record being created or updated upon Goods Receipt (MIGO). If a PO line item is for a quantity of more than one, the total value is simply posted to that single asset record.
This enhancement bridges this gap by introducing automated asset creation at the PO stage for each individual item, a capability that is not part of SAP's out-of-the-box functionality. It also adds the sophisticated logic to manage quantity changes and PO cancellations, which standard SAP does not handle automatically in this manner. By leveraging a custom account assignment ('Z') and a BADI, the solution provides the necessary automation and granularity to meet the business's specific requirements for tracking individual assets from the point of procurement.
Step | Description | System | Comment |
|---|---|---|---|
| 1 | User Creates PR in Guided Buying | Guided Buying | A user initiates a Purchase Requisition and adds the required items. |
| 2 | Automatic Account Assignment | Guided Buying | Based on the item's commodity and amount, the system defaults the account assignment category for each line item. |
| 3 | User Enters WBS Element | Guided Buying | If the item is for capitalization (e.g., a laptop > €1000), the account assignment defaults to 'Z', and the user must select a pre-approved WBS element. |
| 4 | PR Approval | Guided Buying | The requisition is submitted for approval in Guided Buying or the Central Mailbox. |
| 5 | PO Generation & Transmission | Guided Buying | Once approved, Ariba automatically generates a PO and sends it to S/4HANA. |
| 6 | S/4HANA Asset Creation | S/4HANA | For PO line items with account assignment 'Z', an S/4HANA enhancement (BADI) is triggered to automatically create assets. |
| 7 | Line Item Splits & Linking | S/4HANA | If an item has a quantity greater than one, line item splits are created in S/4HANA, and each new asset is linked to an individual split. The account assignment is changed to 'A'. |
| 8 | PO Change Handling | S/4HANA | If the PO quantity is increased, new assets and splits are created. If the quantity is decreased, existing assets are cancelled and their splits are removed. |
| 9 | PO Cancellation | S/4HANA | If the PO is cancelled, all assets previously created for that PO are cancelled as well. |
| 10 | S/4HANA PO Number Sent to Ariba | S/4HANA | The S/4HANA PO number is transmitted back to Ariba Guided Buying for reference. |
| 11 | PO Dispatch to Supplier | S/4HANA | The final S/4HANA PO is sent to the supplier. |
Assumptions
User Knowledge: Users are assumed to have the necessary knowledge to select the correct WBS element for direct asset purchases.
Data Integrity: It is assumed that the CEME file in Ariba Guided Buying and the material group-to-asset class mapping file will be accurately maintained and provided by the R2R team (Alex Bechter).
System Configuration: The necessary WBS elements are correctly flagged as "Direct Asset" in Ariba Guided Buying .
BADI Functionality: The S/4HANA enhancement (BADI) will function as designed, handling asset creation, PO changes, and cancellations without errors.
Dependencies
Ariba Configuration:
Correct setup of the CEME file.
Extension of the WBS object in Ariba Buying to include 'Direct Asset flag' and 'Capex/Opex Indicator'.
Interface from S/4HANA to Ariba Buying must support these new fields.
S/4HANA Development:
Implementation of the BADI enhancement to support automatic asset creation, PO changes, and PO cancellations.
Development of the mapping logic for material group to asset class.
Data from R2R Team:
Provision of the capitalization thresholds.
Provision of the material group-to-asset class mapping file.
Security, Integrity and Controls
Security: Users can only select pre-approved WBS elements that are specifically flagged for direct asset purchases.
Integrity: The system ensures data integrity by automatically creating assets and linking them directly to the S/4HANA PO. All changes (quantity increases/decreases) and cancellations are handled programmatically to prevent data inconsistencies.
Controls: The use of an automated BADI ensures that asset creation is standardized and follows the defined business logic, reducing manual errors. The S/4HANA PO number being sent back to Ariba provides an audit trail.
Configuration Requirements
Ariba:
Update CEME file with capitalization thresholds and relevant commodity codes.
Configure WBS object to allow filtering of selections to only those flagged as "Direct Asset."
Extend the WBS object with two new fields: Direct Asset flag and Capex/Opex Indicator.
S/4HANA:
Implement the BADI enhancement to manage the automatic asset creation process upon PO ceation from Ariba Guided Buying.
Configure the material group to asset class mapping.
Language Requirements
This solution will be implemented in English, consistent with the global language standard. No specific language-related requirements are noted.
Special Requirements
Automated Asset Creation: The core functionality relies on a custom S/4HANA BADI to automatically create a new asset for each capitalized line item quantity. This is a critical technical requirement.
PO Change Management: The solution must handle scenarios where the PO quantity is increased or decreased, requiring the creation of new assets or the cancellation of existing ones, respectively.
PO Cancellation: A process must be in place to automatically cancel all assets created for a PO if the PO itself is cancelled.
WBS Integration: The solution must be capable of receiving and processing WBS elements from Ariba and using them to derive the cost center for asset creation.
Design Rationale
Functional Requirements
Please refer to the Scope and Objectives section
Proposed Technology to Use
The proposed technology for the S/4HANA enhancement will be an SAP Business Add-In (BADI).
The BADI will be implemented within the inbound processing of Purchase Orders (POs) from Ariba Guided Buying.
Based on standard SAP practice and similar implementations, a strong candidate for this BADI would be one that is called after the data has been validated but before the PO is saved. A likely candidate is within the BADI_PO_CREATION or a related BADI that allows for manipulation of purchase order data and custom logic before the final database commit. The enhancement will need to be configured to specifically check for the custom account assignment category 'Z' that is sent from Ariba Guide Buying.
The enhancement will perform the following actions:
Read PO data: The BADI will access the inbound PO data, specifically the line item details, including the quantity, material group, and WBS element.
Trigger Asset Creation: For each line item with account assignment 'Z', the BADI will call the necessary SAP function modules (e.g.,
BAPI_FIXEDASSET_CREATE) to create a new asset.Derive Asset Details: The BADI will use the material group to look up the correct asset class from the provided mapping table and derive the cost center from the WBS element.
Update PO: After successful asset creation, the BADI will modify the PO line item, splitting it if necessary and changing the account assignment from 'Z' to 'A' (Asset). It will also link the newly created asset number to the PO line item for traceability.
Handle Changes and Cancellations: Additional logic will be built into the BADI to handle scenarios where the PO is changed or cancelled, ensuring that assets are either created, removed, or cancelled as required.
Data Source Considerations
The proposed S/4HANA enhancement for direct asset procurement relies on key data sources to function correctly. This section outlines where the necessary data originates and how it's used in the process.
1. Ariba Guided Buying (Source System)
Purchase Requisition (PR) Data: The primary source of all transactional data. This includes details like item descriptions, quantities, and most importantly, the account assignment category ('Z' or 'K') and the WBS element selected by the user. This data is transmitted to S/4HANA via the standard Ariba CIG (Cloud Integration Gateway) interface.
WBS Elements: Ariba's WBS object will be extended with two new fields: Direct Asset flag and Capex/Opex Indicator. These flags will originate from S/4HANA and be transmitted to Ariba, where they will be used to filter the list of available WBS elements for direct asset purchases.
2. S/4HANA (Receiving System)
S/4HANA PO Number: After the PO is created in S/4HANA, the system will generate a unique PO number. This number is then sent back to Ariba to serve as a reference for the user.
Material Master Data: The material group from the incoming PO line item will be used as a key field for the asset class determination.
3. External Data Sources (Configuration & Mapping)
CEME File: This file, configured in Ariba, is crucial for the automatic account assignment. It contains the thresholds and commodity mappings that determine whether an item should be capitalized ('Z') or expensed ('K').
Material Group/Asset Class Mapping File: This mapping table, provided by the R2R team (Alex Bechter), will be stored in a custom S/4HANA table. The BADI will read this table to determine the correct asset class based on the material group of the PO line item, ensuring accurate asset categorization.
WBS Element Flags: The "Direct Asset" and "Capex/Opex" flags on WBS elements are maintained in S/4HANA and need to be synchronized with Ariba to control user selection options.
In summary, the process relies on a robust flow of data from Ariba to S/4HANA, supplemented by key configuration data managed in both systems and an external mapping file provided by the business. This ensures that the automated asset creation process is both accurate and aligned with business rules.
Data Validation Considerations
The following validation checks will be implemented:
WBS Element Validation:
In Ariba: The system must ensure that the WBS element selected by the user for a capitalized item is a valid, active, and pre-approved WBS element specifically flagged for direct asset purchases.
In S/4HANA: Upon receipt of the Purchase Order (PO) from Ariba, the S/4HANA enhancement (BADI) will perform a final validation to confirm that the WBS element is still valid and open for postings. If the WBS element is invalid, locked, or no longer exists, the PO creation will fail, and a clear error message will be triggered and sent back to Ariba.
Material Group and Asset Class Mapping:
The system will validate that the material group provided on the PO line item has a corresponding entry in the "material group / asset class" mapping table. If a material group for a capitalized item lacks a corresponding asset class, the asset creation process will be blocked, and an error message will be generated. This ensures that every asset is created with the correct classification from a financial perspective.
Quantity and Asset Creation Logic:
The BADI must validate that the logic for creating multiple assets based on the line item quantity is executed correctly. It will perform a check to ensure that the number of assets created equals the quantity specified on the PO line item.
In the case of a PO change or cancellation, the validation will confirm that the correct number of assets are either created, cancelled, or unlinked from the PO to maintain a 1:1 relationship between the physical asset and its representation in S/4HANA.
Cost Center Derivation:
The system will validate that the cost center derived from the WBS element is a valid and active cost center within the S/4HANA system. If the derived cost center is invalid, the asset creation process will fail. This prevents assets from being created with incorrect or inactive master data.
Custom Tables
To support the S/4HANA enhancement for automatic asset creation, one custom configuration table will be required. This table will be maintained in S/4HANA and read by the enhancement logic to ensure proper data mapping and derivation.
This table will store the mapping between a Material Group (MATKL) and the corresponding Asset Class (ANLKL). The R2R team will be responsible for providing and maintaining this data. When the custom BADI is triggered upon PO creation, it will use the material group from the PO line item to query this table and retrieve the correct asset class. This mapping is crucial for the automated asset creation and ensures that assets are classified consistently and accurately based on their procurement category.
Master Data
Please refer to Custom Tables.
| Field | Description | Data Type/Length | Validation rule/ Value Help |
|---|---|---|---|
Configuration Table
| Field | Description | Data Type/Length | Validation rule/ Value Help |
|---|---|---|---|
Selection Screen Enhancement
Since this functionality is automated and triggered by an inbound interface from Ariba Guided Buying, there is no user-facing selection screen.
| Field Name | Description | Select: | Data Type/Length | Default Value/ Validation rule/ Value Help | Selection Logic |
|---|---|---|---|---|---|
Processing Logic
The core logic for this process will be implemented within an S/4HANA BADI that is triggered during the inbound creation or change of a Purchase Order (PO) from Ariba. This logic will execute after the standard PO data has been received and validated. The BADI will perform a series of checks and actions based on the PO line item details.
Step-by-Step Logic
Read Inbound PO Data: The BADI will first read the incoming PO header and line item data.
Iterate Through Line Items: The program will loop through each line item of the PO to check for the custom account assignment.
Identify Capitalization Items: For each line item, the system will check if the account assignment category is "Z".
Process PO Creation:
Validate WBS Element: The system will verify that a valid WBS element is present on the line item.
Derive Asset Class: Using the material group from the PO line item, the system will perform a lookup in the pre-configured mapping table (provided by the R2R team) to determine the correct asset class.
Derive Cost Center: The cost center required for asset creation will be derived from the WBS element provided on the line item.
Create Assets: A standard SAP BAPI will be called to create a new asset for each quantity specified on the line item.
Update PO Line Item: For each newly created asset, the original line item will be split, and the new asset number will be populated. The account assignment will be changed from "Z" to "A". The WBS element will be retained on the line item.
Logic for PO Changes and Cancellations
The BADI will also contain logic to handle changes to or the cancellation of an existing PO, which is critical for data integrity.
PO Quantity Increase:
The BADI will compare the new PO quantity with the original quantity.
For the increased quantity, new assets will be created following the same process as in PO creation.
New line item splits will be created to link the new assets.
PO Quantity Decrease:
The BADI will compare the new PO quantity with the original.
It will identify the assets associated with the removed quantity.
The system will then call a BAPI or function module to cancel these assets and their corresponding line item splits. The asset master record will be flagged as "cancelled" in S/4HANA.
PO Cancellation:
If the PO is cancelled entirely, the BADI will identify all assets linked to that PO.
It will then perform a mass cancellation of all related assets, ensuring no active, orphaned asset records remain in the system.
Expected Outcomes in Different Scenarios
Successful Creation: A fully approved PR in Ariba Guided Buying with account assignment "Z" will result in a PO in S/4HANA, the automatic creation of one or more fixed assets, and the PO account assignment category being changed to "A."
Failed Asset Creation: If the BAPI for asset creation fails (e.g., due to missing configuration), the BADI will prevent the PO from being saved and return an error message to the user in Ariba Guided Buying, ensuring the PO is not finalized without a valid asset.
PO Quantity Change: The system will dynamically adjust the number of linked assets and line item splits to match the new PO quantity.
PO Cancellation: The system will automatically cancel all associated assets, maintaining a clear audit trail.
Volumetrics
Performance Considerations
Error Handling
Testing
How to Test
Test Conditions and Expected Results
| ID | Condition | Expected Result |
|---|---|---|
Test Considerations/Dependencies
Other Information
Development Details
Package
| Package Name | Parent Package |
|---|---|
Enhancement Implementation
| Enhancement Type | Standard Definition Name | Custom Implementation Name | Design Rationale Reference |
|---|---|---|---|
Other Development Objects
| Object Type | Object Name | Purpose/High Level Logic | Design Rationale Reference |
|---|---|---|---|
Appendix
Custom Authorization Group Naming Convention
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 |