[S/4HANA Accruals Management] [Cloud version] Q3 – How can I influence the way Purchase Order Item converted into S/4HANA Accrual Engine? (SSCUI + Cloud BAdI)
Hello there! This series blogs about S/4HANA Cloud Accruals Management – Purchase Order Accruals, are created specially for you.
- Business users who would like to know the features and logic
- Functional Consultants who would like to know the features and logic , and in addition, design based on SSCUI capability
- Technical Consultants who would like to know the features and logic , and in addition, extend default logic by leverage the SAP Cloud BAdI capability
Requisite to understand this blog:
- [S/4HANA Accruals Management] [Cloud version] Q1- What kind of Purchase Order Item is Accruals relevant?
- [S/4HANA Accruals Management] [Cloud version] Q2 – How is the Purchase Order Item converted into S/4HANA Accrual Engine?
In case you still don’t have the answers yet for above question, you are welcomed to visit it before plunge into the sea.
Q3 – How can I influence the way Purchase Order Item converted into S/4HANA Accrual Engine? (SSCUI + Cloud BAdI)
Generally speaking, depending on what you want to influence, you could leverage on the SSCUI configuration or/and Cloud BADI.
1. Influence Accruals Conversion result by user configurations
I have explained the whole process in the last blog, so you must get familiar with the whole process. Now let’s get started for digging — see the highlighted green lines.
First and most important, you could use SSCUI 102505 (Define Accrual Item Types and Methods for MM Purchase Order Items) to influence the accruals conversion result.
This configuration is mainly for,
- Define for which purchase orders and purchase order items accruals will be posted
- (influence step ① Check Accruals Relevancy for the purchase order item)
- Which algorithm will be used to calculate accrual amount.
- (influence step ④ Determine Accruals Calculation Model)
You could change the default PO transfer variant or define your own variant(s), and then assign a set of company codes to the transfer variant.
a. ‘Default Variant PO Transfer’ means, default variant will be used if your company code is not assigned to any variants.
For example, you could create your own transfer variant and mark it as make as default. Then during ‘assign company code to transfer variant’, you could only list company code which doesn’t fit in this variant and assign to others. In below case, it means any company codes other than 1310 will use this ‘JIAL’ transfer variant for purchase order data transfer.
b. ‘Online Integration Active’ means, the creation or editing of purchase orders will directly create or update the corresponding accrual objects in the accrual engine.
If you uncheck the ‘online integration active’, then auto conversion from purchase orders to SAP S/4HANA Accruals Management are stopped. You could use the scheduling application ‘schedule accruals jobs’ to manually convert into accruals. This could be quite useful, if there are a lot of purchase order items closed within one period and you want to save some data storage.
- In addition, you could change settings for PO Transfer Variant SDEF or for your own variant in ‘define actual item type and method based on PO Item’ tab.
Here, you define for each accrual classification which accrual item types and accrual methods. How to calculate and post accrual amounts for a purchase order item.
- If the document type/item category/accrual classification is not listed in any of the transfer variant, then this purchase order item is still not relevant for accruals.
Following the settings in above example PO Variant <JIAL>, the purchase order item with document type ‘NB’ is not relevant for accruals even it meets all the criteria in ‘step ① Check Accruals Relevancy for the purchase order item’
- If the document type/item category/accrual classification is configured differently from the default transfer variant, then the algorithm to be used to calculate accrual amount might be different.
Following the settings in above example PO Variant <JIAL>, the accrual item for planned costs is assigned with ‘cost distribution’ accrual method SCSTPLN (instead of accrual method SPLN_DELSL as in default PO Variant SDEF), the total amount of the accrual sub object will be distributed using life start and end dates
2. Influence Accruals Conversion result by Cloud BAdIs
Further on, if you want to make further influence, you could check leverage existing Cloud BAdIs. All Cloud BAdIs are assigned to Enhancement Spot POAC_ACCR_OBJECT.
2.1 Influence ①Accruals Relevancy for the purchase order item
- Cloud BAdI: POAC_PO_SELECTION_FROM_DB [Change sel. criteria and fields for PO selection]
- If you want the system to create accrual objects for those ‘not relevant’ scenarios as well, you could call the method CHANGE_SELECTION_FROM_DB.
- If you have assigned an accrual item type for planned and actual costs in SSCUI – Define Accrual Item Types, the system will use those relationships.
- Cloud BAdI: POAC_LIFETIME_EVENT [Change the result of the lifetime event check]
- If you want to include those purchase order items which not approved yet as accruals relevant as well, call method CHANGE_LIFETIME_EVENT_CHECK
- Cloud BAdI: POAC_MOD_TRANSFER_VARIANT [Change the transfer variant for purchase order accruals]
- If you would like to exclude some accrual relevant purchase order items, you could call method CHANGE_TRANSFER_VARIANT
2.2 Influence ② Classification of Expense to be Accrued
- Cloud BAdI: POAC_PO_ITEM_CLASSIFICATION [Define Purchase Order Item Accrual Classifications]
- This BAdI is used to change the accrual classification for a PO item.
- If you created own classification values and want to specify how accruals will be calculated in a different way, you also need to enhance the system method determining the classification value for the purchase order item. To do this, please implement method CHANGE_ACCRUAL_CLASSIFICATION of Business Add-In (BAdI).
2.3 Influence ③ Expense Accrual Period
- Cloud BAdI: POAC_LIFETIME_DATES
- This BAdI is used to change the life start and end date of an accrual object.
- If you just want to the expense to be accrued calculated in a different period, we recommend method CHANGE_LIFETIME_DATES, which focuses on changing accrual classification and life start and end date.
2.4 Influence ④ Accruals Calculation Model
- Cloud BAdI: POAC_ACCRUAL_OBJECT_PARAMS
- This BAdI is used to change the items of an accrual object.
- Cloud BAdI: POAC_ACCRUAL_OBJECT_ITEMS
- This BAdI is used to change parameters of an accrual object.
- The Cloud BAdIs can be implemented using the Fiori app ‘Custom Fields and Logic’.
In this app, click the ‘customer logic’ tab and click ‘+’ to add a new implementation. In the popup dialog, enter ‘Purchase Order Accrual’ as business context and choose the BAdI which could help you. Let’s take an example for POAC_PO_SELECTION_FROM_DB [Change sel. criteria and fields for PO selection].
Back to review what you’ve learned so far.
if you want to understand the in deep architecture and logic, here is Advanced level.
Hope you enjoy this series for ‘S/4HANA Accruals Management – Purchase Order Accruals’ .
If any further topics you would like to know, kindly let your comments below. I will check and maybe prepare further blogs based on it.
Stay safe! Wish you all the best!