You are on page 1of 43

SAP Event Management

Scenarios for SAP Transportation Management

A guide for administrators and consultants

Release: SAP EM 9.0, SAP TM 9.0

Version: 1.1

PUBLIC

Document Version: December 2012

(C) SAP AG Page 1 of 43


Copyright
© Copyright 2012 SAP AG. All rights reserved.

SAP Library document classification: PUBLIC


No part of this publication may be reproduced or transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained herein may be changed without prior
notice.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the
express permission of SAP AG. The information contained herein may be changed without prior
notice.

Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.

Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered
trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z,
System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems,
POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System
Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX,
Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered
trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the United States and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of
Adobe Systems Incorporated in the United States and other countries.

Oracle and Java are registered trademarks of Oracle and its affiliates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are
trademarks or registered trademarks of Citrix Systems Inc.

HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web
Consortium, Massachusetts Institute of Technology.

Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari,
Siri, and Xcode are trademarks or registered trademarks of Apple Inc.

IOS is a registered trademark of Cisco Systems Inc.

RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch,
BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are
trademarks or registered trademarks of Research in Motion Limited.

Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile
Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google
Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of
Google Inc.

INTERMEC is a registered trademark of Intermec Technologies Corporation.

Wi-Fi is a registered trademark of Wi-Fi Alliance.

Bluetooth is a registered trademark of Bluetooth SIG Inc.

Motorola is a registered trademark of Motorola Trademark Holdings LLC.

Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.


(C) SAP AG Page 2 of 43
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal
Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned
herein as well as their respective logos are trademarks or registered trademarks of Business Objects
Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products
and services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate
AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies.
Data contained in this document serves informational purposes only. National product specifications
may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and
its affiliated companies ("SAP Group") for informational purposes only, without representation or
warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the
materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should
be construed as constituting an additional warranty.

(C) SAP AG Page 3 of 43


Table of Contents
Related Documents ................................................................................................................................. 6
Related Notes .......................................................................................................................................... 6
Document History .................................................................................................................................... 6
Introduction .............................................................................................................................................. 8
Overview .................................................................................................................................................. 8
Events: Freight Order and Freight Booking ......................................................................................... 9
Expected Events .............................................................................................................................. 9
Unexpected Events ......................................................................................................................... 9
Events: Freight Unit ........................................................................................................................... 10
Expected Events ............................................................................................................................ 10
Unexpected Events ....................................................................................................................... 10
Mutual Updates between freight units and freight orders or bookings .............................................. 11
Updating data in TM triggered by new execution event .................................................................... 12
Standard updates of freight unit, freight order and freight booking ............................................... 12
Enhancement possibilities for custom updates in TM ................................................................... 13
BAdI /SCMTMS/TOR_EVENT_PROC .......................................................................................... 14
Time References within SAP TM - EM Integration ............................................................................ 15
SAP TM Expected Event ............................................................................................................... 16
SAP TM Delay Event ..................................................................................................................... 16
SAP EM Event Messages ............................................................................................................. 17
Instruction Tracking ........................................................................................................................... 17
Expected Event.............................................................................................................................. 17
Sample Scenario “International Outbound Transportation” ................................................................... 18
Tracking Scenario Details: Freight Unit, Freight Order and Freight Booking ........................................ 20
Expected Events: Generation Rules ................................................................................................. 20
Freight Unit .................................................................................................................................... 20
Freight Order and Freight Booking ................................................................................................ 20
Event Details...................................................................................................................................... 21
Freight Unit .................................................................................................................................... 21
Freight Order and Freight Booking ................................................................................................ 25
Events supporting Geo Coordinates ................................................................................................. 31
Expected Events ............................................................................................................................ 31
Unexpected Events ....................................................................................................................... 31
Tracking Scenario: Instructions ............................................................................................................. 32
Expected Events ................................................................................................................................ 32
Generation Rules ........................................................................................................................... 32
Event Details...................................................................................................................................... 32
Overdue Monitoring ....................................................................................................................... 35
(C) SAP AG Page 4 of 43
BAdI: Update Event Handler Data ..................................................................................................... 36
Appendix ................................................................................................................................................ 37
Trouble Shooting ............................................................................................................................... 37
Deletion and Deactivation of Event Handlers in SAP EM ................................................................. 37
SAP TM Deletion Setting ............................................................................................................... 37
Overview Deletion and Deactivation in SAP EM ........................................................................... 38
Freight Unit Type: Settings for SAP EM ............................................................................................ 40
Freight Order: Settings for SAP EM .................................................................................................. 41
Freight Booking: Settings for SAP EM .............................................................................................. 42

(C) SAP AG Page 5 of 43


Related Documents
Document Type Document Name (Link) Version

Solution Manager
SAP TM – EM Integration Guide TM 9.0
Document

Related Notes
SAP NOTE Note Description
1756885 Event message is not propagated from SAP EM to SAP

1768876 Events displayed on SAP TM execution tab

1776404 SAP EM 9.0-Collection of notes recommended to be implemented

1794944 Which display mode for execution tab should be used?

1747234 How to use report /SCMTMS/PROCESS_TRIGGER_BGD

Document History
Document Changes Date
Version

1.0 Document Created 21-Nov-2012

 New chapter Time References within SAP TM - EM Integration


1.1  Chapter “Updating data in TM by new execution event” revised 14-Dec-2012
and extended

(C) SAP AG Page 6 of 43


(C) SAP AG Page 7 of 43
Introduction
SAP Event Management 9.0 provides a set of visibility processes to monitor the execution of
transportation processes managed in SAP Transportation Management 9.0.

The present document is a detailed description of these visibility processes and the integration of SAP
Event Management 9.0 with SAP Transportation Management 9.0. It mainly aims at readers having
expertise in SAP Event Management, who want to understand the principles and the detailed of
implementation of the Event Management content for SAP Transportation Management. Its focus is on
a concise and complete description of the EM features. In that regard it is supplementary to the TM
scenario guides, which (where applicable) show, how EM is used to monitor a given process.

The initial overview chapter may also address a broader public, who wants to learn the scope and the
main features of this content.

Overview
The Content of SAP Event Management for SAP Transportation Management focuses on monitoring
the execution of the transportation processes. Consequently it refers to those business documents in
SAP TM that are execution relevant, i. e.

 Freight Order
 Freight Booking
 Freight Unit
 Instruction

The related visibility processes provided with SAP EM 9.0 are:

 Shipper - Freight Order Visibility Process


 Shipper - Freight Unit Visibility Process
 Shipper - Freight Booking Visibility Process
 Consignee - Freight Order Visibility Process
 Consignee - Freight Unit Visibility Process
 Instruction Tracking Visibility Process

The shipper and the consignee version of freight order and freight unit visibility process are examples
for different views onto the same process addressing different user roles in this process. The shipper
view may, for instance, be used by transportation planners, transportation dispatchers or supervisors,
who are managing their outbound deliveries in their own TM system. It may also be used by carriers of
LSPs execution any kind shipment. It supports reporting of the actual date and time of all steps to be
executed by them (e. g. proof of pick-up, departure, arrival, unloading begin). It also provides reporting
of unexpected events, such as delay, damage, or, execution block. The consignee view provides the
same visibility on the shipment statuses and the milestones at all stages of the shipment, but can only
report proof of delivery, because this is the only confirmation in his area of responsibility.

(C) SAP AG Page 8 of 43


The following events and status updates are provided with the standard in EM 9.0:

Events: Freight Order and Freight Booking


Expected Events

