Symptom
You do business in multiple countries or regions with different tax laws. Hence you have several pricing procedures containing tax conditions that have been set up differently. However, such a setup requires these pricing procedures to be carefully aligned with each other, because it's not possible to account for different countries or regions requiring different tax setups in a single pricing procedure.
After you have implemented this solution, you must perform extensive tests to ensure that everything works as expected.
"Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental."
Environment
- Sales
- SAP S/4HANA Cloud Public Edition
Resolution
Reason and Prerequisites
For the described solution, a business role with the following business catalogs is required:
Business Catalog Name |
Business Catalog ID |
Extensibility - Custom Logic |
SAP_CORE_BC_EXT_BLE |
Extensibility - Transport Management - Export |
SAP_CORE_BC_SL_EXP |
Extensibility - Transport Management - Import |
SAP_CORE_BC_SL_IMP |
Sales - Configuration |
SAP_CA_BC_IC_LND_SD0_PC |
Basic knowledge about pricing and ABAP development is also required.
Solution
General Concept
The goal of this article is to describe a possible solution for realizing pricing procedures for multiple countries or regions in a tax-relevant business context. That is, how to combine tax condition types from different country or region-dependent pricing procedures into a single pricing procedure. Therefore, you need to ensure that the system only searches for and finds different conditions for the countries or regions that they are relevant for. Furthermore, you must consider the following:
- Some condition types are only valid for a subset of countries or regions, but already have additional logic assigned.
- Sometimes the same condition type has different settings for different countries (for example, formulas, account keys, and so on).
- Some countries require exclusion between tax conditions.
Since tax conditions are often flagged as mandatory, it's not an option to simply maintain only condition records for some countries. This would result in a pricing error. Instead, you must fully leverage the possibilities that pricing requirements offer by using your own custom logic. Doing so allows you to either activate or deactivate condition types that are normally mandatory.
In the following, we describe how custom logic for requirements must be implemented and configured accordingly. We demonstrate how to use your own custom requirements to control which condition types are valid according to the given country or region where the tax must be reported. Furthermore, we show you how to deal with the restricted validity of some condition types and how to overcome the issues resulting from the different settings across different pricing procedures by creating new condition types when it becomes necessary.
Setting Up a Pricing Procedure for Multiple Countries
As an example, this article describes how to combine the pricing procedures for Germany, Spain, and Portugal into a single custom pricing procedure. As you can see from Figure 1, the three procedures only differ by their tax calculation. These different tax calculations result from different condition types and their configuration, for example, regarding the ’Alt. Calc. Cndn Amnt’ field in the pricing procedure for Spain. Based on this, different solutions are possible. These solutions are detailed below.
Figure 1: Standard pricing procedure for Germany (top), Spain (middle) and Portugal (bottom)
Implementing Requirements to Restrict Tax Condition to Specific Countries or Regions
For more information about how to create and apply custom logic, see Creating Custom Logic.
For more information about requirements in the context of pricing, see Custom Logic: Requirement. Be aware that, in the present context, you must select ‘Requirement for Document Item’.
Using simplified examples based on the pricing procedures in Figure 1, we illustrate how to utilize requirements to control whether a condition type is considered for multiple countries or regions.
1. Restrict Validity of Condition to Specific Countries or Regions
With this step, you assign a requirement to a specific condition in the pricing procedure so that the condition is only valid for specific countries or regions. With the implementation of requirement 3000001 (see Coding 1), the system checks whether condition types are only considered for Germany. With this, you can activate or deactivate conditions with respect to specific countries.
Table 1: Example pricing procedure combining commonly used condition type Output Tax (DE) (TTX1)
Step |
Condition Type |
Description |
… |
Requirement |
… |
10 |
PPR0 |
Price |
2 |
||
100 |
Gross Amount |
||||
… |
|
|
|
|
|
850 |
TTX1 |
Output Tax (DE) |
3000001 |
||
900 |
Total Amount |
You can set up the requirement by using variable ‘doc_attributes-departurecountry’ in an IF- or CASE-statement and using variable ‘pricingrequirementsisfulfilled = abap_true’ for appropriate countries.
Coding 1: Example implementation of requirement 3000001
pricingrequirementisfulfilled = abap_false.
IF doc_attributes-departurecountry = 'DE'.
pricingrequirementisfulfilled = abap_true
ENDIF.
2. Apply Additional Logic to Country or Region-Specific Requirement
Equivalent to the example above (Table 1), but considering additional logic, the example implementation of requirement 3000001 (see Coding 2) calls a standard requirement.
As shown in Coding 2, you can use class ‘cl_prcg_doc_itm_requirement’ and method ‘is_fulfilled' to call requirements. With this, no extra implementation effort is necessary from your side.
Coding 2: Implementation of requirement 3000001 considering additional logic
pricingrequirementisfulfilled = abap_false.
IF doc_attributes-departurecountry = 'DE'.
pricingrequirementisfulfilled = cl_prcg_doc_itm_requirement=>get_instance( )->is_fulfilled( 10 ).
ENDIF.
3. Define Additional Country or Region-Specific Condition Type
In the configuration of the pricing pricing procedures (Germany vs. Spain, see Figure 1), for condition TTX1, there are different values assigned in the ‘Alt. Calc. Cndn. Amnt’ field. Therefore, you create an additional condition type for Spain: Output Tax (ES) (ZX1S), which can be configured appropriately (see Table 2). The configuration of condition type ZX1S is equal to condition type TTX1, but condition type TTX1 is set as the reference condition type (see Figure 2). You must implement requirements (3000001/3000002) to be valid only for the corresponding countries.
Table 2: Example pricing procedure including condition types of multiple countries or regions
Step |
Condition Type |
Description |
… |
Requirement |
Alt. Calc. Cndn Amnt |
10 |
PPR0 |
Price |
2 |
||
100 |
Gross Amount |
||||
… |
|
|
|
|
|
850 |
TTX1 |
Output Tax (DE) |
3000001 |
||
852 |
ZXS1 |
Output Tax (ES) |
|
3000002 |
38 |
900 |
Total Amount |
Figure 2: ZX1S – Condition Details
4. Apply Condition Exclusion to Specific Countries or Regions
Due to the combination of pricing procedures, (tax-relevant) condition types can be valid for multiple countries or regions. This also applies to defined condition exclusions.
In the standard procedure for Spain, a condition exclusion defines that TES2 excludes TTX1. With reference to the initial example (see Figure 1), this would also be true if TES1 is valid for Germany, too. To handle this, you must create a new condition type and configure the condition exclusion appropriately. Since we already created ZX1S, we can adjust the settings of the corresponding condition exclusion so that the condition exclusion can only be true for Spain.
The proposed approach of using new condition types is recommended to control condition exclusions differently for countries.
5. Combine Pricing Procedure for Countries DE/ES/PT
Table 3 shows a combined pricing procedure based on the procedure given in Figure 1 and considering insights from the scenarios above. You must implement requirements (3000001/3000002/3000003) to be only valid for the corresponding countries.
Table 3: Pricing procedure combining the above scenarios and an additional country
Step |
Condition Type |
Description |
… |
Requirement |
… |
10 |
PPR0 |
Price |
2 |
||
100 |
Gross Amount |
||||
… |
|
|
|
|
|
850 |
TTX1 |
Output Tax (DE) |
3000001 |
||
851 |
TES2 |
IGIC Output Tax (ES) |
|
3000002 |
|
852 |
ZXS1 |
Output Tax (ES) |
|
3000002 |
38 |
853 |
TES1 |
Equalization Tax (ES) |
|
3000002 |
|
860 |
PTX1 |
Output Tax (PT) |
|
3000003 |
|
900 |
Total Amount |
Keywords
cross-country pricing procedure, pricing procedure for multiple countries, country-dependent condition type, country-dependent requirement, country-dependent formula , KBA , SD-BF-PR , Pricing , SD-BF-PR-2CL , Pricing (Public Cloud) , How To