Performing Complex Discounting

Objective

After completing this lesson, you will be able to understand complex discounting in master agreement

Complex Discounting

Lesson Overview

In master agreements, you can make agreements regarding discounts (discount agreements). These discount agreements specify over-arching rules for calculating and distributing discounts for the individual contracts (provider contracts) that are signed with reference to a master agreement.

Business Example

The example includes the following three discounts:

  1. Print Service Corporation grants its customer headquarter a monthly discount of 10% on telephone calls, if the usage exceeds the amount of 100 Euro per contract.

  2. If the CPU usage exceeds 50 units per contract partner, a discount of 2 Euro is given.

  3. Additionally a quarterly scale discount (all 3 months) is given:

    If the total is greater than 200 Euro, then there is a 3% discount on usage.

    If the total is greater than 500 Euro, then there is a 5% discount on usage.

    The business examples are implemented in the training system with master agreement 5000140.

    You assign discounts and charges in master agreements (with business customers) at the level of the provider contract or at the level of discount agreements.

    The system determines the discounts and charges during the billing of consumption based on specifications entered in their master data. As part of this process, the system creates base items with the relevant discount or charge information. The system stores the base items similar to the way in which billable items are stored.

    The system calculates and processes discounts and charges during the processing of base items in a separate billing process. The billing document stores the results of the calculation.

Complex Discounting

Discount Agreements in Master Agreements

In master agreements, you can make agreements regarding discounts (discount agreements). These discount agreements specify over-arching rules for calculating and distributing discounts for the individual contracts (provider contracts) that are signed with reference to a master agreement.

You create discount agreements for master agreements in the ERP system and assign a discount/charge key to the discount agreement. The discount/charge key specifies the calculation rules. The discount/charge key is valid within the entered time frame. You specify the level, at which the calculation is made, in the discount agreement by entering the calculation level. The calculation level controls how the base amounts for this discount are determined: for each contract, for each contract partner, or for all partners and contracts that participate in the discount agreement.

If a discount or charge is not to be granted to (charged to) the invoice recipients, you can also define the distribution of the discount or charge in the discount agreement. In that case, you enter a contract account and a business partner in the discount agreement that should receive the discount or that should be charged. If you do not enter an alternative recipient, the system posts the discount or charge according to where it originated. The system distributes the discount mathematically to the items where it originated and proportionately to the business partners and contract accounts belonging to the items.

To be able to calculate discounts and charges that are entered in the agreements of a master agreement, you have to enter a master contract account in the master agreement. This entry makes it possible for the system to view the consumption of individual contracts together as the basis for a discount or charge.

Determining the Discount/Charge Key

You assign discount/charge keys to master agreements using discount agreements. The system determines the discount/charge keys during billing of consumption for the individual contracts belonging to a master agreement. The following prerequisites must be met:

The billable items reference provider contract items and the master agreement.

To be considered for a discount, billable items have to be within a defined validity area of the discount agreement.

That means that the billable items must fulfill the conditions that relate to attributes in the item or that can be derived from the attributes of the item.

The date the billable item was created has to be within the validity area of the discount agreement.

If a billable item qualifies for a discount agreement, then billing applies the discount/charge key entered in the discount agreement and the billable item is processed by the filter defined for the discount/charge key (see Determining Base Information for Calculating Discounts and Charges).

Creating Base Items

Billing creates the base items as billable items after the determination of the discounts and charges. These items contain, in the case of discounts determined using a master agreement, additional information for the calculation of discounts or charges. The billable item classes that you use for storing these base items have to contain the interface component DISC_AGRMT (discount agreement) along with the base fields for calculating the discount. This interface component contains the fields of structure FKKBIX_ICBIT_IT_DISC_AGRMT.

The base item stores the following:

  • Master agreement

  • Discount agreement (category D)

  • Business partner of provider contract that references the master agreement

  • Contract account of provider contract that references the master agreement

  • Business partner of the master agreement

  • Master contract account of master agreement

Calculating Discounts/Charges

To process base items for a master agreement together, you have to enter the master contract account as a selection criteria in the billing process when you calculate the discount for a master agreement. During this calculation, the system also applies the calculation level entered in the discount agreements as well as the calculation rules of the discount/charge key.