Transportation Delivery
Event Event Code Block Status
Status Status
n. c. n. c.
Loading Begin LOAD_BEGIN n. c.
n. c. n. c.
Loading End LOAD_END LOADED

LOADING_CHE n. c. n. c.
Proof of Pickup POPU
CKED
n. c. n. c.
Departure DEPARTURE IN_TRANSIT

CUSTOMS_CLE n. c. n. c.
Clear Customs CLEAR_CUSTOMS
ARED_IMP
n. c. n. c.
Arrival at Destination ARRIV_DEST ARRIVED
n. c. n. c.
Unloading Begin UNLOAD_BEGIN ARRIVED
n. c. n. c.
Unloading End UNLOAD_END UNLOADED
n. c. n. c.
Proof of Delivery POD DELIVERED

Remarks:
 n.c. = no change means that upon processing the event the corresponding status remains
unchanged. If a status value is indicated it means that the status is set to the indicated status
 The “delivery status” in Event Management relates specifically to EM and is not identical with
the “delivery status” in TM.

Unexpected Events

Transportatio Delivery
Event Event Code Block Status
n Status Status

Delay DELAYED n. c. DELAYED n. c.

Cancel CANCEL n. c. CANCELLED n. c.

Block for Execution BLOCK_FOR_EXEC n. c. n. c. BLOCKED

UNBLOCK_FOR_EXE NOT_BLOCKE
Unblock for Execution n. c. n. c.
C D

(C) SAP AG Page 9 of 43


Events: Freight Unit
Expected Events

Event Event Code Transp. Delivery Block Status


Status Status

Scheduled SCHEDULED SCHEDULED n.c. n.c.

Loading Begin LOAD_BEGIN n.c. n.c. n.c.

Loading End LOAD_END LOADED n.c. n.c.

Departure DEPARTURE IN_TRANSIT n.c. n.c.

Arrival at Destination ARRIV_DEST ARRIVED n.c. n.c.

Unloading Begin UNLOAD_BEGIN ARRIVED n.c. n.c.

Unloading End UNLOAD_END UNLOADED n.c. n.c.

Unexpected Events

Transportation Delivery
Event Event Code Block Status
Status Status

Damage DAMAGE n.c. n.c. n.c.

Delay Freight Unit DELAYED_FU n.c. DELAYED n.c.

Cancel CANCEL n.c. CANCELLED n.c.

Block for Execution BLOCK_FOR_EXEC n.c. n.c. BLOCKED

UNBLOCK_FOR_EXE NOT_BLOCKE
Unblock for Execution n.c. n.c.
C D

(C) SAP AG Page 10 of 43


Mutual Updates between freight units and freight orders or bookings
To avoid redundant messaging or additional manual updates SAP TM supports mutual updates of
events that are implicitly relevant for both types of documents.

An “arrival” event received for the freight booking, for instance, implicitly means that all freight units
assigned to this booking at the point in time of the event are also arrived at the named location. This
feature has to be enabled explicitly in the customizing of the freight order/freight booking type (setting
“Propagate Execution Information” has to be checked).

Events that are reported for a freight unit will only be propagated to the related freight order/freight
booking when it has already been reported to all freight units that are assigned to the freight
order/freight booking, e.g. if the departure is reported on freight unit level, it will be automatically
propagated to the freight document when it has been reported for all freight units.

Special cases are here the events “Loading Begin” and “Unloading Begin”. These are already
propagated as soon as the first freight unit receives one of these events. “Loading End” and
“Unloading End” are again propagated only when it is reported for the “last” freight unit.

The following diagram shows, how the events are propagated between the different documents
(freight unit and freight order) and the different systems (in case propagation of execution information
is enabled for the freight order):

Option 1 Option 3

EM FU TM FU TM FO TM FU TM FO EM FO

EM FO EM FU

Option 2 Option 4

EM FO TM FO TM FU TM FO TM FU EM FU

EM FU EM FO

Event Type
Send Event Message
TM Update

(C) SAP AG Page 11 of 43


1. Event message is reported in SAP EM for the freight unit
 SAP EM Rule set of freight unit event handler is set up to update TM
 Event is propagated to the freight unit in SAP TM
 Automatic propagation to related freight order in SAP TM is done
 The Event extractor of the freight order in SAP TM propagates the event to the freight
order in SAP EM

2. Event message is reported in SAP EM for the freight order


 SAP EM Rule set of freight order event handler is set up to update SAP TM
 Event is propagated to the freight order in TM
 Automatic propagation to related freight unit in SAP TM is done (if customizing in freight
order type is set to “Propagate Execution Info”)
 The Event extractor of the freight unit in SAP TM propagates the event to the freight unit
in SAP EM

3. Execution event is reported in SAP TM for the freight unit


 Automatic propagation to related freight order in SAP TM is done
 The Event extractor of the freight unit in SAP TM propagates the event to the freight unit
in SAP EM
 The Event extractor of the freight order in SAP TM propagates the event to the freight
order in SAP EM

4. Execution event is reported in SAP TM for the freight order


 Automatic propagation to related freight unit in SAP TM is done (if customizing in freight
order type is set to “Propagate Execution Info”)
 The Event extractor of the freight order in SAP TM propagates the event to the freight
order in SAP EM
 The Event extractor of the freight unit in SAP TM propagates the event to the freight unit
in SAP EM

This propagation leads to a situation that the events are always propagated to all relevant documents
if the system is set up correctly:
 Event extractors in SAP TM have to be active for the event types that shall be propagated to
SAP EM
 Freight orders/freight bookings in SAP TM have to be enabled in the type customizing to
propagate the execution info
 Rule sets in SAP EM have to be configured that events are propagated to SAP TM (activity
function TM_MAINTAIN_EXEC_INF)

Updating data in TM triggered by new execution event


Standard updates of freight unit, freight order and freight booking
In the standard the updates are done in TM whenever a new execution event is created (e.g. when an
event message from SAP EM is propagated to SAP TM) according to the following rules.

Execution status updates:

 Execution status is set to 09 (Loading in Process) when the first loading related execution
event is created (e.g. event code LOADING_BEGIN).
 Execution status is set to 03 (In Execution) when the first execution event after the first loading
is created (e.g. event code DEPARTURE )
 Execution status is set to 04 (Executed) when an execution event with a customizable event
code is created for the last stop of the freight document. The event code can be maintained in
the type customizing.

Because execution events have a direct impact on the TM execution status, they can also have an
impact on the TM lifecycle status. The lifecycle status of a freight order, for which execution tracking is

(C) SAP AG Page 12 of 43


enabled in the customizing, will only be set automatically to "Completed" if the execution status is
"Executed" (and other prerequisites are fulfilled).

Stop handling execution status updates:

Event Stop Handling Execution Status

Loading Begin 16 ( Partially Loaded )


Loading End
18 ( Loaded )
Departure
20 ( Departed )
Arrival at Destination
06 ( Arrived )
Unloading Begin
10 ( Partially Unloaded )
Unloading End
12 ( Unloaded )

Technically the updates are triggered by a determination that reacts to all changes of execution
information (DET_EXEC_AM – after modify determination of node EXECUTIONINFORMATION). This
determination then calls the action PROCESS_EXEC_INFO of node EXECUTIONINFORMATION.

Enhancement possibilities for custom updates in TM


There are several possibilities to create custom logic to trigger updates of freight documents triggered
by new or changed execution information. Two possibilities to trigger updates:

1. Change Controller: You can create your own strategies that do your custom changes on the
freight document. You can find a detailed description on how the change controller works and
all related customizing here: https://cw.sdn.sap.com/cw/docs/DOC-150460
2. Enhancement of standard action: You can enhance action PROCESS_EXEC_INFO of node
EXECUTIONINFORMATION, in which also the standard updates are handled.

