Determining Agreements and Charge Calculation Rules

Objectives

After completing this lesson, you will be able to:
  • Calculate Charges.
  • Determine Agreements and apply Calculation Rules.
  • Estimate Freight Charges.

Freight Order Charge Calculation

This image shows the Freight Order Charge Calculation Process.

During freight charge calculation in the freight order, the following steps occur:

  1. The data is collected from the following SAP TM core objects:
    • Transaction business object: freight order, freight booking, service order, stage, item, container
    • Configuration objects
    • BRF+ conditions
    • Master data
    • Any BAdI implementation
  2. The freight agreement is determined.
  3. The values of each charge type in the calculation sheet are calculated.
  4. The log file of the calculation run is held, and so on.
  5. The calculated results are shown in the freight order.

Freight Rate Derivation Process

This image shows the derivation process of the Freight Rate.

During the freight rating process, the following steps are performed:

  1. Based on the calculation sheet line item, the system determines the calculation base and the rate table.
  2. Given the dimension of the rate table (scales), it then obtains the logistical data.
  3. Given the calculation profile, the system determines the baseline for the calculation date determination.
  4. The system obtains the matching rate table record and then determines the appropriate calculation rule.
  5. The system calculates the freight rate amount.

Transportation Zone Derivation Using Zone Hierarchy

This image shows the derivation of the Transportation Zone using the Zone Hierarchy.

The derivation of the transportation zone is flexible. It is not essential to maintain rates for all values - they can be maintained at the appropriate level.

The system retrieves the rate by going up in the hierarchy level until it finds the rate.

Maintain Preconditions in Agreement Items

In an agreement, there are two ways of using preconditions for the agreement items (calculation sheets):

  • Built-in preconditions
  • BRFplus preconditions

It is possible to define a BRFplus condition or a BAdI to check if a certain calculation sheet is to be processed in a certain business context. The result of this rule is a true or false decision. If the response from BRFplus or the BAdI is true, the calculation sheet is considered for charge calculation. Some built-in preconditions are available on agreement item level.

This image shows Preconditions in Agreement Items.

Types of Built-in Preconditions in Agreement Items

Built-in preconditions in agreement items are as follows:

  • Trade Lanes:

    These are based on criteria such as source location, source zone, destination location, destination zone, mode of transport, or means of transport. The agreement item can be activated or deactivated.

  • Partners:

    Based on the business partner, an agreement item can be activated or deactivated.

  • Item Precondition:

    Based on up to seven predefined conditions, it is possible to activate or deactivate an agreement item.

Available Item Preconditions

The table lists the available item preconditions and their descriptions.

Available Item Preconditions

PreconditionDescription
CONSL_TYPEAllows selection of a certain Air Waybill Type
CONT_BASISAllows selection of a certain Contract Basis
MOTAllows selection of a certain Transportation Mode
MOVEM_TYPEAllows selection of a certain Movement Type
SERVICE_LVAllows selection of a certain Service Level
SHIPMENTAllows selection of a certain Shipping Type
STAGE_CATAllows selection of a certain Stage Category

BRFplus Preconditions in Agreement Items

  • Certain items (calculation sheets) in the agreement can be set to true or false based on parameters that are flexibly defined in the condition or a BAdI.
  • The condition (condition type TCM_PRECON) is assigned to the agreement item.
  • You maintain the condition in the Precondition Rule field of the Precondition Tab in the Agreement Item details section.

Maintain Preconditions in Calculation Sheets

This image shows the Preconditions in a Calculation Sheet.

There are two ways of using conditions in the calculation sheet. There are predefined parameters in the built-in preconditions that can be used or a BRF+ precondition/BAdI can be maintained as well.

Types of Built-in Preconditions in Calculation Sheets

  • Trade Lanes: Based on criteria such as source location, source zone, destination location, destination zone, mode of transport, or means of transport, the charge line can be activated or deactivated.
  • Service: Based on the service level, a charge item can be activated or deactivated.
  • Business Partner: Based on the business partner, a charge item can be activated or deactivated.

BRFplus Preconditions in Calculation Sheets

A BRFplus condition, or a BAdI, can be defined to check if a certain calculation sheet item is to be processed in a certain business context. The result of this rule is a true/false decision. If the response from BRFplus or the BAdI is true, the calculation sheet item is considered for charge calculation.

The precondition for the charge item can be maintained on charge item level in the Precondition tab.

Agreement Determination

Freight agreements (FAs) and forwarding agreements (FWAs) are the basis for calculating transportation charges. In this section, we look at how agreements are determined.

Agreement Determination Based on Priority

  • The system determines the agreement based on organization, business partner, validity period, and preconditions.
  • If there are several matching agreements, which can be determined on the data from the freight order/booking or from the forwarding order, it is possible to have a leading charge type (defined in charge type Customizing), and the first agreement where the defined leading charge type can be calculated is picked. Besides using leading charge types, it is possible to maintain priorities.
  • If the system finds multiple matching agreements during agreement determination, the agreement priority defines the sequence in which the subsequent determination is executed.
  • The agreement priority can be maintained on the General Data tab in the details section.

Agreement Determination and Selection Types

Often logistics service providers (LSPs) have multiple freight agreements (FAs) with the same carriers and purchasing organizations. This is because a LSP can strike deals with carriers at various levels, for example, on a country, regional, and global basis.

Normally, the larger the contract, the better the rates. However, if a country Business Partner (BP) is pushing a lane to increase market share, then the LSP could potentially get better rates. Therefore, it makes sense to have a different contract with the country BP, or even multiple contracts.