Discount/Charge Calculation Document

The system creates a discount/charge calculation document during the billing of base items for a master agreement. One document is created for each discount agreement. This document is intended solely to document the calculation of the discount or charge, and it references the discount log.

The system does not create an invoicing order.

The billing document is designated as a technical document and is blocked to invoicing. The discount agreement is entered in the billing document header.

During the creation of the discount calculation document, the system distributes discounts (and charges) to those who should receive them. Base items are created that are taken into account when the recipient is billed.

The base items contain the following information:

  • Source transaction of the base item.

    The source transaction of the base item is the discount calculation document, with which the base item was created (number of the billing document in field SRCTAID).

  • Source transaction type defaulted by the system (value DISCI).

  • Calculated amount of the discount or charge.

  • Class and subprocess.

    The class and subprocess are inherited from the billed base items in the discount/charge calculation document, and therefore they can be processed with the same billing process.

The base items can be processed with same billing process that created the discount/charge document. The base items can be billed immediately after the discount/charge calculation. You do not have to configure and start an additional billing process.

The following figures show the billing processes and data storage for discounts and charges for scenarios that use only provider contracts and those that also use master agreements.

Scenario with Provider Contract

Scenario with Master Agreement

Process steps of discounting and charging of billable Items:

  1. Configuration of discount key and assignment to master agreement or provider contract.

  2. In standard billing process determination of base information and creation of base bits.

  3. Calculation of discounts and charges in discount billing process.

  4. Create discount/charges calculation documents.

  5. Invoicing of discount billing documents with usage billing documents.

Flexibility of new discount and charge functionality:

  • Discount determination using discount agreement when usage BITs are billed (time independent processes possible, for example, quarterly sums for discount base amount).

  • Discount calculation on specified calculation level (provider contract item, provider contract, contract partner, agreement level).

  • Discount distribution (assignment to source of discount or assignment to headquarter).

The benefit of this solution is that the same architecture is used in B2C and B2B.

The reuse of discount key and discount definition, calculation modules on provider contract and master agreement level.

From standard billing and invoicing processes document linkage and traceability is used.

A Discount or Charge Agreement …

  • Specify overarching rules for calculating and distributing discounts for the individual contracts (provider contracts) that are signed with reference to a master agreement.
  • Define Rules and Areas of Validity.
  • Can be posted to an alternative Business Partner, otherwise it’s distributed mathematically to the items where it originated.
  • Can be assigned to different levels: Provider Contract, Contract Partner, Agreement Level.
  • Has optionally a different Billing Cycle than the source Bits. For example, a yearly discount, or a quarterly discount.

Discount Agreement

Depending on business partners, products and further selections it can be decided what kind of discounts will be applied to the billable items.

For a more convenient maintenance of the agreements area of validity, it is possible to define business partner and product groups. By those groups the single records are bundled together and can be assigned to an agreement more easily (instead of entering each entry separately, which can become quite cumbersome).

The agreements are built up out of a rules part and an area of validity part. The rules part is specific for each type of agreement. It tells what has to be done when a billable qualifies for an agreement (for example, the rules part of an invoice agreement tells who the invoice recipient is). The area of validity specifies the conditions under which the rules are applied. The conditions can be set up based on business partners, products and further selections based on filters and function modules.

Alternative Business Partner

The alternative business partner for posting of discount is the business partner, to which the credit memo for the discount from the current agreement is posted.

If no alternative business partner is given than, the system credits the discount according to where it originated. The system distributes the discount mathematically to the items where it originated and proportionately to the business partners and contract accounts belonging to the items.

Graphic reflects master agreement 5000140 in training system.

The configuration/definition of discount key is done in customizing

Chose Contract Accounts Receivable and PayableConvergent InvoicingBillingAdditional FunctionsDiscounts and Charges on Billable ItemsDefine Discount/Charge Key.