Locking issues must be checked in case of implementing custom logic to update freight documents as
reaction to new execution information.
The EXECUTIONINFORMATION node is a separate lockable node and therefore it is not guaranteed
that e.g. the root node or any other node of the same instance can be modified in the same
transaction (in which the new execution information has been received).

Enhancements with Change Controller


The change strategy determination condition (condition type /SCMTMS/CC_TOR_STRAT) can be
assigned in the type customizing for freight unit, transportation unit, freight order or freight booking
type to determine dynamically the correct change strategy if a new execution event has been
processed. The data access definition /SCMTMS/TOR_EVENT can be used to build up a decision
table for the condition that determines a different change strategy for each event code. In the change
strategy one or several actions (standard or custom ones) can be called to execute the updates on the
freight document.

The failed keys and the message object that are returned from each action call should be passed to
the request object of the strategy. If one of the actions could not be executed due to a locking issue,
the system will then take care that the whole strategy will be executed again. This is controlled by
background job /SCMTMS/PROCESS_TRIGGER_BGD which is scheduled to run periodically. The
report will execute the strategy as often as necessary (until no locking issue occurred).

(C) SAP AG Page 13 of 43


Enhancement of standard action PROCESS_EXEC_INFO
The requested updates can also be done by an enhancement of the standard action
PROCESS_EXEC_INFO which is implemented in class /SCMTMS/CL_TOR_A_PROC_EXEC. The
enhancement “PostExit” of method /BOBF/IF_FRW_ACTION~EXECUTE can be implemented. The
following points should be considered:

 For direct updates in the enhancement coding (not via further action calls) the necessary locks
before the modifications are done should be retrieved.
 For updates via action calls the action should be configured to have the necessary write nodes
and change mode “Exclusive Write Mode”. This is the prerequisite that failed keys are
returned if the action cannot be executed due to a locking conflict. If failed keys and message
object are returned, method
/SCMTMS/CL_TRIG_HELPER=>CHECK_FOR_LOCKING_ISSUE should be called to check
if there is a locking conflict.
 If not all necessary locks can be retrieved or locking conflict of an action has been determined,
method SET_TRIGGER should be called (like several times before in method
/BOBF/IF_FRW_ACTION~EXECUTE) and no further processing should be done.
 The system will then automatically take care that the action PROCESS_EXEC_INFO will be
executed again (until action has been executed successfully). This is controlled by
background job /SCMTMS/PROCESS_TRIGGER_BGD which is scheduled to run
periodically.

Some more information on how to use background report /SCMTMS/PROCESS_TRIGGER_BGD can


be found in consulting note 1747234.

BAdI /SCMTMS/TOR_EVENT_PROC
BAdI /SCMTMS/TOR_EVENT_PROC (IMG Path: SAP Transportation Management 
Transportation Management  Business Add-Ins (BAdIs) for Transportation Management 
Integration  Tracking and Tracing of Processes and Documents  BAdI: Providing Execution Data
for Transportation Activities ) can be implemented to change the logic on TM side before the execution
information node entry is created.

Method /SCMTMS/IF_COMMON_BADI~SET_BADI_WORK_MODE has to be implemented to set the


work mode (standard logic only, custom logic only or both). Method PROCESS_EVENT can be used
to implement custom logic to modify the execution information that will be persisted in TM. If it should
be assured that the execution information can be processed directly (all updates can be done), try to
retrieve all necessary locks already in the implementation of BAdI method PROCESS_EVENT and
raise an exception of type /SCMTMS/CX_EVENT_MANAGEMENT if not all locks can be retrieved. In
that case the RFC call of FM /SCMTMS/EXECINFO_PROCESS will remain in the queue and can be
reprocessed at a later point in time.

(C) SAP AG Page 14 of 43


Time References within SAP TM - EM Integration
Date/Time Available Remarks
Reference
Actual Event Date TM | EM EM: Event Messages Tab
TM: Execution Tab

Actual Date when the Event has occurred. Do not mix up with Event
Reporting Date!

Planned Date TM | EM EM: Event Messages Tab


TM: Execution Tab

Planned date of an expected event.

Expected Event Date EM It’s the planned date of an event. The term Expected Event Date is
only used in EM for the planned dates of an event. This points to the
Date when a certain event is planned (expected) to occur.

The Expected Event Date/Time can be found in table:


/SAPTRX/EH_EXPEV
- EVENT_EXP_DATE (Date/Time the Event Is Expected to
Occur)
- MSG_EXP_DATE (Event Message Expected Date/Time)

Estimated Delay Date EM | TM EM: Send Delay Event

The estimated delay date is used in the EM-TM integration scenarios


in the context of reporting a delay event.
The estimated date is replicated to the TM system for the referenced
event e.g. a Delay Event was reported for the Loading Begin Event.
In TM in the Delay Event details the referenced event Loading Begin
is displayed with the new estimated date for this event. The actual
planned date for Loading Begin is not updated automatically.

The data related to the delay event (estimated time, date, time zone,
delayed event and location) is stored as control parameter in EM
(data of last reported delay) and it’s replicated to the TM system
where the information is persisted in the EXECUTIONINFORMATION
BO node of the related freight order, freight booking or freight unit.

There is no standard usage of the estimated date/time for expected


events. In EM-TM integration scenarios it is used for delay events to
indicate the new estimated date/time for the related expected event.

The information about the last estimated delay date is stored in the
following control parameters:

- ODT20_ESTIM_DELAY_DATE
- ODT20_ESTIM_DELAY_TIME
- ODT20_ESTIM_DELAY_TZONE

This information is not displayed in the standard UI but can be used


by customers to display additional information for the Event Handler.

(C) SAP AG Page 15 of 43


SAP TM Expected Event

For an Expected Event in SAP TM the planned (expected) and the actual date is shown.

SAP TM Delay Event

For the unexpected delay event the actual event date and the estimated date of the delay is shown. There is no
planned date for unexpected events.

(C) SAP AG Page 16 of 43


SAP EM Event Messages

In SAP EM the planned and actual event dates are display. Again no planned dates for unexpected events are
available. Also in the standard UI no estimated dates are displayed.

Instruction Tracking
Expected Event

Event Event Code

Instruction Execution EXECUTION

Instruction tracking uses a single expected event to monitor the timely execution of the instructions.
For each instruction a separate event handler instance is created in EM. Instructions related to a
specific forwarding order or freight units can be listed by selecting the corresponding forwarding order
number or freight unit number v.v.. The works in the following way: When an instruction is created the
expected event time is set to the value of the “alert date” of the instruction. The alert date is a reminder
that the due date for executing the instruction is close. Once the alert is passed the expected event
date in the expected event EXECUTION is changed to the due date. The instruction status in EM can
have the values “pending”, “in progress”, “completed”, “alert”, “overdue”, and “completed after due
date”.

(C) SAP AG Page 17 of 43


Sample Scenario “International Outbound Transportation”
“International Outbound Transportation” is one of the sample scenarios provided for SAP
Transportation Management (see also guide in Solution Manger Content for TM).

Pre-Carriage Main-Carriage On-Carriage

Ocean Carrier
Truck Carrier
IOT-CR-02 Carrier
BP: IOT-CR-01
BP: IOT-CR-03

Port of Loading Port of Discharge Consignee


Shipper U.S.
IOT-USNEK IOT-NLRM
BP: IOT-CU-01 BP: IOT-CU-02
(Newark) (Rotterdam)

