SAP Event Management - Scenarios for SAP Transportation Management
Short Description
SAP Event Management...
Description
SAP Event Management Scenarios for SAP Transportation Management
A guide for administrators administrators and consultants consultants
Release: SAP EM 9.0, SAP TM 9.0 Version: 1.3
PUBLIC Document Version: December 2013
(C) SAP AG
Page 1 of 45
Copyright © Copyright 2013 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 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 Adobe logo, Acrobat, Acrobat, PostScript, and and Reader Reader are trademarks or or registered trademarks trademarks of Adobe Systems Systems Incorporated in the United States States and other 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, 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. Technology. Apple, App Store, Store, iBooks, iPad, iPad, iPhone, iPhoto, iPhoto, iPod, iTunes, iTunes, Multi-Touch, Multi-Touch, Objective-C, Retina, 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 Mobile Updater, Updater, Google Mobile, Mobile, Google Google Store, Google Google Sync, Google Google Updater, Google 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 45
Copyright © Copyright 2013 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 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 Adobe logo, Acrobat, Acrobat, PostScript, and and Reader Reader are trademarks or or registered trademarks trademarks of Adobe Systems Systems Incorporated in the United States States and other 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, 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. Technology. Apple, App Store, Store, iBooks, iPad, iPad, iPhone, iPhoto, iPhoto, iPod, iTunes, iTunes, Multi-Touch, Multi-Touch, Objective-C, Retina, 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 Mobile Updater, Updater, Google Mobile, Mobile, Google Google Store, Google Google Sync, Google Google Updater, Google 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 45
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 r egistered trademarks trademarks of Crossgate AG in Germany Germany and other countries. Crossgate Crossgate is an SAP company. company. All other product product and service names names mentioned mentioned are the trademarks of their their respective companies. companies. Data contained in this document serves informational 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 45
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 ........................................................... ....................................................................................................................... ............................................................ 10 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, fr eight order and freight booking ............................................... 12 Enhancement Enhancement possibilities for custom updates in TM ................................................................... ................................................................... 13 BAdI /SCMTMS/TOR_EVENT_PROC /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 Generation Rules ........................................................... ................................................................................................. ...................................... 20 Freight Unit .................................................................................................................................... .................................................................................................................................... 20 Freight Order and Freight Booking .......................................................... ................................................................................................ ...................................... 20 Event Details....................................... 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....................................... Details........................................................................................................... ............................................................................................... ........................... 32 Overdue Monitoring ............................................................................................ ....................................................................................................................... ........................... 35 (C) SAP AG
Page 4 of 45
BAdI: Update Event Handler Data ..................................................................................................... 36 BAdI: /SCMTMS/SEND_TOR_DATA ................................................................................................ 36 Appendix................................................................................................................................................ 39 Trouble Shooting ............................................................................................................................... 39 Deletion and Deactivation of Event Handlers in SAP EM ................................................................. 39 SAP TM Deletion Setting ............................................................................................................... 39 Overview Deletion and Deactivation in SAP EM ........................................................................... 40 Freight Unit Type: Settings for SAP EM ............................................................................................ 42 Freight Order: Settings for SAP EM .................................................................................................. 43 Freight Booking: Settings for SAP EM .............................................................................................. 44
(C) SAP AG
Page 5 of 45
Related Documents Document Type
Document Name (Link)
Version
Solution Manager Document
SAP TM – EM Integration Guide
TM 9.0
Solution Manager Document
SAP TM – EM Integration Guide
TM 9.1
SAP_TM_Resource_Tracking_for_EM
Resource Tracking Scenario for SAP Transportation Management https://scn.sap.com/docs/DOC-49069
SCN Document
Event Date Filter Selection http://scn.sap.com/docs/DOC-48806
SCN Document
Multiple Tracking IDs http://scn.sap.com/docs/DOC-48805 SAP EM 9.0 SP4 Features
SCN Document
http://scn.sap.com/message/14502647#14502647
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
1841552
No possibility for asynchronous data extraction for SAP EM
Document History Document Version
Changes
Date
1.0
Document Created
21-Nov-2012
1.1
(C) SAP AG
New chapter Time References within SAP TM - EM Integration Chapter “Updating data in TM by new execution event” revised and extended
14-Dec-2012
Page 6 of 45
Added chapters:
1.3
-
Tracking Scenario: Resources Tracking Scenario: Transportation Units BAdI: /SCMTMS/SEND_TOR_DATA
Changed chapters: -
(C) SAP AG
Overview Related Documents
Page 7 of 45
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 t hese 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 related visibility processes provided with SAP EM 9.0 SP4 are:
Transportation Unit Visibility Process Resource Tracking Visibility Process
For the details of the Resource Tracking and Transportation Unit Visibility process please see the separate document SAP_TM_Resource_Tracking_for_EM.
(C) SAP AG
Page 8 of 45
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.
The following events and status updates are provided with the standard in EM 9.0:
Events: Freight Order and Freight Booking Expected Events
Event
Event Code
Transportation Status
Loading Begin
LOAD_BEGIN
n. c.
Loading End
LOAD_END
LOADED
Proof of Pickup
POPU
LOADING_CHE CKED
Departure
DEPARTURE
IN_TRANSIT
Clear Customs
CLEAR_CUSTOMS
Arrival at Destination
ARRIV_DEST
ARRIVED
Unloading Begin
UNLOAD_BEGIN
ARRIVED
Unloading End
UNLOAD_END
UNLOADED
Proof of Delivery
POD
DELIVERED
CUSTOMS_CLE ARED_IMP
Delivery Status
Block Status
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
n. c.
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 an d is not identical with the “delivery status” in TM.
(C) SAP AG
Page 9 of 45
Unexpected Events
Event
Event Code
Transportatio n Status
Delivery Status
Block 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 Execution
UNBLOCK_FOR_EXE C
n. c.
n. c.
NOT_BLOCKE D
Events: Freight Unit Expected Events
Event
Event Code
Transp. Status
Delivery Status
Block 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.
Event
Event Code
Transportation Status
Delivery Status
Block 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 Execution
UNBLOCK_FOR_EXE C
n.c.
n.c.
NOT_BLOCKE D
Unexpected Events
(C) SAP AG
Page 10 of 45
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 EM FU
Option 3 TM FU
TM FO
TM FU
EM FO
Option 2 EM FO
TM FO
EM FO
EM FU
Option 4 TM FO
TM FU
EM FU
TM FO
TM FU
EM FU
EM FO
Event Type Send Event Message TM Update
(C) SAP AG
Page 11 of 45
1.
2.
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 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 45
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 Departure Arrival at Destination Unloading Begin Unloading End
18 ( Loaded ) 20 ( Departed ) 06 ( Arrived ) 10 ( Partially Unloaded ) 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.
2.
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: http://scn.sap.com/docs/DOC-34509 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. I f 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 45
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 prereq uisite 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 45
Time References within SAP TM - EM Integration Date/Time Reference Actual Event Date
Available
Remarks
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 t erm 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 45
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 45
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 45
Sample Scenario “International Outbound Transportation” “International Outbound Transportation” i s one of the sample scenarios provided for SAP Transportation Management (see also guide in Solution Manger Content for TM). Pre-Carriage
Main-Carriage
Ocean Carrier IOT-CR-02
Truck Carrier BP: IOT-CR-01
Scheduled 1
FREIGHT ORDER , BOOKING ORDER
Carrier BP: IOT-CR-03
Port of Discharge IOT-NLRM (Rotterdam)
Port of Loading IOT-USNEK (Newark)
Shipper U.S. BP: IOT-CU-01
FREIGHT UNIT
On-Carriage
Loading Begin
Loading End
Departure
Arrival
2
3
4
5
6
7
Loading Begin
Loading End
Proof of Pickup
Departure
Clear Customs
Arrival
1
2
3
4
5
6
Unloading Unloading Begin End
…….
Damage
Consignee
BP: IOT-CU-02
…….
Arrival 9
8
…….
Delay
…….
7
Expected Event
Unloading Unloading Begin End 10
11
Unloading End
Proof of Delivery
8
9
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 45
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 ODT30_BL – Bill of Lading
Tracking IDs:
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 45
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 same Location (LOAD_END) + 2h
EE Date + 24h
DEPARTURE
400
DEPARTURE
from Application System
EE Date + 24h relative to previous Event (POPU)
CLEAR_CUSTOMS
500
CLEAR_CUSTO MS
from Application System
EE Date + 24h
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 same Location (UNLOAD_END) + 2h
EE Date + 24h
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 45
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 Event Scheduled
Condition 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 the planning status has been changed from any other status Partially Planned" or "Not Ready for Planning" to "Planned"
when except "Not
SAP EM Rule Set:
Loading Begin
Set Transportation Status to SCHEDULED (Scheduled)
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 45
Loading End
Update EH with Geo Data from the Event Message Update Execution Information in SAP TM if EH was reprocessed
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:
Departure
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)
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:
Arrival Destination
at
Set Transportation Status to IN_TRANSIT (In Transit) Update EH with Geo Data from the Event Message
EE Relevance:
-
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:
(C) SAP AG
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 Page 22 of 45
SAP EM Rule Set:
Unloading Begin
Set Transportation Status = ARRIVED (Arrived) Update EE with Geo Data
EE Relevance:
-
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:
Unloading End
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)
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:
-
(C) SAP AG
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)
Page 23 of 45
Unexpected Events Unexpected Condition Event Damage SAP TM Event Message Trigger:
-
Supported via SAP EM WebUI
SAP EM Rule Set:
Delay Unit
Freight
Create Alert Update EH with Geo Data from the Event Message Update Execution Information in SAP TM
SAP TM Event Message Trigger:
-
Supported via SAP EM WebUI
SAP EM Rule Set:
Cancel
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
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:
Block Execution
for
Relevance:
-
(C) SAP AG
Set Transportation Status to CANCELLED (cancelled) Deactivate EH EH deletion Flag is set in SAP EM
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:
Block Reason Category
EM Control Reason Code
Parameter
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 Execution Blocked by Discrepancy Report of Predecessor Document Execution Blocked by Execution Block of Predecessor Document
ODT30_BRC_INC_CHECK
Execution Blocked by Planning Block of
ODT30_BRC_PCS_DOC_P
ODT30_BRC_PCS_DISCR ODT30_BRC_PCS_DOC_E Page 24 of 45
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:
-
Unblock Execution
for
Event ID: BLOCK_FOR_EXEC: The Event Message for the Blocking Event was enhanced with the o corresponding reason code from TM Event Type ODT30_BLOCK will replace the ODT20_BLOCK o
Relevance:
-
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 Event Type ODT30_UNBLOCK will replace the ODT20_UNBLOCK o
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 Event Loading Begin
Condition EE Relevance:
(C) SAP AG
Stop Category = outbound Page 25 of 45
-
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:
Loading End
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
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:
Proof of Pickup
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
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 Event Date/Time of Loading End.
Add
2h to Expected
SAP TM Event Message Trigger:
-
LOADING_END Event as pre-requisite for POPU generation in SAP EM
SAP EM Rule Set:
(C) SAP AG
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' Page 26 of 45
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:
Clear Customs
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)
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:
Arrival Destination
at
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)
EE Relevance:
-
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:
Unloading Begin
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)
EE Relevance:
-
Stop Category = inbound Unloading activity at this Stop
Expected Event Date/Time: (C) SAP AG
Page 27 of 45
-
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:
Unloading End
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'
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:
Proof Delivery
of
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'
EE Relevance:
-
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:
(C) SAP AG
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) Page 28 of 45
Unexpected Events Unexpected Condition Event Delay SAP TM Trigger:
-
Supported via SAP EM WebUI
Rule Set:
Cancel
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)
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:
Block Execution
for
Set Transportation Status to CANCELLED (cancelled) Deactivate EH EH deletion Flag is set in SAP EM
Relevance:
-
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:
Block Reason Category
EM Control Reason Code
Parameter
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 Execution Blocked by Discrepancy Report of Predecessor Document Execution Blocked by Execution Block of Predecessor Document Execution Blocked by Planning Block of Predecessor Document
ODT30_BRC_INC_CHECK
Execution Blocked by Manual Execution Block
ODT30_BRC_MAN_EXEC
Execution Blocked by Manual Planning Block
ODT30_BRC_MAN_PLAN
ODT30_BRC_PCS_DISCR ODT30_BRC_PCS_DOC_E ODT30_BRC_PCS_DOC_P
SAP TM Event Message Trigger:
(C) SAP AG
New Block on FU, FO or BO Page 29 of 45
-
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:
-
Unblock Execution
for
Event ID: BLOCK_FOR_EXEC: The Event Message for the Blocking Event was enhanced with the o corresponding reason code from TM Event Type ODT30_BLOCK will replace the ODT20_BLOCK o
Relevance:
-
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:
-
(C) SAP AG
Event ID: UNBLOCK_FOR_EXEC Event Type ODT30_UNBLOCK will replace the ODT20_UNBLOCK o
Page 30 of 45
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 Begin
LOAD_BEGIN
ODT20_TO_LOAD_BEGIN
Yes – TM & Web UI
Loading End
LOAD_END
ODT20_TO_LOAD_END
Yes – TM & Web UI
POPU
ODT20_TO_POPU
Yes
Departure
DEPARTURE
ODT20_TO_DEPART
Yes
Clear Customs
CLEAR_CUST OMS
na
Clear Customs is not supported from SAP TM or via Web UI.
Proof Pickup
of
Arrival at ARRIV_DEST Destination
ODT20_TO_ARRIVAL
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. Yes
Unloading Begin
UNLOAD_BEG IN
ODT20_TO_UNL_BEGIN
Yes – TM & Web UI
Unloading End
UNLOAD_END
ODT20_TO_UNL_END
Yes – TM & Web UI
Proof of Delivery
POD
ODT20_TO_POD
Yes – TM & Web UI
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 Freight Unit
DELAYED_FU
na
via Web UI
(C) SAP AG
Page 31 of 45
Tracking Scenario: Instructions Expected Events EH Type
Expected Events Event
Event Code
Execution
EXECUTION
Instructions (ODT30_INS)
Instruction Status Attribute Values
- - - - -
PENDING (Initial Status) IN_PROGRESS 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 scenario. -
-
-
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 45
Expected Event EXECUTION
Condition 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 Alert Date set: EE Date is set to the Alert Date o Alert Date cannot be determined: EE Date is set to Due Date o
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 45
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 There is an additional check if the Completion Date is after the Due o 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 45
Overdue Monitoring
ODT30_INS_EXECUTION à
EE Monitor
EE Monitor /SAPTRX/ EE_MONITOR
Instruction with ExpEvtDate < current date found
No
END
Yes
CHECK EVENT „EXECUTION“
Check if ExpEvtDate = Due Date ()
No
Check if ExpEvtDate = Alert Date (
Yes SET EM STATUS:
SET EM STATUS:
1. PARAM: ODT30_INS_STATUS = 5 2. Stat. Attrib. = OVERDUE
1. PARAM: ODT30_INS_STATUS = 4 2. Stat. Attrib. = ALERT
SET EM ExpEvtDate: ExpEvtDate = DueDate ()
SET TM STATUS: Call Rem. Func. Mod. /scmtms/update_instruct_status Status = 5 Overdue
SET TM STATUS: Call Rem. Func. Mod. /scmtms/update_instruct_status Status = 4 Alert
END
END
Activity: ODT30_INS_EXECUTION
(C) SAP AG
Page 35 of 45
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 Data
Business
Enhancement Implementation /SAPTRX/GEN_EH_S_IMPL
Add-Ins for SAP Event Management
BAdI Implementation /SAPTRX/GEN_EH_S_IMPL
BAdI:
Update Event Handler
Description Generic Implementation /SAPTRX/BADI_EH_S
for
BAdI
Tracking Scenario: Resources Please refer to the document Resource Tracking Scenario for SAP Transportation Management.
Tracking Scenario: Transportation Units Please refer to the document Resource Tracking Scenario for SAP Transportation Management.
BAdI: /SCMTMS/SEND_TOR_DATA This Business Add-In (BAdI) can be used in the Integration with Event Management (TM-INT-EM) component. If the BAdI is implemented and the BAdI Work Mode is set (see BAdI method documentation), the BAdI is called in the Method /SCMTMS/CL_EVENT_MANAGEMENT->SEND_TOR_DATA. BAdI methods: SET_BADI_WORK_MODE Use this method to control the work mode of a BAdI. Set the work mode for the corresponding BAdI method using the parameter CT_WORK_MODE. CALL_EVENT_MGR Add custom logic to fill Application Table and trigger the Event Manager Communication. Using this method you can re-sort and enrich the data for Event Management and execute separate calls to initiate different queues from TM to Event Management. GET_ADDITIONAL_DATA Retrieve Additional Data for Event Manager Communication. If the available number of application tables for the used business process type are not sufficient, this method can be used to add more tables to the table_container. PREVENT_EVENT_MSG_SENDING Set Indicator to Prevent Event Message Sending. If in certain cases the sending of Event Messages can be prevented the performance can be improved. AVOID_RETRIEVAL_OF_APPL_TABLES Set indicators to avoid retrieval of unnecessary data. If not all data of the defined application tables that are defined in the standard are necessary, indicators can be set to avoid the retrieval of this data.
(C) SAP AG
Page 36 of 45
For detailed documentation please see the documentation in the system. Documentation is also attached to note 1935617. There you can also check in which support package of which release it is available.
(C) SAP AG
Page 37 of 45
Example: For example implementations see the following implementations:
/SCMTMS/SPLIT_TOR_DATA_BY_TYPE: Send TOR Data Split in Packages per TOR Type Method /SCMTMS/IF_COMMON_BADI~SET_BADI_WORK_MODE: Set Work Mode o of BAdI Method /SCMTMS/IF_SEND_TOR_DATA~CALL_EVENT_MGR: Fill Application o Table and Event Manager Communication /SCMTMS/GET_ADDITIONAL_DATA: Get Additional Data Method /SCMTMS/IF_COMMON_BADI~SET_BADI_WORK_MODE: Set Work Mode o of BAdI Method /SCMTMS/IF_TOR_SEND_DATA~GET_ADDITIONAL_DATA: Retrieve o Additional Data for Event Manager Communication /SCMTMS/PREVENT_EVMSG_SENDING: Prevent Event Message Sending Method /SCMTMS/IF_COMMON_BADI~SET_BADI_WORK_MODE: Set Work Mode o of BAdI Method /SCMTMS/IF_SEND_TOR_DATA~PREVENT_EVENT_MSG_SENDING: Set o Indicator to Prevent Event Message Sending AVOID_RETRIEVAL_OF_APPL_TABLES: Avoid unnecessary data retrieval for standard integration Method /SCMTMS/IF_COMMON_BADI~SET_BADI_WORK_MODE: Set Work Mode o of BAdI Method /SCMTMS/IF_SEND_TOR_DATA~AVOID_RETRIEVAL_OF_APPL_TABLES: o Set indicators to avoid retrieval of unnecessary data
(C) SAP AG
Page 38 of 45
Appendix Trouble Shooting Symptom Event Message not propagated correctly from SAP EM to SAP TM Short dump when starting the SAP EM web interface for the first time
Solution SAP Note 1756885 Execute transaction /SAPTRX/UCCF once to 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 Define Freight Order Types
Freight
Order Management
Freight Booking SAP Transportation Management Transportation Management Freight Booking Define Freight Booking Types
Freight
Order Management
(C) SAP AG
Page 39 of 45
Freight Unit SAP Transportation Management Define Freight Unit Types
Transportation Management
Planning
Freight Unit
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 Setting Booking Can Be Deleted
Deletion Setting No
SAP EM Behavior 1.) Rule Set: ODT30_TO_CANCEL EH will be deactivated /SAPTRX/EH_HEADER-EH_ACTIVE = “ “
Freight Order Can Be Deleted
No
1.) Rule Set: ODT30_TO_CANCEL 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: 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 F reight Order is created in SAP EM. EH will be deleted (Soft deletion) EH_DELETED = “X“ Freight Unit Can Be Deleted
No
/SAPTRX/EH_HEADER-
1.) Rule Set: ODT30_FU_CANCEL EH will be deactivated /SAPTRX/EH_HEADER-EH_ ACTIVE = “ “
Booking Can Be Deleted
(C) SAP AG
Yes
1.) Deletion information is sent from SAP TM: Function Module: /SAPTRX/BAPI_EH_POST Table: APPLOBJECTS /SAPTRX/BAPI_APPLOBJ_IDENTPage 40 of 45
UPDATE_INDICATOR = “D” 2.) SAP EM EH Update: EH will be deleted (Soft deletion) EH_DELETED = “D“
/SAPTRX/EH_HEADER-
EH will be deactivated /SAPTRX/EH_HEADER-EH_ACTIVE = “ “ Freight Order Can Be Deleted
Yes
1.) Deletion information is sent from SAP TM: Function Module: /SAPTRX/BAPI_EH_POST Table: APPLOBJECTS /SAPTRX/BAPI_APPLOBJ_IDENTUPDATE_INDICATOR = “D” 2.) SAP EM EH Update: EH will be deleted (Soft deletion) EH_DELETED = “D“
/SAPTRX/EH_HEADER-
EH will be deactivated /SAPTRX/EH_HEADER-EH_ACTIVE = “ “ Freight Unit Can Be Deleted
Yes
1.) Deletion information is sent from SAP TM: Function Module: /SAPTRX/BAPI_EH_POST Table: APPLOBJECTS /SAPTRX/BAPI_APPLOBJ_IDENTUPDATE_INDICATOR = “D” 2.) SAP EM EH Update: EH will be deleted (Soft deletion) EH_DELETED = “D“
/SAPTRX/EH_HEADER-
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 41 of 45
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 42 of 45
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 43 of 45
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 44 of 45
View more...
Comments