You do this as follows:

  1. Characteristics of the key:

    These include its use, the calculation currency, the calculation cycle, and the processing level.

    Billing analyzes the base definition for calculation when determining the discount/charge key.

  2. Calculation:

    In order to configure the calculation, define a calculation base and a calculation rule. The calculation base results from the billable items as follows:

    • All billable items.

    • Only those billable items than fulfill certain filter criteria.

      You can either define filters in customizing or create your own installation-specific filter module that filters billable items.

      Billing analyzes the base definition for the calculation when determining the discount/charge key.

      The system always applies charges and discounts to the base amount of the base items that qualify according to the base definition.

      You can use the following rule types for the calculation rule:

      • Standard: You define a simple discount or charge as an absolute amount or a percentage.

      • Scale: You define a scale discount or charge. You can freely define the scale basis from which the system determines the scale discount or charge.

      • Block: You define a block discount or charge. You can freely define the block basis from which the system determines the block discount or charge.

      • Installation-Specific Function Module: You enter your own installation-specific function module that calculates the discount or charge.

  3. Condition:

    Define the condition (optional).

    You define conditions with a basis and a rule. You define the condition basis like the calculation basis. The system applies the condition rule to the condition basis. The rule specifies under which conditions a discount is granted or a charge made. You can use the following rule types:

    • Standard: You apply a simple comparison rule to the condition basis. You can choose any condition basis.

    • BRFplus: You create the rule as a BRFplus function.

    • Installation-Specific Function Module: You create your own installation-specific function module for the rule.

You can create shared versions for the calculation and the condition.

In change mode, choose Versioning on the Calculation or Condition tab, and decide which reference date the version relates to.

End of the note.

Definition of discount key is done in customizing. Discount keys have versions that are time dependent. If customizing is not sufficient, After Discount/Charge Calculation is available. In this event you can connect your discount module for the customer specific calculation.

A Discount Base Item…..

  • Is created during billing of usage BITs.
  • If the contract of the usage bit has a valid discount key assigned and the BIT passes the filter.
  • Is linked to billing document via Source Transaction ID which is Billing Document Number.
  • Has a base amount but no discount amount so fare.
  • Is collected from different billing process in a separate Billable Item Class.
  • Is the base for discounting.
  • Gets the calculated discount in Discount Billing Process.

Defining discount base items:

Base items contain the information necessary for calculating discounts and charges. The system creates base items automatically as billable items during the billing of consumption. The billable item class that you use for creating the billable items has to contain the interface component DISC_BASIC (Basic Data for Discount/Charge Calculation). This interface component contains the fields of the structure FKKBIX_ICBIT_IT_DISC_BASICS that can hold the information relevant for discounts and charges.

Linking discount/charge keys with the base items:

The technical characteristics of a discount/charge key define which billable item class, which subprocess and which billable item type the base items contain when they are created.

If billable items of the same type qualify for the calculation or a condition or both, the system groups these items together into a base item. In this context of the same type means that the billable items relate to the same contract and have the same discount/charge key.

During the creation of base items, the system also takes over additional information relevant to the discount or charge from the consumption information. This information can prevent the system from summarizing billable items in a base item. It is important to note that the account assignment fields adopted from the billable items (structure FKKBIX_DISC_ACC_ASS_ORIG_BIT) can lead to the base items being split.

You can also specify your own main transactions and sub-transactions for the base items (see Configuration of Discounts and Charges). In that case, the original transactions are not inherited from the billable items and therefore, do not constitute a split criterion.

The basic fields, with which you configure the calculation of discounts and charges and define conditions, can have different currencies and units in the billable items that are delivered. The system groups these basic fields together based on the currency and in the units entered. That means that the currencies and units also act as split criteria when the system creates the base items.

The base items contain the following information:

  • Master agreement

  • Discount agreement (category D)

  • Business partner of provider contract that references the master agreement

  • Contract account of provider contract that references the master agreement

  • Business partner of the master agreement

  • Master contract account of master agreement

  • The discount/charge key in the DISCKEY field, and the version in the DISCKEY_VERSNO field

Even if you did not define any versions, the DISCKEY_VERSNO field contains the value 1. If versions are defined, the field contains the version number that the system determines based on the selected reference date. If the reference date is the baseline date for billing, the system creates all base items for the one version that is valid on the baseline date for billing. If the reference date is the baseline date of the billable item, the system creates the base items according to the versions determined and in relation to the baseline date of the billable items.

  • The information if the base item is relevant for the discount calculation or for the discount condition, or both (recognizable by the values in the DISC_CALC_REL and DISC_COND_REL fields).

  • The base amount in the DISC_BASE_AMOUNT field of the discount base item.