FREIGHT UNIT Loading Loading Unloading Unloading Unloading Unloading


Scheduled Departure Arrival ……. Damage ……. Arrival
Begin End Begin End Begin End

1 2 3 4 5 6 7 8 9 10 11

Loading Loading Proof of Clear Unloading Proof of


Departure Arrival ……. Delay …….
FREIGHT ORDER, Begin End Pickup Customs End Delivery
BOOKING ORDER
1 2 3 4 5 6 7 8 9

Expected Event Unexpected Event

In that scenario the responsible logistics unit of the shipping organization plans an overseas ocean
transport of three full container loads from the supplier’s production plant in the U.S. to the port of
discharge in Germany, the country of the consignee. The German subsidiary of the logistics unit plans
and executes the on-carriage from the port of discharge to the final destination.
In SAP TM 3 different freight units are created describing the 3 containers. The freight units are
represented by corresponding event handlers in EM and can be selected in EM, e. g. by the container
IDs:

Likewise event handlers are created for the freight order for the pre-carriage, the freight order for the
on-carriage and the freight booking for the main carriage. The freight orders belonging to this specific
transport may be selected by means of the house bill of lading number in EM (field is called “bill of
lading”, which is the generic term for house bill of lading, house way bill, etc. in the different
transportation modes):

(C) SAP AG Page 18 of 43


The house bill of lading serves as a common reference to retrieve all the different, relevant
transportation documents belonging to a specific transportation case, in cases where a shipment in
planned in different TM system and by different organizations. Once those documents from the
different source organizations are collected in EM, selection by the bill of lading (or in some cases the
master bill of lading) provides complete visibility about all relevant documents. The following diagram
explains all options for navigation between the different business document types and related visibility
scenarios provided for transportation tracking:

Freight Booking – ODT30_TO


Tracking IDs:

TOR_TEC – TOR ID Freight Booking


BO – Booking
TRQ – TRQ ID

Control Parameter:
Freight Order – ODT30_TO
ODT30_CONTAINER_ID – Container ID
ODT30_MBL – Master Bill of Lading Tracking IDs:
ODT30_BL – Bill of Lading
TOR_TEC – TOR ID Freight Order
TO – Tour
TRQ – TRQ ID

Control Parameter:
CNTR_ODT20_ASSIGNED_FU
ODT30_CONTAINER_ID – Container ID (new)
ODT30_BL – Bill of Lading (new)

ODT20_BO_ID_IN_FU

Freight Unit – ODT30_FU


Tracking IDs:

FU – Freight Unit
TRQ – TRQ ID
BO – Booking
TO – Tour ODT20_FO_ID_IN_FU

Control Parameter:

ODT30_CONTAINER_ID – Container ID
ODT30_BL – Bill of Lading

CNTR_ODT20_ASSIGNED_FU

(C) SAP AG Page 19 of 43


Tracking Scenario Details: Freight Unit, Freight Order and Freight
Booking
Expected Events: Generation Rules
The following table provides an overview on how the EE in SAP EM are generated and how the EE
and Message Date is determined.

Freight Unit
Expected Event Sequence Generated from EE Date Event Message Date
SCHEDULED 90 SCHEDULED from Application System EE Date + 24h
LOAD_BEGIN 100 LOAD_BEGIN from Application System EE Date + 24h
LOAD_END 200 LOAD_END from Application System EE Date + 24h
DEPARTURE 300 DEPARTURE from Application System EE Date + 24h
ARRIV_DEST 400 ARRIV_DEST from Application System EE Date + 24h
UNLOAD_BEGIN 500 UNLOAD_BEGIN from Application System EE Date + 24h
UNLOAD_END 600 UNLOAD_END from Application System EE Date + 24h

Freight Order and Freight Booking


Expected Event Sequence Generated from EE Date Event Message Date
LOAD_BEGIN 100 LOAD_BEGIN from Application System EE Date + 24h

LOAD_END 200 LOAD_END from Application System EE Date + 24h

POPU 300 LOAD_END relative to Event with EE Date + 24h


same Location
(LOAD_END) + 2h

DEPARTURE 400 DEPARTURE from Application System EE Date + 24h relative


to previous Event
(POPU)

CLEAR_CUSTOMS 500 CLEAR_CUSTO from Application System EE Date + 24h


MS

ARRIV_DEST 600 ARRIV_DEST from Application System EE Date + 24h

UNLOAD_BEGIN 700 UNLOAD_BEGIN from Application System EE Date + 24h

UNLOAD_END 800 UNLOAD_END from Application System EE Date + 24h

POD 900 UNLOAD_END relative to Event with EE Date + 24h


same Location
(UNLOAD_END) + 2h

NOTE:
If an EE is has a self-reference in the “Generated from” field that means that the information sent from
the Application System is used to create the EE in SAP EM. If e.g. “Generated from” is referring to
another Event, that means that in SAP EM an additional EE will be generated without having the
information received from the Application system but using an existing event as reference  EE
POPU/POD.

(C) SAP AG Page 20 of 43


Event Details
The following chapter provides a detailed overview on the existing Expected and Unexpected Events
which are supported in the SAP TM – SAP EM tracking scenarios for Freight Unit, Freight Oder and
Freight Booking.

- EE Relevance: what is the pre-requisite that an EE is considered to be sent to SAP EM


- Expected Event Date/Time: Which date is assigned to the EE Date/Time for SAP EM
tracking of the corresponding event. This information is used in SAP EM for the overdue
monitoring and therefore the essential information for e.g. follow up activities and alerting if an
EE changes into status overdue
- SAP TM Event Message Trigger: At which point in time is the actual Event Message sent
from SAP TM to SAP EM
- SAP EM Rule Set: Configured Rules in SAP EM when receiving a specific Event Message –
in the corresponding rule set activities are defined which are executed if the Event Message is
processed

Freight Unit

Expected Events
Expected Condition
Event
Scheduled EE Relevance:

- SAP TM Status – relevant for Expected Event Scheduled:


- FU Execution Settings -> Execution Tracking or Execution Tracking with
external SAP Event Management
- Execution Status in SAP TM is “not started” and not “ready for execution”
- At least one Stop must have an assigned start date.

Expected Event Date/Time:

- Date from Requested Start Date of first stop is being used


- Expected Event Date = Requested Start Date First Stop minus two days

SAP TM Event Message Trigger:

- The Schedule Event is only sent when


the planning status has been changed from any other status except "Not
Partially Planned" or "Not Ready for Planning" to "Planned"

SAP EM Rule Set:

- Set Transportation Status to SCHEDULED (Scheduled)

Loading Begin EE Relevance:

- Stop Category = Outbound

Expected Event Date/Time:

- Assignment Start-Date of the corresponding Stop

SAP TM Event Message Trigger:

- Loading Begin Event is sent in case of Execution Information Event


“Loading Begin” status or information was changed
- Event update was not initiated from SAP EM

SAP EM Rule Set:


(C) SAP AG Page 21 of 43
- Update EH with Geo Data from the Event Message
- Update Execution Information in SAP TM if EH was reprocessed

Loading End EE Relevance:

- Stop category = outbound

Expected Event Date/Time:

- Assignment End-Date of the corresponding Stop

SAP TM Event Message Trigger:

- Loading End Event is sent in case of Execution Information Event


“Loading End” status or information was changed
- Event update was not initiated from SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was reprocessed
- Set Transportation Status to LOADED (Loaded)

Departure EE Relevance:

- Stop category = outbound


- Corresponding Stage Planning Status = Planned