Similar scenarios can exist on the customer side. Therefore, the ability to choose a particular context in a given scenario is a critical business requirement on both the buying and selling side.

Manual Agreement Selection: Functions

  • An enhancement to the standard agreement selection, which is an automated process.
  • Provides the capability to select an agreement or agreement item for charge calculation.
  • Offers extra capability for automatic selection of minimum or maximum agreement items through calculation profile control setting.

Multiple Agreements Pop-up

The figure shows the Multiple Agreements dialog box, which can be used to select an agreement manually.

Note

The Multiple Agreement pop-up is not supported for through rates.
This image shows the Multiple Agreement Pop-up.

Agreement Determination Type

Manual Agreement Selection: Example Scenarios

This image shows the Agreement Determination Type.

Customizing activity for Transportation Management occurs in Transportation ManagementBasic FunctionsCharge CalculationBasic SettingsDefine Calculation Profiles.

If you enter Minimum Charges, the system finds the final amounts for all the agreement items and chooses the agreement item with the minimum final amount for charge calculation.

If you enter Maximum Charges, the system finds the final amounts for all the agreement items and chooses the agreement item with the maximum final amount for charge calculation.

If you enter Determine All Agreements, the system displays all the relevant agreements and agreement items for each charge item. You can then select an agreement or agreement item for each charge item, for charge calculation.

If you do not enter any value, the system does not consider the agreement determination type for charge calculation and follows the standard agreement determination process.

Charge Calculation Rules

It is possible to define charge calculation rules to determine the right agreement. The standard determination logic based on purchasing organization, validity, and business partner is ignored and the logic of the condition, based on a certain business context maintained in the conditions, is used.

This graphic shows the Agreement Determination with Charge Calculation Rules.

Condition Types for Agreement Determination

  • TCM_FAGDET - Freight Agreement Determination
  • TCM_FAGDEX - Freight Agreement Exclusion

TCM_FAGDET - Freight Agreement Determination Standalone

  • The determination condition is assigned to a charge calculation rule (Agreement Determination Rules–Standalone) in the SAP Easy Access Screen.
  • In the SAP Easy Access Screen, choose LogisticsTransportation ManagementMaster DataMaintain Charge Calculation Conditions.
  • If you select the Std Determ. checkbox, the system uses the standard determination logic when the condition execution fails or returns no result.

TCM_FAGDEX - Freight Agreement Exclusion

  • The system can check both the condition and the BAdI option to see if an automatically determined agreement has to be considered for the given business context.
  • The system checks the list of automatically determined agreements one by one to determine if they are still applicable. If more than one agreement remains after the system has applied the exclusion rule, the system considers the agreement priority.
  • This charge calculation rule can be embedded in the calculation profile for the determination condition. The exclusion condition can be maintained directly in the agreement in the General DataDetails section.
  • Once the exclusion condition is embedded in the agreement, the system can check that condition to see if an automatically determined agreement has to be considered for the given business context.
This image shows the Overview of the Charge Calculation Rules.

Further Charge Calculation Rules

Besides the described Agreement Determination, Charge Calculation Rules can be used also for the following activities:

  • You can define rules for calculation sheet determination

    Standalone: You have switched off standard determination, and instead, the system executes a condition that determines the calculation sheet. If you select the Std Determ. checkbox, the system uses the standard determination logic if the condition execution fails or returns no result.

  • You can define a precondition rule for the calculation sheet and calculation sheet item

    You define a BRFplus condition or a BAdI to check if a certain calculation sheet or calculation sheet item is to be processed in a certain business context. The result of this rule is a true/false decision, that is, if the response from BRFplus or the BAdI is true, the calculation sheet or calculation sheet item is considered for charge calculation. For more information, see the Precondition tab page in the Items screen area of the agreement or calculation sheet.

  • You can define grouping rules for resolution bases. You have the following options:
    • Condition: The system can dynamically determine the attribute or field by which the data source is to be grouped. Both options, the direct grouping and the dynamic BRFplus-based attribute determination, work in the same way–the data source currently being processed (for example, all shipment items) is sorted by this specific attribute. The system then groups all items with the same attribute value and later handles them as one item.
    • Group By: If you know the calculation base by which the data source is to be grouped and this value is static, you can enter the calculation base directly. The system then groups all items with the same attribute value and later handles them as one item when looking up the rate table.
  • You can define rate table determination rules
    • Condition: The flexible, rule-based determination of a specific rate table. To configure this determination, the complete logistical data source is available. Only a valid rate table is expected as the return parameter.
    • Determin. By BAdI (Rate Table Determination Using BAdI): The rate table determination is coded inside the BAdI.
  • You can define the rules for charge calculation by a formula
    • The system calculates the charge item without the normal rate table access. That is, either the BAdI or BRFplus directly returns the calculated amount for this charge item.
    • If you decide to calculate the charge item through BRFplus, you can use a mathematical formula or any other BRFplus option. In this case, no information is available in the Calculation Base area.

Freight Order Charge Estimations

This image shows the Charge Estimation of the Freight/Buying Side.

In SAP Fiori Launchpad, you can perform carrier selection and estimate the charges for a freight order with only a minimal amount of logistical data.

You must provide the following data to estimate the charges: ​

  • Origin
  • Destination
  • Purchasing Organization
  • Carrier
  • From and To dates (Carrier Selection): the user receives a ranking of carriers based on total cost
  • Item

To estimate the charges, in SAP Fiori Launchpad, choose Freight Order ManagementEstimate Freight Charges.