It is not known,
- how to influence the calculation of the condition amount or condition base value, or
- how to define a new requirement
in pricing by custom logic.
- SAP S/4HANA Cloud
With the Custom Fields and Logic app, you can implement logic for the following Business Add-Ins (BAdIs) under business context "Pricing" and assign a unique filter value to it. The following Cloud BAdIs are available:
- PRCG_DOC_CONDITION_AMOUNT : Define Alternative Calculation of Condition Amount in Document
- PRCG_DOC_ITEM_CONDITION_AMOUNT: Define Alternative Calculation of Condition Amount in Document Item
- PRCG_DOC_ITM_CNDN_BASE_VALUE: Define Alternative Calculation of Condition Base Value in Document Item
- PRICING_DOCUMENT_REQUIREMENT: Define Requirement in Pricing for Document
- PRCG_DOCUMENT_ITEM_REQUIREMENT: Define Requirement in Pricing for Document Item
Please see the documentation in the above BAdIs to understand their use. EKT materials are also attached to better understand the needed settings.
Here are some common questions and answers about the above BAdIs:
Q1. How to calculate the condition amount or condition base value of condition B based on a previous condition A?
A1. If you'd like to calculate the condition amount or condition base value of condition B based on a previous condition A, you can assign a subtotal to the pricing procedure step of condition A.
For example, the amount of the previous condition A can be stored in a field assigned to subtotal D (Copy value to XWORKD). The interface of the BAdI methods CHANGE_CONDITION_AMOUNT respectively CHANGE_CONDITION_BASE_VALUES receive this field as part of the importing parameter ITEM_AMOUNTS (field conditionamountbufferxworkd). So if condition type B follows in a pricing procedure step subsequent to condition A, the condition amount of condition A can be accessed via this subtotal field of the pricing procedure.
Q2. Which Cloud BAdI should be used for group conditions?
A2. The Cloud BAdI PRCG_DOC_CONDITION_AMOUNT should be used. Otherwise, the sales document may have incomplete log due to pricing error.
Q3. Can subtotal lines use a custom formula for the alternative calculation of the condition amount on header level?
A3. Using a formula for the alternative calculation of the condition amount on header level is not supported for subtotal lines.
If you need the subtotal also on header level as sum of the subtotals on the item level, you can create a condition type for that. This condition type does not need an access sequence.
Adding this condition type to the pricing procedure with the same setting as the subtotal line should solve the issue.
Product assistance for the following:
cloud BAdI, PRCG_DOC_CONDITION_AMOUNT, PRCG_DOC_ITM_CNDN_BASE_VALUE, PRCG_DOC_ITEM_CONDITION_AMOUNT, CHANGE_CONDITION_AMOUNT, VOFM successor , KBA , SD-BF-PR , Pricing , How To