Expected Event Date/Time:

- Planned Transportation Date/Time set on corresponding Stop of the Freight


Order or Freight Booking

SAP TM Event Message Trigger:

- Departure Event is sent in case of Execution Information Event Departure


status or information was changed
- Event update was not initiated from SAP EM

SAP EM Rule Set:

- Set Transportation Status to IN_TRANSIT (In Transit)


- Update EH with Geo Data from the Event Message

Arrival at EE Relevance:
Destination
- Stop category = inbound
- Corresponding Stage Planning Status = Planned

Expected Event Date/Time:

- Planned Transportation Date/Time set on corresponding Stop of the Freight


Order or Freight Booking

SAP TM Event Message Trigger:

- Arrival at Destination Event is sent in case of Execution Information Event


Arrival at Destination status or information was changed
- Event update was not initiated from SAP EM
(C) SAP AG Page 22 of 43
SAP EM Rule Set:

- Set Transportation Status = ARRIVED (Arrived)


- Update EE with Geo Data

Unloading EE Relevance:
Begin
- Stop Category = inbound

Expected Event Date/Time:

- Assignment Start-Date of the corresponding Stop

SAP TM Event Message Trigger:

- Unloading Begin Event is sent in case of Execution Information Event


“Unloading Begin” status or information was changed
- Event update was not initiated from SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was re-processed
- Set Transportation Status to UNLOADED (Unloaded)

Unloading End EE Relevance:

- Stop Category = inbound

Expected Event Date/Time:

- Assignment End-Date of the corresponding Stop

SAP TM Event Message Trigger:

- The Unloading End Event is sent in case of Execution Information


Unloading End status or information was changed
- Event update was not initiated from SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was re-processed
- Set Transportation Status to ARRIVED (Arrived)

(C) SAP AG Page 23 of 43


Unexpected Events
Unexpected Condition
Event
Damage SAP TM Event Message Trigger:

- Supported via SAP EM WebUI

SAP EM Rule Set:

- Create Alert
- Update EH with Geo Data from the Event Message
- Update Execution Information in SAP TM

Delay Freight SAP TM Event Message Trigger:


Unit
- Supported via SAP EM WebUI

SAP EM Rule Set:

- EVM Parameter Update


- Update Execution Information in SAP TM
- Set Delivery Status to DELAYED (Delayed)
- Create Alert
- Update EH with Geo Data from the Event Message

Cancel EE Relevance:

- Document Lifecycle Status = cancelled or Document deleted in SAP TM

SAP TM Event Message Trigger:

- Document has been cancelled or deleted in SAP TM

SAP EM Rule Set:

- Set Transportation Status to CANCELLED (cancelled)


- Deactivate EH  EH deletion Flag is set in SAP EM

Block for Relevance:


Execution
- If an execution block on a FU exists the event is relevant in case it’s a new
block or one existing block reason has changed
- Following Blocks are supported:

EM Control Parameter =
Block Reason Category Reason Code
Execution Blocked by Air Cargo Security Check ODT30_BRC_ACS_CHK
Execution Blocked by Capacity Check ODT30_BRC_CAPA_CHECK
Execution Blocked by Compliance Check ODT30_BRC_COMPL_CHK
Execution Blocked by Customs Relevance Check ODT30_BRC_CUST_REL
Execution Blocked by Dangerous Goods Check ODT30_BRC_DG_CHECKFU
Execution Blocked by Discrepancy Report ODT30_BRC_DISCR_REP
Execution Blocked by Incompatibilities Check ODT30_BRC_INC_CHECK
Execution Blocked by Discrepancy Report of
Predecessor Document ODT30_BRC_PCS_DISCR
Execution Blocked by Execution Block of
Predecessor Document ODT30_BRC_PCS_DOC_E
Execution Blocked by Planning Block of ODT30_BRC_PCS_DOC_P
(C) SAP AG Page 24 of 43
Predecessor Document
Execution Blocked by Manual Execution Block ODT30_BRC_MAN_EXEC
Execution Blocked by Manual Planning Block ODT30_BRC_MAN_PLAN

SAP TM Event Message Trigger:

- New Block on FU, FO or BO


- One of the supported Blocks is added or changed

SAP EM Rule Set:

- Set Transportation Status to BLOCKED (Blocked)


- EVM Parameter Update

SAP TM 9.0 SP2 Enhancement:

- Event ID: BLOCK_FOR_EXEC:


o The Event Message for the Blocking Event was enhanced with the
corresponding reason code from TM
o Event Type ODT30_BLOCK will replace the ODT20_BLOCK

Unblock for Relevance:


Execution
- Execution Block has been resolved

SAP TM Event Message Trigger:

- Document changed from Blocked to Unblocked Status for the supported


Block Categories

SAP EM Rule Set:

- Set Block Status to NOT_BLOCKED (Not Blocked)


- EVM Parameter Update

SAP TM 9.0 SP2 Enhancement:

- Event ID: UNBLOCK_FOR_EXEC


o Event Type ODT30_UNBLOCK will replace the ODT20_UNBLOCK

Freight Order and Freight Booking


Condition Freight Booking Stops:

Expected events for freight booking are only extracted for the planning relevant stops, i.e. in case of a
booking with consolidation the following expected events will only be extracted for the outbound stop
at the source consolidation stop and the inbound stop at the destination consolidation stop. No
expected events for the stops at the port are extracted in the standard.

Expected Events
Expected Condition
Event
Loading Begin EE Relevance:

- Stop Category = outbound


(C) SAP AG Page 25 of 43
- Loading activity at this Stop

Expected Event Date/Time:

- Loading activity Start Date/Time

SAP TM Event Message Trigger:

- SAP TM Execution information for the Loading Begin Event changed and
the Event Source was not SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
the Sender System was not SAP TM

Loading End EE Relevance:

- Stop Category = outbound


- Loading activity at this Stop

Expected Event Date/Time:

- Loading activity End Date/Time

SAP TM Event Message Trigger:

- SAP TM Execution information for the Loading End Event changed and the
Event Source was not SAP EM

SAP EM Rule Set:

- Set Transportation Status to LOADED (Loaded)


- Update EH with Geo Data from the Event Message
- Update Execution Information in SAP TM if EH was not re-processed and
the Sender System was not SAP TM

Proof of Pickup EE Relevance:

- Proof of Delivery (POPU) Event is related to the Loading End Event from
SAP TM. The POPU Expected Event is generated in SAP EM based on the
information sent with the Loading End Event. Without Loading End Event
no Expected Event for POPU is generated.

Expected Event Date/Time:

- Generated in EM from Loading End Expected Event  Add 2h to Expected


Event Date/Time of Loading End.

SAP TM Event Message Trigger:

- LOADING_END Event as pre-requisite for POPU generation in SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
the Sender System was not SAP TM
- Set Transportation Status to LOADING_CHECKED 'Loading Checked'

(C) SAP AG Page 26 of 43


Departure EE Relevance:

- Stop Category = outbound

Expected Event Date/Time:

- Planned Transportation Date/Time set on corresponding Stop

SAP TM Event Message Trigger:

- SAP TM Execution information for the Departure Event changed and the
Event Source was not SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed
- Set Transportation Status to IN_TRANSIT (In Transit)

Clear Customs EE Relevance:

- Document is customs relevant

SAP TM Event Message Trigger:

- Clear Customs Event will not be reported out of SAP TM


- Event reporting is expected e.g. via external Customs System

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
the Sender System was not SAP TM
- Set Transportation Status to CUSTOMS_CLEARED_IMP (Customs
Cleared Import)

