You are on page 1of 30
SAP Event Management Resource Tracking Scenario for SAP Transportation Management Release: SAP EM 9.0 SPO4 and higher, SAP TM 9.1 and higher Version: 1.1 PUBLIC Document Version: November 2013 Copyright © Copyright 2013 SAP AG. All rights reserved. SAP Library document classification: PUBLIC No part ofthis 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 pS, System x, System 2, System 210, 210, ZVM, 2/0S, OS/300, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWERG, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Stonwize, 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. 10S is a recistered trademark of Cisco Systems Inc. RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BiackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World ara 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 Ine. INTERMEC is a registered trademark of Intermec Technologies Corporation. Wi-Fiis 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 30 SAP, RI3, 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 Syoase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, 828 360°, and 828 360° Services are registered trademarks of Crossaate 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 affiated 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 30 Table of Contents Related Documents Related NOTES Document History 0 Introduction. Overview... svn Tracking process within TM... Tracking of Transportation Units Pre-requisite Change Notification Agent (CNA) Settings... Propagation of Events between TM documents... Mutual Updates between freight units, transportation units and freight orders or bookings. Sample Scenario “Railear and Locomotive Tracking’... Resource - RES30_RESOURCE.... sone 15 Freight Unit - ODT30_FU 7 Transportation Unit - ODT30_TU. 7 Freight Order - ODT30_TO... 18 EH dependencies in EM. 18 ‘Additional Information, 19 Status Attributes 19 Availabilty Status 19 Loading Status... 20 Maintenance Status... 20 Planning Status 20 Expected Events via EVM_EE_UPDATE for Resource Event Handler. a Multiple Tracking IDS... Delete vs. Cancel in SAP TM..... Event Date Filter .cccnnnnnnne vee Display Planned Route of a Resource on the EM Geo Map... Update TM Documents from the Resource Event Handler. BAdl /SCMTMSISEND_TOR_DATA. 29 (C) SAP AG. Page 4 of 30 Related Documents Document Type Document Name (Link) Version Solution Manager Document SAP TM - EM Integration Guide ™o4 SCN Document Event Date Filter Selection hitp:/sen,sap.com/docs/DOC-48806 SCN Document Multiple Tracking IDs httpv/iscn sap.com/docs/DOC-48805 SCN Document SAP EM 9.0 SP4 Features htip:/sen.sap.com/message!14502647#14502647 Related NOTEs SAPNOTE | NOTE Description 1930447 Table Indox for SAPTRXIEVM_REF for Resource Tracking 7934476 Update Execution Information in TM - Replace Tracking ID with Metadata Tag Euan sp | SPS Recommended - Contains all agjusiments for ihe Resource Tracking Visibility Scenario Document History Document | Changes Date Version 10 Document Created 23.10.2013 Added chapters: ~ Status Attributes 14 + BAdLISCMTMS/SEND TOR DATA 13.12.2013, = Propagation of Events between TM documents (C) SAP AG. Page 5 of 30 Introduction With SAP Event Management 9.0 SP4 a new visibility process “Resource Tracking” is shipped to monitor Vehicle Resources and Transportation Units used within SAP Transportation Management (SAP TM) 9.1 ‘This document is a detailed description of this visibility processes and the integration of SAP Event Management 9.0 with SAP Transportation Management 8.1. Itis aimed at readers with expertise in SAP Event Management, who want to understand the principles and the details of the implementation of the SAP Event Management content for SAP TM. Its focus is on a concise and complete description of the SAP Event Management features. As such, itis supplementary to the TM scenario guides, which (where applicable) show, how SAP Event Management is used to monitor a given process. The overview is also relevant for a wider audience who wants to understand the scope and the main features of this content. Overview ‘The content of SAP Event Management for SAP TM focuses on monitoring the execution of the transportation processes. Consequently it refeis to those business documents in SAP TM thal are ‘execution relevant. With Resource Tracking, the existing TM visibility scenarios are enhanced so that the utilized resources are also tracked within SAP Event Management across multiple TM documents. This means that now itis possible to track resources like railcars, containers etc. during their entire lifecycle. ‘The Resource Tracking visibility scenario follows a generic approach. That means in SAP Event Management there is only one generic Resource EH Type > RES30_RESOURCE which is used to model all existing resources from TM. If separate EH Types for e.g. container, railcars, locomotives, truck and trailer are required they must be realized in a custom scenario. Currently the railcar, locomotive as well as truck and trailer resources are supported and they are also described in the sample scenario in this document. The resource Event Handler (EH) is created from the Resource Master Data in SAP TM using the Change Notification Agent. This will create, update and delete the resource in SAP Event Management if flagged as “Relevant for Event Management’ ‘As soon a resource is planned within TM or assigned to a TM document, the Expected Events (EEs) for the Resource EH are created or updated. That means, for example, if a resource is assigned to a ‘TM Freight Order the EEs Arrival and Departure from the Freight Order are also created for the Resource EH in SAP Event Management. With TM 9.1 a new Application Object Type was introduced for the Transportation Unit. This is used to model e.g. multiple Railcar Resources in one composite TM Document (Railcar Unit) which is ‘executed with a Freight Order. A railcar unit makes up the logistic processing of transports with railcars. It describes the assignment of cargo to a railcar, Araiicar unit can comprise one or more railcars. if you have not already created the raiicar items in the forwarding order, you can use the railcar unit as a consolidation document, This means that the freight Unit is created based on a product item, for example. You then assign this product freight unit to the railcar unit. Alternatively, you can assign the freight unit directly to @ railcar that you have created in the rail freight order. New Es introduced with the Railcar Unit are Coupling and Decoupling Events. They are also created in the Resource EH in SAP Event Management. Tracking of Resources (C) SAP AG. Page 6 of 30 You can use this function to track resources that are defined as master data in SAP Transportation Management (SAP TM). This tracking process is part of the functions to monitor the transportation ‘execution of processes managed by SAP TM. The visibility process integrates SAP TM and SAP Event Management. ‘You can use this resource tracking visibility scenario to track resources over their entire lifecycle: * Tracking starts when the resource is entered into the SAP TM master data with the SAP Event Management system connected. Further, you must set the resource attribute Relevant for Event Management and assign a Means of Transport which is not flagged as Multiresource. + Tracking ends when the attribute Relevant for Event Management is removed Ifyou have connected SAP Event Management, you can monitor the execution events that are related toa certain resources by tracking the corresponding event handlers in SAP Event Management. SAP Event Management enables the following features: + Your transportation dispatcher can check the availabilty of a certain resource or can get an overview over all available resources. + Your carrier can report events directly for a resource, for example to update the actual position. + Your transportation dispatcher can receive an alert when an unexpected event is reported, for ‘example, the damage of a resource The following resource types are supported: * Active vehicle resources such as a trucks or locomotives * Passive vehicle resources such as trailers or railcars + Transportation units such as containers ‘You can track the following expected events for resources in SAP Event Management: * Coupling (only relevant for vehicle resources) + Departure + Arrival at Destination + Decoupling (only relevant for vehicle resources) ‘There are three ways of reporting the expected event + When your carrier sends an event message for the related freight document via SAP Event Management to SAP TM, SAP TM propagates this event message back to the related resource event handler(s) in SAP Event Management. SAP Event Management updates the data for the resource event handler(s) accordingly. + When you update the execution information of a freight document directly in SAP TM, SAP TM sends an event message to the related resource event handler(s) in SAP Event Management SAP Event Management updates the data for the resource event handler(s) accordingly. + When your carrier sends an event message directly for the resource via SAP Event Management. SAP Event Management updates the data for the resource event handler accordingly. However there is no automatic propagation of the event to the related freight document(s) in SAP TM. SAP Event Management can also track the following unexpected events: + Sighting (to update the actual position of the resource) + Damage (C) SAP AG. Page 7 of 30 ‘Tracking process within TM Within SAP TM there are two stages of tracking of the resources: a) Resource Master Data Changes ‘When the resource master data are created, changed or deleted, this triggers the execution of the Change Notification Agent (CNA). The CNA then calls the EM application interface to create, update or delete the corresponding event handlers in SAP Event Management. To activate the CNA, refer to Change Notification Agent (CNA) Settings b) Operational Data from TM Freight Documents ‘AS soon the resource is created within TM it can be used within the execution process. The resource can be assigned to freight documents like freight orders or transportation units. These are then the source for the expected events that will be generated for each corresponding resource event handler in SAP Event Management. Events reported for these freight documents are also propagated to the EM resource event handler. For a sample scenario with railear and locomotive, refer to Sample Scenario “Rallear an ‘Tracking of Transportation Units ‘You can use this function to track transportation units. This tracking process is part of the functions to monitor the transportation execution of processes managed by SAP Transportation Management (SAP TM). The visibility process integrates SAP TM and SAP Event Management. In transportation planning, the shipper or ordering party asks you to transport goods from one location to another. On receiving the order, your transportation dispatcher oreates a transportation requirement in SAP TM. SAP TM creates freight units to fulfil the transportation requirement. If you have connected SAP Event Management, you can monitor the execution phase of the transportation units by tracking the corresponding event handlers in SAP Event Management. SAP Event Management enables the following features: + Your shipper or ordering party can monitor the status changes of transportation units * Your transportation dispatcher, shipper or ordering party, consignee, and carrier can monitor the expected and actual events for transportation units, from loading the goods to the proof of delivery at the consignee. + Your transportation dispatcher, shipper or ordering party, consignee, and carrier can monitor the expected and actual events for transportation units. + Your cartier can report events, including unexpected events, for example, a delay. + Your transportation dispatcher can receive an alert when an unexpected event is reported, for example, delay of the transportation unit You can track the following expected events for transportation units in SAP Event Management: Loading Begin Loading End Coupling Departure Arrival at Destination Decoupling Unloading Begin Unloading End (C) SAP AG. Page 8 of 30 There are two ways of reporting the expected event: ‘When your carrier sends an event message from the SAP Event Management Web user interface or any other extemal interface to SAP EM, SAP EM updates the data of the corresponding event handler and sends an update to SAP TM, SAP TM then updates the transportation unit with the information in the event message and can propagate the event to related freight documents like assigned freight units if applicable. When you update the transportation unit directly in SAP TM, SAP TM sends an event message to SAP Event Management. SAP Event Management updates the data for the transportation unit SAP Event Management can also track the following unexpected events: Delay When these events occur, SAP Event Management can send an alert Pre-requisite ‘The pre-requisite for activating the resource tracking visibility scenario are described in the SAP TM — EM Integration Guide version 4.0 which is available on the SAP Help Portal NOTE: Transportation Unit and Resource Tracking customizing settings specified in the TM — EM Integration Guide ‘The Change Notification Agent for the Resources must be activated Activate BAdI ISAPTRX/BADI_EH_S Implementation /SAPTRX/GEN_EH_S_IMPL (Method CHECK_FOR_CHANGES implemented for Resource Tracking) ‘TM Resources that are flagged as “Relevant for Event Management" within the Resource Master Data can be tracked. But tracking only begins when the resource is assigned to a TM Document as this information is copied into the item information within TM. It the flag is set afterwards, the Resource EH is created in SAP Event Management but does not receive any changes from the TM documents it has been assigned to before the flag was set. If the resource has a Means of Transport which is flagged as Multiresource, itis not tracked. This is because multiresources are used for planning not tracking. (C) SAP AG. Page 9 of 30 Change Notification Agent (CNA) Settings ‘The CNA registers master data changes and triggers the corresponding functions in the applications. ‘The master data and applications must be connected actively to the CNA. The CNA checks if a master data change is relevant to the corresponding application. This usually involves a field check. However, individual check algorithms can also be implemented in the applications. For the Resource Tracking visibility scenario the CNA is used to register new, changed and deleted resource master data and trigger the interface to SAP Event Management To setup the CNA run TA “In/semb/cnacust” or in Customizing use > SAP Transportation Management > SCM Basis > Master Data > Change Notification Agent > Maintain Change Notification Agent ‘The entry registered for Resource Tracking: App. ID “TM_EM_RES’ Lane Determnation 5 BLA_FO SAP TM Resource lock FO 'SCTH Routng Guide “Transport Management Sytern On the next level the CNA for Resource Tracking must be activated > set the Active/lnactive Flag and make sure the New, Deleted and BIMG Relevant Flags are checked. 780G Reevart On the third level the relevant CNA subobjects must be added. The subobjects are defined in the maintenance table ~ sm30 /SCMBICNA_OBJSOB. In this table there is also an Active flag which can be used to activate and deactivate the subobjects. The main object for the resources to be tracked is RES_H, the header information, ‘The main object and the subobject are extracted as a separate table for the resource. However, some information is merged e.g. the resource header and resource header text as well as the resource downtimes and resource downtime text. For detalls see the method /SCMB/IF_CNA_APP_OBSERVER-SET_CHANGED_DATA in class ISCMTMSICL_CNA_RES_H. This is also the method that triggers the interface to SAP Event Management. ‘The following subobjects are available for the Resource Tracking CNA: (C) SAP AG. Page 10 of 30, Gisele Cau feo [focmcnes Res a ReS_oT [focmeres Res a is a = —— RES_D Resource Downtimes RES_DT Resource Downtimes Text RES_HT Resource Header Text (C) SAP AG Page 11 of 30 Propagation of Events between TM documents Mutual Updates between freight units, transportation 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 order, for instance, implicitly means that all transportation Units and 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 orderffreight 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 transportation unit, {eight order or freight booking when it has already been reported to all freight units thal are assigned to the transportation unit, freight order or freight booking, e.g. ifthe departure is reported on freight unit level, t 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, transportation unit and freight order) and the different systems (in case propagation of execution information is enabled for the freight order and transportation unit) (C) SAP AG. Page 12 of 30, ‘vent messages serio Wahv unt event hander in SAP EM Tare ut ‘ur Tansparaton ut Tareas =o ‘Everts pared dieciy frei ocerin SAP Ta reg ut ‘uTansporaon nt naresrioe ere eae eee sama eee (C) SAP AG. Page 13 of 30 1. Event message is reported in SAP EM for the freight unit Freight Ui > Automatic propagation to related transportation unit in SAP TM is done > SAP EM Rule set of freight unit event handler is set up to update TM > Eventis propagated to the freight unit in SAP TM. Transportation Unit: > Automatic propagation to related freight order in SAP TM is done > The Event extractor of the transportation unit in SAP TM propagates the event to the transportation unit in SAP EM > Ifthe event is relevant for resource tracking, an additional event message is sent to the resource Event Handler in SAP EM Freight Order: > The Event extractor of the freight order in SAP TM propagates the event to the freight order in SAP EM > Ifthe event is relevant for resource tracking, an additional event message is sent to the resource Event Handler in SAP EM 2. Execution event is reported in SAP TM for the freight order: Freight Orde > Automatic propagation to related transportation 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 > Ifthe event is relevant for resource tracking, an additional event message is sent to the resource Event Handler in SAP EM Transportation Unit: > Automatic propagation to related freight unit in SAP TM is done (if customizing in transportation unt type is set to ‘Propagate Execution Info") > The Event extractor of the transportation unit in SAP TM propagates the event to the transportation unit in SAP EM > Ifthe event is relevant for resource tracking, an additional event message is sent to the resource Event Handler in SAP EM Freight Unit: > The Event extractor of the freight unit in SAP TM propagates the event to the freight unit in SAP EM This propagetion 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 + Transportation Units and Freight orders/freight bookings in SAP TM have to be enabled in the type customizing to propagate the execution info Propagation to predecessor documents is triggered only in case if ‘Propagation Execution Info" flag has been set. Propagation to successor documents is triggered automatically + Rule sets in SAP EM have to be configured that events are propagated to SAP TM (activity function TM_MAINTAIN_EXEC_INF) (C) SAP AG. Page 14 of 30, Sample Scenario “Railcar and Locomotive Tracking” Resource tracking for Railcar and Locomotive is one of the sample scenarios provided for SAP TM a lal fa 22000oo_e—____o$e In that scenario the responsible logistics unit of the shipping organization plans a rail transport of two Freight Units of sand which should be transported on two railcars (RC) from Rotterdam via Maschen and Mannheim to Walldorf. In SAP TM two different Freight Units are created which are then transported each with a separate Railcar Unit (Transportation Unit). The Railcar Units represent the passive vehicles of the transport and need to be coupled with an active vehicle. The active vehicle is the locomotive (LOC) which is then assigned to the Freight Order which then pulls the railcars represented by the two Railar Units. In this sample scenario the transport is executed with a single Freight Order from Rotterdam to Walldorf, Depending on the how the transport is organized within TM the following TM documents are created Resource - RES30_RESOURCE Expected Event Sequence | EE Date COUPLING (TU) 30 ‘from Application System — Based on the TU data DEPARTURE (FO) _ | 40 ‘from Application System — Based on the TU data ARRIV DEST (FO) _| 50 from Application System ~ Based on the FO data DECOUPLING (TU) | 60 from Application System — Based on the FO data (C) SAP AG. Page 15 of 30 ‘The Resource EHs RC1, RC2 and LOC are created via the Resource Master Data within TM and should already exist in SAP Event Management. At this time the EEs are not yet created for any of the ‘TM documents, The EEs are updated step by step. (C) SAP AG. Page 16 of 30 Freight Unit - ODT30_FU 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 + 24n UNLOAD BEGIN | 500 UNLOAD BEGIN_| from Application System | EE Date + 24h UNLOAD END 600 UNLOAD END _| from Application System | EE Date + 24h ‘Two Freight Units FU1 and FU2 are created, FU‘ and FU2 are also represented by two EHs in SAP Event Management. ‘Transportation Unit- ODT30_TU Expected Event __| Sequence | Generated from_| EE Date Event Message Date SCHEDULED 90 SCHEDULED __| trom 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 COUPLING 300 COUPLING from Application System | EE Date + 24h DEPARTURE 400 DEPARTURE _| from Application System | EE Date + 24h ARRIV DEST 600 ARRIV DEST __| from Application System | EE Date + 24h DECOUPLING 650, DECOUPLING _| from Application System | EE Date + 24h UNLOAD BEGIN | 500 UNLOAD_BEGIN | trom Application System | EE Date + 24h UNLOAD_END 600 UNLOAD_END _| trom Application System | EE Date + 24h ‘Two Railear Units RCU1 and RCU2 are created on which the freight units FU1 and FU2 are loaded. RCU1 and RCU2 are also represented by two EHs in SAP Event Management. The existing Railcar Resources are then assigned to a Railear Unit items (C) SAP AG. Page 47 of 30 Freight Order - ODT30_TO Expected Event | Sequence | Generatedfrom | 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 COUPLING 350 COUPLING from Application System | EE Date + 24h DEPARTURE 400 DEPARTURE | from Anplication System | EE Date + 24h relative to previous Event (POPU) CLEAR_CUSTOMS | 500 CLEAR_CUSTO | from Application System | EE Dato + 24h MS ‘ARRIV_DEST 600 ARRIV_DEST __| from Application System | EE Date + 24h DECOUPLING 650 DECOUPLING __| from Application System | EE Date + 24h UNLOAD_BEGIN | 700 UNLOAD_BEGIN i EE Date + 24h UNCOAD_END 800 UNCOAD_END EE Date + 24h POD 900 UNLOAD_END | relative toEventwith | EE Date + 24h same Location (UNLOAD_END) + 2h The two Railear Units RCU1 and RCU2 are then pulled by a locomotive which is assigned to the created freight order, FO1. FO1 is represented by another resource EH in SAP Event Management. NOTE: If the complete transport is planned, the Resource EHs which are utilized are updated with the EEs from the TM documents as soon the EEs are created on the other documents. EH dependencies in EM Based on the sample scenario the following EH dependencies exist within SAP Event Management: (C) SAP AG. Page 18 of 30 Additional Information Status Attributes All the values for the status attributes described can be set independent from each other. There is no logic implemented to automatically update a second status, if a change is received for the first status, although they might be semantically dependent. For example, an event received to set the maintenance status to “Not Usable” does not automatically set the “Availability Status” to “Unserviceable’. This can result in semantically inconsistent status settings across the status attributes, Automated updates across several status attributes cannot be provided as standard because of the potential complexity of interdependencies in the generic scenario. However, ifthe interdependencies are unambiguous in your specific use case, you can easily add your own logic to the event processing rules to add interdependent updates. ‘Thus you should ensure that you send sets of status changing events that are consistent in your scenario. For example, in your scenario a status change to "Unserviceable” for the availabilty status, might be consistent with a status change to “Not Usable’ for the maintenance status, Availability Status RES30_AVAILABILITY EMPTY_ON STOCK Empty on Stock IN_USE In Use RESERVED Reserved UNSERVICEABLE Unserviceable The Availability Status describes the actual availability of a resource for use in a transport. This status mainly reflects the state to be considered when “physically” starting an operation on-site, + “Empty on Stock” means that the resource is stored empty in a storage location. It is available immediately for a transport from that location. + “In Use” means that the resource is being used either for a transport (full or empty) or for any other purpose, for example, as a storage container. Itis not available and cannot be assigned to a different transport at present + “Reserved” means that the resource is stored at a location but is not available for a transport other than the one itis already booked for. + “Unserviceable” means that the resource is at a location, but is not available for a transport because of its physical state. For example, a container is damaged and in need of repair or a truck has a defective engine. Status update: Event Message with internal Event Code "SET_AVAILABILITY” (C) SAP AG. Page 19 of 30, Loading Status RES30_LOADING EMPTY Empty FULLY LOADED, Fully Loaded PARTIALLY LOADED Partially Loaded ‘The Loading Status is only used for resources that can take a load. It describes how loaded the resource is at the time when itis observed, Status update: Event Message with internal Event Code “SET_LOADING” Maintenance Status RES30_MAINTENANCE IN_MAINTENANCE. In Maintenance NOT_USABLE Not Usable USABLE_WO_REST Usable Without Restrictions USABLE_W_REST Usable With Restrictions ‘The Maintenance Status describes the actual state of a resource with regards to maintenance, + “In Maintenance” means that the resource is currently subject to a maintenance service + "Not Usable’ means that the resource cannot be used because of its maintenance state. For example a railcar would be “not usable” if its general inspection is overdue. This can imply that its corresponding availabilty status should be changed to “Unserviceable”, However, as already explained, no automatic logic is implemented to do this. + “Useable without Restrictions” means that the resource can be used for any purpose itis designed for without any maintenance restrictions. ‘+ “Useable with Restrictions” means that the resource can be used, but not for all of the purposes itis designed for. For example, if a container is rusty it can be used for transporting ‘goods such as coal, but not for transporting food or pharmaceutical drugs where cleanliness is eritical Status update: Event Message with internal Event Code “SET_MAINTENANCE” RES30_PLANNING AVAILABLE ‘Available for Planning BLOCKED Blocked for Planning The Planning Status is for display only. It describes the availabilty of the resource for planning in SAP Transportation Management. This status is a copy of the corresponding Planning block status in the resource master data record in TM and must not be changed in SAP Event Management. Status update: Resource Master Data update of the Planning block. (C) SAP AG. Page 20 of 30, Expected Events via EVM_EE_UPDATE for Resource Event Handler In the Resource Tracking visibility scenario for TM, the Expected Events are not created, updated and deleted using the Expected Event Extractor from TM. This is due to the fact that the EEs are based on the TM documents the Resources are assigned to. When creating or updating a TM freight document which references a certain TM Resource, the EH for this Resource is not updated or created via /SAPTRX/BAPT_BH_POST. As described previously, the Resource EH is created via the Change Notification Agent based on the TM Resource Master Data without any EEs as this is not possible at the time the Resource is created. The EEs for the Resource are created, updated and deleted via Event Message with updated CT_TRACKEEMODIFY Structure. Using the Event Message RES30_EE_MODIFY which is assigned to the Business Process Type TMS_TOR, the EEs are generated depending on certain Relevance Conaitions for each of the TM TOR Types (FU, TU and FO), The following E€s from the TM Documents are relevant as of now: Expected Event LOAD_BEGIN (FU) LOAD_END (FU) COUPLING (TU) DEPARTURE (FO) ARRIV_DEST (FO) DECOUPLING (TU) UNLOAD_BEGIN (FU) UNLOAD_END (FU) The EEs for the resource EH are then created/updated/deleted by the rule set activity EVM_EE_UPDATE. To enable the activity to take over certain attributes from an expected event profile when creating an expected event, the two new optional parameters "Use EH EE Prof.” and “EE Profile” are used to determine the expected event profile. ay (ES EE OITT | Rescue Tadang- Nady Expeced Events ‘con ase oro PrevousTask 15.5705 ee OOTY) Lap. Opantor__ |= rave. ade Feat Das comne top tk took evant onder [oeces Ever Profi fom O48 tans cf xed Event Pte By using the EVM_EE_UPDATE activity in the rule set for the Event Message RES30_EE_MODIFY, it is possible to specify either an EE Profile or set a flag that the EE Profile should be used from the Event Handler Profil. (C) SAP AG. Page 21 of 30 ‘The reason why this was a requirement for the EE Modify event was that the various EEs which are created during the lifetime of a resource cannot be clearly identified when receiving an event message. To make this possible, each EE uses the fields DATACS (Data Code Set) and DATAID ( Data Code ID to reference the TM document the EE is referring to. When receiving an event message the function for “Check Data” from the EE Profile must be activated so that each event message can be clearly assigned to an EE on the Resource EH. See the previous screenshot which shows the TM document in the last two columns. This is now possible using the EVM_EE_UPDATE activity and reference the EE Profile for this EH where the Check Data function is sel. sae fue Doone see Greckramer [| Phoiotcnece teceon ncaa [toe et Greck Location Da Not neck ra neon noe set, SHEE Ome Ft (C) SAP AG. Page 22 of 30, Multiple Tracking IDs SAP EM 9.0 SP4 introduced a new feature “Multiple Tracking IDs". Using this functionality within SAP Event Management it is possible to send a single event message and apply it to multiple event handlers. This document describes a sample scenario and a possible use case for which the multiple tracking id functionality might be useful ‘You use this functionality for example when you want to send a single Event Message and apply it to multiple Event Handlers to track for example at the level of a single railcar resource. One or multisle railcars can be assigned to a rail freight order directly or via railcar unit. When a shipper reports the ARRIVAL event for the entire freight order, a single event message is sent to SAP Event Management for the assigned railear resources. This event message then needs to be propagated to all railcars for which this event applies. On the Rail Freight Order level, an ARRIVAL event message is sent which is configured for the Multiple Tracking ID use case. In SAP Event Management the customizing for the visibility scenario ‘and event message Is checked and if relevant the event message is used for multiple event handlers within SAP Event Management. In this scenario the single ARRIVAL event message would be applied to all relevant railcar event handlers which are referenced within the event message. oan Fea aa (C) SAP AG. Page 23 of 30 Customizing SAP Event Management In Customizing under-> Event Management > Event Messages, Status Queries, and Web Interface > Define Criteria for Event Message Processing > Structure Item “Enable Multiple Tracking IDs” To enable this functionality for the resource event handler and arrival event message, create the following entry: * Internal event code: "ARRIV_DEST™ * Tracking ID code set: "RES_ID" + Event message sender (code set and code ID): "TM" Change View "Enable Multiple Tracking IDs": Overview ‘The Event Message header parameters from the source system must match the above customizing values. For each railcar event handler, an entry in the further reference table must be created with REFUSAGE value 'M. For more detailed information, refer to the SCN document Multiple Tracking IDs. PERFORMANCE NOTE: If the Resource Tracking visibility scenario is extensively used consider the following SAP Note: 1930447 - Table Index for /SAPTRX/EVM_REF for Resource Tracking to avoid performance issues. (C) SAP AG. Page 24 of 30, Delete vs. Cancel in SAP TM In SAP TM there is the possibility to define if a TM document can only be cancelled or also if it can be: deleted from the database. Based on the Document Type Stetting we have the following situation: TM Document Type Setting | TOR ROOT ‘TOR ROOT BEFORE Can be deleted Not available Available Caneel ‘Available Available This has an impact on how the corresponding EEs are deleted on the related resource event handlers. Ifthe TOR_ROOT is available, the event message RES30_EE_MODIFY is sent from the Appiication Objects Types assigned to Business Process Type TMS_TOR. If only TOR_ROOT_BEFORE is available, the event message RES30_EE_MODIFY cannot be sent from TMS_TOR. This is sent from the Application Objects Type RES30_RESOURCE assigned lo Business Process Type TMS_RES. In the case of deletion no event message can be sent for the Application Object Types from TM which are assigned to Business Process Type TMS_TOR as the TOR_ROOT image is not available. In this case the EEs which have been created on the Resource EH wouldn't be deleted if a TM document is, deleted. ‘Therefore it is checked within /SCMTMS/CL_EVENT_MANAGEMENT->CALL_EM_TOR_DATA if only a ROOT_BEFORE table oxists. In this case the method /SCMTMS/CL_EVENT_MANAGEMENT- >SEND_RES_DATA is also called to trigger possible deletion of the expected events on the resource ‘event handler via BPT TMS_RES. If needed, the event message RES30_EE_MODIFY is sent then from the Application Object Type RES30_RESOURCE which is then used to delete the existing EES. on the Resource EH for the deleted TM document. (C) SAP AG. Page 25 of 30, Event Date Filter In most Resource Tracking scenarios it is expected that during the lifetime of a resource a very large number of event messages will be received for the Resource EH. For this reason the Event Data Filter feature has been introduced to restrict the number of event messages in the search query to a period of time which is of interest. Using this feature only the resource event messages which are within the specified period are displayed. ‘tin oat (aig: VaR RS a eeatoacrne © [ e » 5 * ‘The Event Date Filter is activated in the Selection Profile by the *Evt. Date Filter” check box. For more detailed information, refer to the SCN document Event Date Filter Selection, Display Planned Route of a Resource on the EM Geo Map If the planned (future) route is also of interest, check the following SCN document which contains a sample implementation http://scn sap com/docs/DOC-44725, (C) SAP AG. Page 26 of 30 Update TM Documents from the Resource Event Handler With the standard content for the Resource Tracking Visibility Scenario there is no option that events reported for a Resource EH like for a Railcar are propagated to the corresponding TM Document such as the Freight Order When an event message is received from an external party for a freight document e.g. freight order, then the corresponding TM document is known from the document number (TOR ID). With this information you can update SAP TM. When an event message is recsived from an extemal party for a resource then there is no direct link to the corresponding TM document. In this case you must build your own logic to determine the TM document e.g, freight order number. Ifthe external party already sent the information for the TM document in the event message header, the event can be propagated to TM. ‘Assuming the external partner sending the event message does not have any reference to any TM documents, determination logic must be implemented to find the corresponding TOR ID for the Freight Order or Transportation Unit, Note: When sending the event message from the EM Web UI there is no need to implement this workaround as the TM document link is already extracted with the EEs. When reporting the event message via “Report All Expected Events” the information TM Dee. ID and TM Doc. ‘Type is already available. The following workaround ispossible for customers who want to implement such a scenario: 4. Use a Preprocessing Function for the events that should be propagated from the resource EH to TM documents which do not have any information about the TM document. If the TOR ID is already part of the event message this step can be skipped. In the Preprocessing Function the event message header field e.g. for DATAID must be updated with the required TOR ID. The logic of how this is determined is dependent on the customer scenario, ‘Sample Preprocessing Function: ava Teorequestige TYPE /eaotra/baps_eh request S480 Veet. "Talia TEtectedevents Hos {ASCE of Maptravbnprcehewpected.event, (C) SAP AG. Page 27 of 30 (aL FUNCTION */SAPTRR/BRPE_EHLBET_DAT 2.In the Rule set add the TM_MAINTAIN_EXEC_INF activity (pre-requis ie SAP Note 1934476) a ae a. in sea “oo Pema er saat cm! ‘Add the TM_MAINTAIN_EXEC_INF Activity to your rule set. nave [RARE Rese Tacrg Cece Ee Set the parameter "REPLACE_TRXID" to the Metadata Tag 0.9. , which should be used to get the TM document number (TOR ID). ‘The Tracking ID which is originally set to the Resource ID when receiving the event message is then ‘overwritten with the determined TOR ID when updating the Execution Information in TM. (C) SAP AG. Page 28 of 30 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 BAdl is implemented and the BAd! Work Mode is set (see BAd! method documentation), the BAd| is called in the Method /SCMTMSICL_EVENT_MANAGEMENT->SEND_TOR_DATA. BAdI methods: SET_BADI WORK MODE Use this method to control the work mode of a BAd|. 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. I 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 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. Example: For example implementations see the following implementations: ISCMTMS/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 of BAd! © Method /SCMTMSIIF_SEND_TOR_DATA~CALL_EVENT_MGR: Fill Application Table and Event Manager Communication /SCMTMSIGET_ADDITIONAL_DATA: Get Additional Data Method /SCMTMS/IF_COMMON_BADI~SET_8ADI_WORK_MODE: Set Work Mode of BAdI © Method /SCMTMS/IF_TOR_SEND_DATA~GET_ADDITIONAL_DATA: Retrieve Additional Data for Event Manager Communication JSCMTMS/PREVENT_EVMSG_SENDING: Prevent Event Message Sending © Method /SCMTMS/IF_COMMON_BADI~SET_8ADI_WORK_MODE: Set Work Mode of BAdl © Method /SCMTMS/IF_SEND_TOR_DATA-PREVENT_EVENT_MSG_SENDING: Set Indicator to Prevent Event Message Sending (C) SAP AG. Page 29 of 30, + AVOID_RETRIEVAL_OF_APPL_TABLES: Avoid unnecessary data retrieval for standard integration ‘© Mathod /SCMTMS/IF_COMMON_BADI~SET_SADI_WORK_MODE: Set Work Mode of BAdI © Method /SCMTMS/IF_SEND_TOR_DATA~AVOID_RETRIEVAL_OF_APPL_TABLES: Set indicators to avoid retrieval of unnecessary data (C) SAP AG. Page 30 of 30,

You might also like