The amount results from the system adding the amounts of the billable items that have qualified for the discount calculation.

The source transaction of the base item in the billing document, with which the base item was created.

The SRCTAID field contains the number of the billing document.

The source transaction type

The system provides a default for the source transaction type for base items of discounts and charges. The SCRTATYPE field contains the value DISCB.

In the BILL_FIRST field, the earliest point in time at which a base item can be processed

The system determines the date using the cycle in the configuration of the discount or charge.

No amount in the BIT_AMOUNT field.

The system determines the amount when it calculates the discount or charge.

Training environment: Discount BITs are billed with a separate billing process YDIS. The result is a discount billing document.

The system calculates discounts and charges during processing of base items. The base items are processed in billing as part of a billing process that selects and bills the base items. The billing process is guided by your customizing settings for the base items. In customizing, you specify the billable item class, the subprocess, and the type of billable item used for creating the base items.

Billing recognizes base items automatically by their source transaction type, DISCB, and calculates discounts and charges only for these items. This calculation is made before billing creates the billing document items. During the calculation, billing first evaluates the condition rule and then applies the calculation rule. When evaluating the condition rule, billing gets the condition-relevant base items (DISC_COND_REL = X), aggregates them, and compares them with the condition defined in the key. If the condition is met, billing then executes the calculation rule. For this purpose, it gets the calculation-relevant base items (DISC_CALC_REL = X) and aggregates them. The calculation of the discount or charges is always made using the base amount (DISC_BASE_AMT). To calculate a scale or block discount, you can also use another attribute (such as DISC_BIT_NUMBER, BIT_QUANTITY or your own customer-specific field).

Billing returns the result of the calculation distributed proportionally to the calculation-relevant base items (field BIT_AMOUNT). Following that, the system treats base items like billable items. This process creates a billing document with document items that contain the discounts and charges, the discount/charge calculation document.

If discount base items reaches the billing, the billing process recognizes the base items because of the SRCTATYPE=DISCB and routes these items through the discount calculation module FKK_BIX_DISC_CALC_VTREF. Here, the calculation and condition rule of the discount key is applied and a calculated discount amount is written into the BIT_AMOUNT field of the base items.

Afterwards, the usual billing process is continued, which results in a billing document that reflects the discount.

Discount key is stored within the billing document item.

The discount protocol is stored with the billing document as an additional item (tables DFKKINVBILL_A and DFKKINVBILL_AD).

The last step is the invoicing together with usage billing documents.

The invoicing document includes a protocol, how the discounts were calculated.

Discount calculation for a discount agreement:

The system creates a discount/charge calculation document during the billing of base items for a master agreement. One document is created for each discount agreement. This document is intended solely to document the calculation of the discount or charge, and it references the discount log.

The system does not create an invoicing order.

The billing document is designated as a technical document and is blocked to invoicing. The discount agreement is entered in the billing document header.

During the creation of the discount calculation document, the system distributes discounts (and charges) to those who should receive them. Base items are created that are taken into account when the recipient is billed.

The base items can be processed with same billing process that created the discount/charge document. The base items can be billed immediately after the discount/charge calculation. You do not have to configure and start an additional billing process.

The following figures show the billing processes and data storage for discounts and charges for scenarios that use only provider contracts and those that also use master agreements.

Enhance Master Agreement with Discount Agreement

Business Example