Arrival at EE Relevance:
Destination
- Stop Category = inbound

Expected Event Date/Time:

- Planned Transportation Date/Time set on corresponding Stop

SAP TM Event Message Trigger:

- SAP TM Execution information for the Arrival at Destination Event changed


and the Event Source was not SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed
- Set Transportation Status to ARRIVED (Arrived)

Unloading EE Relevance:
Begin
- Stop Category = inbound
- Unloading activity at this Stop

Expected Event Date/Time:


(C) SAP AG Page 27 of 43
- Unloading activity Start Date/Time

SAP TM Event Message Trigger:

- SAP TM Execution information for the Unloading Begin Event changed and
the Event Source was not SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
Sender System was not SAP TM
- Set Transportation Status to ARRIVED 'Arrived'

Unloading End EE Relevance:

- Stop Category = inbound


- Unloading activity at this Stop

Expected Event Date/Time:

- Unloading activity End Date/Time

SAP TM Event Message Trigger:

- SAP TM Execution information for the Unloading End Event changed and
the Event Source was not SAP EM

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
Sender System was not SAP TM
- Set Transportation Status to UNLOADED 'Unloaded'

Proof of EE Relevance:
Delivery
- Proof of Delivery (POD) Event is related to the Unloading End Event from
SAP TM. The POD Expected Event is generated in SAP EM based on the
information sent with the Unloading End Event. Without Unloading End
Event no Expected Event for POD is generated.

Expected Event Date/Time:

- Generated in EM from Unloading End Expected Event  Add 2h to


Expected Event Date/Time of the UNLOADING_END Event

SAP TM Event Message Trigger:

- SAP TM Execution information for the Unloading End Event changed and
the Event Source was SAP TM or change was propagated from successor
document

SAP EM Rule Set:

- Update EH with Geo Data from the Event Message


- Update Execution Information in SAP TM if EH was not re-processed and
the Sender System was not SAP TM
- Set Transportation Status to DELIVERED (Delivered)

(C) SAP AG Page 28 of 43


Unexpected Events
Unexpected Condition
Event
Delay SAP TM Trigger:

- Supported via SAP EM WebUI

Rule Set:

- EVM Parameter Update


- Update EH with Geo Data from the Event Message
- Update Execution Information in SAP TM if EH was not re-processed
- Create Alert
- Set Delivery Status to DELAYED (Delayed)

Cancel EE Relevance:

- Document Lifecycle Status = cancelled or Document deleted in SAP TM

SAP TM Event Message Trigger:

- Document has been cancelled or deleted in SAP TM

SAP EM Rule Set:

- Set Transportation Status to CANCELLED (cancelled)


- Deactivate EH  EH deletion Flag is set in SAP EM

Block for Relevance:


Execution
- If an execution block on FO or BO exists the event is relevant in case it’s a
new block or one existing block reason has changed
- Following Blocks are supported:

EM Control Parameter =
Block Reason Category Reason Code
Execution Blocked by Air Cargo Security Check ODT30_BRC_ACS_CHK
Execution Blocked by Capacity Check ODT30_BRC_CAPA_CHECK
Execution Blocked by Compliance Check ODT30_BRC_COMPL_CHK
Execution Blocked by Customs Relevance Check ODT30_BRC_CUST_REL
Execution Blocked by Dangerous Goods Check ODT30_BRC_DG_CHECKFO
Execution Blocked by Discrepancy Report ODT30_BRC_DISCR_REP
Execution Blocked by Incompatibilities Check ODT30_BRC_INC_CHECK
Execution Blocked by Discrepancy Report of
Predecessor Document ODT30_BRC_PCS_DISCR
Execution Blocked by Execution Block of
Predecessor Document ODT30_BRC_PCS_DOC_E
Execution Blocked by Planning Block of
Predecessor Document ODT30_BRC_PCS_DOC_P
Execution Blocked by Manual Execution Block ODT30_BRC_MAN_EXEC
Execution Blocked by Manual Planning Block ODT30_BRC_MAN_PLAN

SAP TM Event Message Trigger:

- New Block on FU, FO or BO


(C) SAP AG Page 29 of 43
- One of the supported Blocks is added or changed

SAP EM Rule Set:

- Set Transportation Status to BLOCKED (Blocked)


- EVM Parameter Update

SAP TM 9.0 SP2 Enhancement:

- Event ID: BLOCK_FOR_EXEC:


o The Event Message for the Blocking Event was enhanced with the
corresponding reason code from TM
o Event Type ODT30_BLOCK will replace the ODT20_BLOCK

Unblock for Relevance:


Execution
- Execution Block has been resolved

SAP TM Event Message Trigger:

- Document changed from Blocked to Unblocked Status for the supported


Block Categories

SAP EM Rule Set:

- Set Block Status to NOT_BLOCKED (Not Blocked)


- EVM Parameter Update

SAP TM 9.0 SP2 Enhancement:

- Event ID: UNBLOCK_FOR_EXEC


o Event Type ODT30_UNBLOCK will replace the ODT20_UNBLOCK

(C) SAP AG Page 30 of 43


Events supporting Geo Coordinates
NOTE:
The Enhancement of the Event Messages with the additional Parameter for the Geo Coordinates is
the prerequisite for the Geo Map Usage in SAP EM 9.0.

Expected Events
Event Event Code SAP TM Event Type SAP TM 9.0 SP 2 Enhancement

Loading LOAD_BEGIN ODT20_TO_LOAD_BEGIN Yes – TM & Web UI


Begin

Loading LOAD_END ODT20_TO_LOAD_END Yes – TM & Web UI


End

Proof of POPU ODT20_TO_POPU Yes


Pickup

Departure DEPARTURE ODT20_TO_DEPART Yes

Clear CLEAR_CUST na Clear Customs is not supported


Customs OMS from SAP TM or via Web UI.

The Clear Customs Event


Message can be e.g. received
from an external Customs
System. If the Geo Coordinates
are included the information is
considered in SAP EM.
Arrival at ARRIV_DEST ODT20_TO_ARRIVAL Yes
Destination

Unloading UNLOAD_BEG ODT20_TO_UNL_BEGIN Yes – TM & Web UI


Begin IN

Unloading UNLOAD_END ODT20_TO_UNL_END Yes – TM & Web UI


End

Proof of POD ODT20_TO_POD Yes – TM & Web UI


Delivery

Unexpected Events
Event Event Code SAP TM Event Type SAP TM 9.0 SP 2 Enhancement

Damage DAMAGE na via Web UI

Delay DELAYED na via Web UI

Delay DELAYED_FU na via Web UI


Freight
Unit

(C) SAP AG Page 31 of 43


Tracking Scenario: Instructions

Expected Events
EH Type Expected Events Instruction Status Attribute Values

Event Event Code

Execution EXECUTION - PENDING (Initial Status)


Instructions - IN_PROGRESS
(ODT30_INS) - COMPLETED
- COMPLETED_AFTER_DUEDATE
- ALERT
- OVERDUE

Generation Rules
The following table provides an overview on how the EE in SAP EM are generated and how the EE
and Message Date is determined.

Expected Event Sequence Generated from EE Date Event Msg. Date


EXECUTION 100 EXECUTION from Application System No Date

Event Details
The following chapter provides a detailed overview on the existing Expected and Unexpected Events
which are supported in the SAP TM – SAP EM tracking scenarios for Freight Unit, Freight Oder and
Freight Booking.

- AO Relevance: what is the pre-requisite that an Instruction record is considered to be sent to


