With the release of SAP Transportation Management (SAP TM) 9.1, came a new functionality called Event Based Charge Calculation. The link to the English SAP help on this topic can be followed here. This functionality is achieved through the integration of SAP TM and SAP Event Management (SAP EM).

As the name indicates, this functionality allows you to, based on events, update the charges that are applicable to freight orders, freight bookings and forwarding orders. This opens up many time saving process automation possibilities and means that you now have the ability to automatically process the charge calculation of the above mentioned documents, based on execution events happening (or not). For example you can now automatically add a Fumigation charge to a forwarding order, if an event corresponding to this service was posted. This functionality could also be used in the context of charging for demurrage.

This is quite a game changing functionality that results in reduced manual erroneous data entry and data administration time, allowing for your employees to spend more time on added value tasks and will quite potentially help you curb revenue leakage.

Take for example a scenario where you charge your customers for the cleaning of a container, an activity that may or may not be required. Prior to event based charge calculation, you had two options:

  1. Add the cleaning charge by default to all your forwarding orders (via the agreement calculation sheet) and then delete it from the forwarding order if the charge did not apply,
  2. Create forwarding orders without the charge and then add it to the forwarding order if a cleaning charge was applicable.

Both solutions whilst they did the job were not optimal and required a high degree of human input and management, that could lead to disputed invoices if you had forgotten to remove the charge from the forwarding order or revenue leakage if you had forgotten to add this charge to the forwarding order.

In this post I will walk you through a couple of examples of how Event based Charge Calculation can be setup and used to cater to:

  • The addition of a charge to a forwarding order on the basis of an event reported against the associated freight order,
  • Addition of a demurrage type charge to a forwarding order. I.e by comparing the planned time of an event with the actual time of the same event.

Customizing setup and pre-requisites

Below are the items that I have maintained in customizing.

Calculation bases

In the example that is indicated in the SAP help link above, there is a reference made to the calculation bases delay_days and grace_days. However these calculation bases did not exist in my system and hence was unsure if they were named just for illustration purposes or whether they were just missing from my system. Fortunately I had access to another TM system and was able to ascertain that they were missing from mine. So if you are in the same situation as me and find them to be missing, I’ve added screenshots below of what they should look like – you can just add them to your system, but do note that they are only necessary for my second scenario where I compare planned to actual execution timestamps.


DELAY_DAYS calculation base


GRACE_DAYS calculation base

In addition, during the testing of my second scenario I hit more headaches but eventually worked out that two more – hard coded – calculation bases were missing from my system. They are ESTD_DATE (estimated event date) and ACTUAL_DATE (actual event date). Again, I have added below screenshots to illustrate what they should look like.


ESTD_DATE calculation base


ACTUAL_DATE calculation base

Event profile

The event profile holds the association of charge types to event types. That is, what charge will be added if a particular event occurs. For the purpose of my example I have setup the entries below:

  • The charge ZFUT will be added if the Event FUTILE has status Unexpected event
  • The charge ZRED will be added if the Event GR (goods receipt) has status Reported Event


The event status is an important parameter, as it can only accept one value at a time. For example, let’s say you have within the context of an event handler an expected event called ARRIVE. You then set up an event profile where you indicate a charge type, the event ARRIVE and mark the event status as Expected. You have associated this event profile to a forwarding order type. If you go on to create a forwarding order, you will then notice that the event based charge is added to the charge calculation of your forwarding order. The event ARRIVE is subsequently reported in EM. You will then notice that the charge will disappear from your forwarding order, as the event status is now reported and no longer expected – so be mindful of that.

Assignment to Document type

From a configuration point of view the last thing we need to do is assign the event profile to the document type for which event based charges should be calculated. In my case I want to add charges to forwarding orders and have hence, added the event profile to my forwarding order type.



Functional data maintenance

Now that I have completed the required customizing, I can move on to maintaining the required master data, namely the event based charges in the relevant calculation sheet of my forwarding agreement.

Event based charges

As indicated above I want to have two charges:

  • The charge ZFUT should be appended to my forwarding orders in the event where a futile event is reported (A futile relates to a pick-up or delivery. Typically one would report a futile if you could not perform a pick-up or delivery because no one was there to hand you over the pick-up items or no one was there to receipt the delivered goods). If this event is raised then I will charge my customer $60 in this example.
  • The charge ZRED will be appended to my forwarding orders in the event where a Goods Receipt event is posted beyond a certain grace period. I.e, in my scenario, we’ll imagine that my customer has ½ day to offload the cargo from the container I delivered to him. He will then send me a Goods Receipt Event to notify me that my container is empty and can be picked up. Beyond that ½ day – which is a grace period – my customer will be charged $240 per day on a pro rata basis.

The screenshot below shows these two charges in my calculation sheet. You can see that I also have other charges included in my calculation sheet.

For the second charge type ZRED, I have in the calculation rule section indicated the calculation base DELAY_DAYS (standard SAP). Also, because in the customizing of this calculation base I indicated that it had a relevant calculation base (GRACE_DAYS), I can navigate to it, and indicate a value for it. As I said above, I have offered my customer a grace period of ½ a day.


My master data is now complete and I can move on to testing my scenario.


Event based charge calculation

We’re now all set. So let’s start by creating a forwarding order. As you can see, when I create my forwarding order, none of the two event based charges exist in my forwarding order. This is as expected.


I then plan the resulting freight unit to a freight order, for which an event handler is created. The following expected events have been created for my freight order and I can see them in SAP EM, via the web UI.


I move to SAP EM to post events. The first event I post will be a FUTILE event, as shown below.



Below, the update in EM showing the reported event.


I now go back to SAP TM and notice that in my forwarding order the ZFUT charge has been added to it. The event based charge has been successfully posted.



I now return to SAP EM and this time post the Goods Receipt event.


Remember that I have given my customer a grace period of ½ a day. My planned event time is 08.01.2015 – 16:00. Because of the allowed grace time, if the actual event time is posted up to 12 hours (1/2 a day) after the planned time, then I will not charge my customer. Anything above 12 hours though is game and can be charged. So I will post the actual event with a full 24 hours after the planned time. I.e I report the Goods Receipt event with the actual time of 09.01.2015 – 16:00, as shown below.



I now go back to TM and note that the ZRED charge has been added to my forwarding order. Also note that only $120 have been charged to my forwarding order as the grace period has been deducted from the overall time difference between the planned time and the actual time (24 hours time difference – 12 hours Grace time = 12 hours)


Closing words

So there you are, I hope this post was informative and has given you insights into how you could perform an event based charge calculation. I hope that you now also have a better understanding for the non-negligible process automation potential that this functionality can provide. Credits also to David Zhao who provided help along the way.