Print Service Corporation has decided to give business customers headquarters (B2B Headquarter ##) a special volume discount for CPU usage, RAM usage, MRC recurring rate and bandwidth usage. Headquarter gets a discount of 10% on all usages and recurring fees, if subsidiaries total of all contracts according voice calls exceeds EUR100 per month. Headquarter receives the discount amount for all related contracts.

Hint

Before you do this exercise, finalize the exercise: Analyse Master Agreement Related Provider Contracts

Exercise Options

To perform this exercise, you have two options:

  1. Watch the simulation: to start the simulation, choose Start Exercise in the figure below.
  2. Perform the steps, as described below.

Task 1: Enhance Master Agreement with Discount Agreement

Your master agreement (result in task 1) for your business partner B2B Headquarter ## was already created by sales agent of Print Service Corporation in CRM system.

Headquarter should get a discount of 10% on all usage and recurring fees, if subsidiaries total of all contracts exceeds EUR100 per month. Headquarter receives the discount amount for all related contracts.

Therefore, enhance in ERP convergent invoicing the master agreement xxx with discount agreement usage and recurring charges.

Steps

  1. Assign contract account that is used to assign calculated discounts for a master agreement. Use the existing default contract account of the business partner that is assigned to the master agreement. And set all contract partners and all products to status completed.

    1. Creation of invoice agreement is done in ERP by maintaining the master agreement using transaction.

      In the SAP Fiori launchpad search section Master Data: Contracts & Agreements and choose the tile Display Master Agreement (Corresponding back-end transaction FP_MA2). Within the app choose Change in the menu.

      Assign master contract account that is used to assign calculated discounts for a master agreement. Usage and recurring over EUR100 / 10%. On the Master Agreement Change: General Data screen, make the following entries:

      Example for User 6:

      Master Agreement5000146
      Business Partner1100000070
      Master Contract Account110000000070

      Save your entries by choosing Master AgreementSave.

      You will be asked, if you want to set all contract partners to status completed. Choose the Yes button. You will be asked, if you want to set all products to status completed. Choose the Yes button.

      Hint

      Default contract account exists, see table of solution of task 1. If no contract account exists, create a contract account for the master agreement business partner using transaction CAA1. Use contract account TEMPLATECA as Ref. Account.

  2. Create a new discount agreement with the name UCRC_DIS10 that calculates 10 %.

    1. Create discount agreement on the Master Agreement Change: General Data screen and choose the Agreements tab. In Overview of Agreements section, choose Create AgreementDiscounts (first button from left side). On the Create Discount Agreement pop-up screen, make the following entries:

      AgreementUCRC_DIS10
      Name10% Discount, if usage and recurring over EUR 100

      Choose Continue (Enter).

  3. Define agreement rules that calculate the discount on master agreement level.

    Hint

    Discount key YNHT_2 calculates 10%.

    1. Define agreement rules:

      In the Agreement Rules: Discounts selection, as Disc./Chg. Key enter YNHT_2.

      Specify if the calculation is made for the entire agreement, for each contract partner, or for each contract in the Calculation field level. Leave calculation level blank (means aggregation on master agreement level).

      In the Basic Data and Validity Area section, make the following entries:

      Items from (date starting from which items can be assigned)01/01/2017
      Items to (date up to which items can be assigned)31/12/9999

      Hint

      You do not need to explicitly enter the business partner/contract account number of your headquarter as Alt. Recipient because the default rule is if no Alt. Recipient is set, the discount is granted to the one, that is paying. So in this particular case, headquarter would not get the discount, only if you assign it as a alternative payer.

  4. Assign a existing filter YNHT_US_RE for base items that represent usage and recurring charge for discounting calculation on usage and recurring charge.

    1. Define filter for base amount calculation: Define which billable items are relevant for calculation of EUR 100. On the master agreement General Data Screen, choose Tab AgreementsOther RestrictionsCreate Assignment (first button from left side).

      Make following entries:

      FieldValue
      Key: YNHT_US_REYNHT_US_RE
      Items from: Default ValueDefault Value
      Items to: Default ValueDefault Value

      In the Basic Data and Validity Area section, make the following entries:

      Items from (date starting from which items can be assigned)01/01/2017
      Items to (date up to which items can be assigned)31/12/9999

      Which billable items are selected with YNHT_US_RE?

      Result: Billable items with type H211, H221, H230 and H240 are selected in filter YNHT_US_RE.

      Save your entries. You have enhanced your master agreement according to business requirements.

Task 2: Create Billable Items as Test Data for your Master Agreement Assigned Provider Contracts

Steps

  1. Create billable items for your master agreement and your provider contracts, contract account. Therefore, run the RFKKBIXBITSAMPLE program with variant MA_Discount for generation of test data. Choose SAP MenuToolsABAP WorkbenchDevelopmentUser InterfaceABAP Editor (Transaction SE38).

    Program: RFKKBIXBITSAMPLE

    With Variant: MA_Discount

    Change the following fields with your solution from master agreement (solution task 1) for example, user 6 master agreement: 5000146.

    The Report suggests one of the assigned provider contract. Remember your contract accounts, in order to find the relevant billing documents without any trouble.

    In the menu, choose ProgramExecute.

    Run report second time with second provider contract related to master agreement.

    1. Select all contracts for your test.

      Check the billable items were created using transaction FKKBIXBIT_MON.

      Result: The report has generated billable items for your billing process.

      If this is not possible you get a log file error message, Check your billing process customizing than again step by step.

Task 3: Execute Billing Mass run for Customer Usage

Steps

  1. Billing of all master agreement assigned contract accounts is done using app Execute Billing or via transaction FKKBIX_M with billing process YNAL.

    Press further selection button and enter your master agreement. Adjust the billing day in accordance to the Bill From Date of your billable items (for example, User 6: 5000146). You do not have to enter all the contract accounts of your master agreement.

    With the billing run discount bits are created for two contract account. Find the billing documents that include the voice usage and check, if discount bits were created.

    1. In the SAP Fiori launchpad search section Billing and choose the tile Execute Billing (Corresponding back-end transaction FKKBIX_M).

      Check the created billing documents using app Display Billing Documents or via transaction FKKINVBILL_DISP.

      Result: You should get 4 billing documents for the master agreement. There are one-time fees and hardware fees that came from CRM at least on each contract account.

      Select the billing documents that are created for the usage and recurring.

      One of the billing documents as an example: The link to the master agreement happens on document header level.

      In addition, discount base items were created during billing which can be seen at the source items tab of the voice usage document.

      Go in the billing document that includes the voice usage bits to writer, Source Items. Find a source item with BIT Class HDIS.

      Per billing document 1 discount BIT is created. You should get two discount bits, if you have usages that are related to two different provider contracts that are related to two different contract accounts.

      The discount bits are assigned to the master contract account.

Task 4: Execute Discount Billing Run for Discount Calculation

Steps

  1. Billing of the discount base items is done using app Execute Billing or via transaction FKKBIX_M. Enter YNDS for Billing Process and adjust the billing day in accordance to the Bill From Date of your discount base items. Press further selection button and enter your master agreement. You do not have to enter all the contract accounts of your master agreement.

    • Analyze discount calculation document.

    • Analyze discount document and discount log.

    1. In the SAP Fiori launchpad search section Billing and choose the tile Execute Billing (Corresponding back-end transaction FKKBIX_M).

      Check the created billing documents using app Display Billing Documents or via transaction FKKINVBILL_DISP.

      Again, the master agreement can be specified by using the further selection function. You should get two billing documents, one called: Discount Calculation Document and the other called: Discount Document.

      • Discount Calculation Document: This document is a technical document that will not be invoiced (no invoicing trigger exists, Inv. Lock = 2). It represents the discount calculation result accounted on the master agreement and not the actual discount receiver. That is the reason, why again new discount items (source transaction type DISCB) were created. The discount items contain the actual discount receiver for business partner/contract account.

      • Discount Document: The discount items created during discount calculation are directly billed, which results in the creation of the discount document. The discount document contains the discount calculation result accounted on the discount receiver. This document can be invoiced. The discount log contains lots of information regarding the discount calculation. Technically it is stored as an additional item on the discount calculation document.

Task 5: Execute Invoice Mass Run

Steps

  1. Execute invoicing using app Execute Invoicing or via transaction FKKINV_M for your master agreement. Enter YN for Invoicing Process and adjust the document date in accordance to the billing documents created before. Press further selection button and enter your master agreement.

    1. In the SAP Fiori launchpad search section Invoicing and choose the tile Execute Invoicing (Corresponding back-end transaction FKKINV_M).

      Check the created invoicing documents using app Display Invoicing Documents or via transaction FKKINVDOC_DISP.

      Again, the master agreement can be specified by using the further selection function. You should get at least three invoicing documents.

      One invoicing document for headquarter containing the usage of the subsidiaries and the discount.

Log in to track your progress & complete quizzes