SAP EM
- EE Relevance: what is the pre-requisite that an EE is considered to be sent to SAP EM
- Expected Event Date/Time: Which date is assigned to the EE Date/Time for SAP EM
tracking of the corresponding event. This information is used in SAP EM for the overdue
monitoring and therefore the essential information for e.g. follow up activities and alerting if an
EE changes into status overdue
- SAP TM Event Message Trigger: At which point in time is the actual Event Message sent
from SAP TM to SAP EM
- SAP EM Rule Set: Configured Rules in SAP EM when receiving a specific Event Message –
in the corresponding rule set activities are defined which are executed if the Event Message is
processed
- SAP EM Update Activity 2: Event handler update activity that is performed after updating an
event handler
- SAP EM Overdue Monitoring: The instruction tracking scenario includes also an EE
Monitoring Activity in the EE Profile which is used to report the status Alert and Overdue to
SAP TM based on the Due and Alert Date provided from SAP TM

(C) SAP AG Page 32 of 43


Expected Condition
Event
EXECUTION AO Relevance:

- An Instruction is always relevant for SAP EM tracking if Due Date, Status


and Description are not initial and Instruction is of type “Task” (Type
“Information” is ignored for SAP EM tracking)

EE Relevance and EE Date/Time:

- Due Date must be available in order to transmit an instruction record to


SAP EM
- Each instruction sent to SAP EM will always has the EE “EXECUTION”
- Depending if the Alert Date has been set  which is before the Due Date
o Alert Date set: EE Date is set to the Alert Date
o Alert Date cannot be determined: EE Date is set to Due Date

NOTE: In SAP TM it’s not possible to set the Due and Alert Date before the current
Date. The Alert Date must always be equal to or before the Due Date.

SAP TM Event Message Trigger:

- New instruction has been created or the status for an existing Instruction
has been changed

SAP EM Rule Set:

- Event Message with Status PENDING, IN_PROGRESS will reset the EE


Execution in SAP EM to indicate that a final status from SAP TM has not
yet been reported – Status Attribute will be updated via Update Activity 2

- Event Messages which report the status ALERT will reset the EE Execution
and update the EE Date/Time with the Instruction Due Date set in SAP TM
(Status Alert should normally only be set in SAP EM in the overdue
monitoring process)

- Event Messages reporting status COMPLETED and


COMPLETED_AFTER_DUEDATE will update the EE (reported EE Event).
In case of status COMPLETED there will be an additional check if the
completion date is before the Due Date – if this is not the case the system
will also update the Status Attribute to COMPLETED_AFTER_DUEDATE.
The Instruction Tracking process is at the moment only supported with SAP
TM. If the status in SAP TM is set to COMPLETED the system checks
automatically if the Completion Date is before the Due Date and determine
the appropriate Completion status

NOTE: Only an Event Message reporting the status COMPLETED will change the
EE Status to Reported EE.

(C) SAP AG Page 33 of 43


SAP EM Update Activity 2:

- Instruction EH with status parameter PENDING = 1 and IN_PROGRESS =


2 will update the Status Attribute ODT30_INS_EXECUTION with the
appropriate Status value
- For Instruction EH with status parameter COMPLETED = 3 the status
attribute value is set to COMPLETED
o There is an additional check if the Completion Date is after the Due
Date the status attribute value is set to
COMPLETED_AFTER_DUEDATE (Status Completed after Due
Date should normally automatically determined in SAP TM)
- For Instruction EH with status parameter
COMPLETED_AFTER_DUEDATE = 6 the status attribute value is set to
COMPLETED_AFTER_DUEDATE
- For Instruction EH with status parameter ALERT = 4 the EH status attribute
is set to ALERT and the EE Date/Time is set to the Instruction Due Date
from SAP TM (Status Alert should normally only be set in SAP EM in the
overdue monitoring process)
- For Instruction EH with status parameter OVERDUE = 5 the status attribute
value is set to OVERDUE (Status Overdue should normally only be set in
SAP EM in the overdue monitoring process)

SAP EM Overdue Monitoring:

- Monitoring Activity is used for all EE with Event Code „EXECUTION”


- If the EE Date is already set to the Instruction Due Date the Status Attribute
and the Instruction status in SAP TM is set to OVERDUE
- If the EE Date was set to the Alert Date (Check will only be performed if EE
Date is not Due Date) the Instruction Status Attribute and the Instruction
status in SAP TM is set to Alert. Afterwards the EE Date is updated with the
Instruction Due Date  in the next run of the Overdue Monitor when the
EE is captured the status will then set to Overdue

NOTE: Only in case the EE status changes to Overdue the status is set to Overdue
EE.

(C) SAP AG Page 34 of 43


Overdue Monitoring

ODT30_INS_EXECUTION à EE Monitor

EE Monitor
/SAPTRX/
EE_MONITOR

Instruction with
ExpEvtDate < No END
current date found

Yes

CHECK EVENT
„EXECUTION“

Check if ExpEvtDate Check if ExpEvtDate


= Due Date No = Alert Date
(<EXP_EVENT- (<EXP_EVENT-
DATETIME1>) DATETIME2>

Yes

SET EM STATUS: SET EM STATUS:

1. PARAM: ODT30_INS_STATUS = 5 1. PARAM: ODT30_INS_STATUS = 4


2. Stat. Attrib. = OVERDUE 2. Stat. Attrib. = ALERT

SET EM ExpEvtDate:
ExpEvtDate = DueDate (<EXP_EVENT-
DATETIME1>)

SET TM STATUS: SET TM STATUS:


Call Rem. Func. Mod. Call Rem. Func. Mod.
/scmtms/update_instruct_status /scmtms/update_instruct_status
Status = 5 Overdue Status = 4 Alert

END END

Activity: ODT30_INS_EXECUTION

(C) SAP AG Page 35 of 43


BAdI: Update Event Handler Data
BAdI Implementations will be shipped inactive. In order to use the corresponding implementation
please activate the BAdI Implementation.

The BAdI Implementation is used for the correct display of the Date and Time Information from SAP
TM.

Event Management  Business Add-Ins for SAP Event Management  BAdI: Update Event Handler
Data

Enhancement
Implementation BAdI Implementation Description
/SAPTRX/GEN_EH_S_IMPL /SAPTRX/GEN_EH_S_IMPL Generic Implementation for BAdI
/SAPTRX/BADI_EH_S

(C) SAP AG Page 36 of 43


Appendix

Trouble Shooting
Symptom Solution
Event Message not propagated correctly from SAP Note 1756885
SAP EM to SAP TM
Short dump when starting the SAP EM web Execute transaction /SAPTRX/UCCF once to
interface for the first time initially trigger the creation of the web interface
parameter dictionary

Deletion and Deactivation of Event Handlers in SAP EM


SAP TM Deletion Setting

Freight Order
SAP Transportation Management  Transportation Management  Freight Order Management 
Freight Order  Define Freight Order Types

Freight Booking
SAP Transportation Management  Transportation Management  Freight Order Management 
Freight Booking  Define Freight Booking Types

(C) SAP AG Page 37 of 43


Freight Unit
SAP Transportation Management  Transportation Management  Planning  Freight Unit 
Define Freight Unit Types

Overview Deletion and Deactivation in SAP EM


The following table describes the different process in SAP EM in regards of EH deactivation and soft
deletion depending on the customizing settings in SAP TM.

NOTE:
In case obsolete documents in SAP TM are canceled the above described customizing settings
determine if the document is being deleted physically or if only the lifecycle status is set to “canceled”.

SAP TM Basic Deletion SAP EM Behavior


Setting Setting
Booking Can Be No 1.) Rule Set: ODT30_TO_CANCEL
Deleted
EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

Freight Order Can No 1.) Rule Set: ODT30_TO_CANCEL


Be Deleted
EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

2.) EH Update Activity 2: ODT20_TO_UPDATE_ACT

Activity: TM_DELETE_FU_EH
AO Type: ODT30_FU
FU ID: <CNTRL-ODT20_FU_ID_TO_BE_DELETED>

Control Parameter “FU_ID_TO_BE_DELETED” is only set for


Freight Orders “Direct Shipment Options”. The Control Parameter is
used to determine the related Freight Units for deletion in SAP EM.

The Freight Unit in SAP TM will be converted into a Freight Order in


case of a direct shipment option. The Freight Unit in SAP TM does
not exist anymore and therefore the SAP EM EH for the Freight Unit
must be deleted when the new EH for the Freight Order is created in
SAP EM.

EH will be deleted (Soft deletion)  /SAPTRX/EH_HEADER-


EH_DELETED = “X“

Freight Unit Can No 1.) Rule Set: ODT30_FU_CANCEL


Be Deleted
EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

Booking Can Be Yes 1.) Deletion information is sent from SAP TM:
Deleted
Function Module: /SAPTRX/BAPI_EH_POST
Table: APPLOBJECTS  /SAPTRX/BAPI_APPLOBJ_IDENT-
(C) SAP AG Page 38 of 43
UPDATE_INDICATOR = “D”

2.) SAP EM EH Update:

EH will be deleted (Soft deletion)  /SAPTRX/EH_HEADER-


EH_DELETED = “D“

EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

Freight Order Can Yes 1.) Deletion information is sent from SAP TM:
Be Deleted
Function Module: /SAPTRX/BAPI_EH_POST
Table: APPLOBJECTS  /SAPTRX/BAPI_APPLOBJ_IDENT-
UPDATE_INDICATOR = “D”

2.) SAP EM EH Update:

EH will be deleted (Soft deletion)  /SAPTRX/EH_HEADER-


EH_DELETED = “D“

EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

Freight Unit Can Yes 1.) Deletion information is sent from SAP TM:
Be Deleted
Function Module: /SAPTRX/BAPI_EH_POST
Table: APPLOBJECTS  /SAPTRX/BAPI_APPLOBJ_IDENT-
UPDATE_INDICATOR = “D”

2.) SAP EM EH Update:

EH will be deleted (Soft deletion)  /SAPTRX/EH_HEADER-


EH_DELETED = “D“

EH will be deactivated  /SAPTRX/EH_HEADER-EH_ACTIVE = “ “

The EH which are inactive are flagged as deleted are still in the SAP EM database. For the latest
documentation about archiving and deleting objects in SAP Event Management, see

SAP Library at  http://help.sap.com  SAP Business Suite  SAP Event Management  SAP
Event Management 9.0  Application Help  English  Administration  Data Archiving

(C) SAP AG Page 39 of 43


Freight Unit Type: Settings for SAP EM

1.
.

2.
.
3.
.

Execution Tracking:

1. Execution Tracking Relevance

Indicator for controlling the tracking of documents.

Use

If you want to track certain types of documents, choose 2 (Execution Tracking) or 3 (Execution
Tracking with External Event Management). The system then sets the initial document execution
status Not Started.

If you do not want to track certain types of documents, choose 1 (No Execution Tracking).The system
then sets the initial document execution status Not Relevant.

2. Application Object Type

Application Object Type

Type of application object to be tracked on the application system (necessary for determining event
management relevance for an application object). The Event Manager only processes event
messages for these objects.

Example

Examples of application objects are a shipment, delivery, handling unit of delivery, or equipment. The
application object type defines this character. You may, for example distingush between standard euro
pallets and special pallets for shipping larger items and define different application object types for it.

3. Last Exp. Event

Last Expected Event for Execution of a Document

Last expected event for a document, for example, the expected event Unload_End.

Use

If this expected event is sent from the destination stop of a document, the document is finished from
an execution perspective.

Dependencies

The system changes the execution status of the document to Executed.

(C) SAP AG Page 40 of 43


Freight Order: Settings for SAP EM

1.
.

2.
.

3.
.
4.
.

Execution Tracking:

1. Execution Tracking Relevance

Indicator for controlling the tracking of documents.

Use

If you want to track certain types of documents, choose 2 (Execution Tracking) or 3 (Execution
Tracking with External Event Management). The system then sets the initial document execution
status Not Started.

If you do not want to track certain types of documents, choose 1 (No Execution Tracking).The system
then sets the initial document execution status Not Relevant.

2. Propagate Execution Info

Propagate Execution Information to Predecessor Document

Indicates if an event that is reported for a freight order, a freight booking, or a transportation unit is to
be propagated to the predecessor documents.

Use

Select this checkbox to enable the propagation of events to the predecessor documents.

Dependencies

This customizing setting is only used in case the execution tracking relevance is not set to ‘No Execution
Tracking’.

Example

The event Loading Begin is reported for a a certain stop of a freight order. If you have selected this
checkbox, the event ist propagated to the freight units that are assigned at this stop.

3. Application Object Type

Application Object Type

Type of application object to be tracked on the application system (necessary for determining event
management relevance for an application object). The Event Manager only processes event
messages for these objects.

(C) SAP AG Page 41 of 43


Example

Examples of application objects are a shipment, delivery, handling unit of delivery, or equipment. The
application object type defines this character. You may, for example distingush between standard euro
pallets and special pallets for shipping larger items and define different application object types for it.

4. Last Exp. Event

Last Expected Event for Execution of a Document

Last expected event for a document, for example, the expected event Unload_End.

Use

If this expected event is sent from the destination stop of a document, the document is finished from
an execution perspective.

Dependencies

The system changes the execution status of the document to Executed.

Freight Booking: Settings for SAP EM

1.
.
2.
.

3.

4.
.
Execution Tracking:

1. Execution Tracking Relevance

Indicator for controlling the tracking of documents.

Use

If you want to track certain types of documents, choose 2 (Execution Tracking) or 3 (Execution
Tracking with External Event Management). The system then sets the initial document execution
status Not Started.

If you do not want to track certain types of documents, choose 1 (No Execution Tracking).The system
then sets the initial document execution status Not Relevant.

2. Propagate Execution Info

Propagate Execution Information to Predecessor Document

Indicates if an event that is reported for a freight order, a freight booking, or a transportation unit is to
be propagated to the predecessor documents.

Use
(C) SAP AG Page 42 of 43
Select this checkbox to enable the propagation of events to the predecessor documents.

Dependencies

This customizing setting is only used in case the execution tracking relevance is not set to ‘No Execution
Tracking’.

Example

The event Loading Begin is reported for a certain stop of a freight order. If you have selected this checkbox,
the event is propagated to the freight units that are assigned at this stop.

3. Application Object Type

Application Object Type

Type of application object to be tracked on the application system (necessary for determining event
management relevance for an application object). The Event Manager only processes event messages for
these objects.

Example

Examples of application objects are a shipment, delivery, handling unit of delivery, or equipment. The
application object type defines this character. You may, for example distingush between standard euro
pallets and special pallets for shipping larger items and define different application object types for it.

4. Last Exp. Event

Last Expected Event for Execution of a Document

Last expected event for a document, for example, the expected event Unload_End.

Use

If this expected event is sent from the destination stop of a document, the document is finished from an
execution perspective.

Dependencies

The system changes the execution status of the document to Executed.

(C) SAP AG Page 43 of 43

You might also like