New ruleset activity TM_UPDATE_RES_POS has been introduced in SAP EM 9.2 with note 2330523 (and will be included in the next support package EM 9.2 SP07). This activity can be used to enhance e.g. the freight order tracking scenario (integration scenario with SAP TM). If a vehicle resource (e.g. a truck) is assigned to a freight order, it allows to update the last position of this resource in SAP TM without the need to propagate the event message to the freight order in SAP TM. So far this was only possible via existing rule activity TM_UPDATE_RESOURCE (see http://scn.sap.com/docs/DOC-60764 ). This activity supports already updates on the resource in SAP TM, but only if the resource itself is tracked in SAP EM and event messages are processed for the resource event handler.
The new ruleset activity TM_UPDATE_RES_POS requires three rule activity parameters, which are listed here:
The resource ID, which is used to identify the resource in SAP TM. In standard freight order tracking scneario it is available via corresponding control parameter of the freight order event handler. In the standard resource tracking scenario it is available via main tracking ID of the resource event handler.
The longitude geo coordinate which is needed to update the last location of the resource in SAP TM. Should normally be available as event message parameter.
The latitude geo coordinate which is needed to update the last location of the resource in SAP TM. Should normally be available as event message parameter.
The function module /SAPTRX/TMS_UPDATE_RES_POS calls RFC function module /SCMTMS/UPDATE_RESOURCE in SAP TM via background task. The queue name is build via concatenation of ‘EM_’ and the resource ID, which is provided by the first rule activity parameter. In the standard freight order tracking scenario (EH Type ODT30_TO) the resource ID of the assigned truck is available via control parameter VEHICLE_RES_ID. For debugging you can set a breakpoint before the call of the FM is done and easily switch to synchronous mode by clearing variable LV_IN_BACKGROUND.
The following screen shot shows an example on how the activity can be used to update the last position of a resource in SAP TM (in database table /SCMTMS/RES_POS) as reaction on an event that is reported to the event handler of the freight order in SAP EM. The resource is assigned as vehicle resource to the freight order (e.g. a truck) and is available via control parameter VEHICLE_RES_ID. The geo coordinates are available as event message extension parameters of the event message.
You can check the document regarding rule activity TM_UPDATE_RESOURCE (http://scn.sap.com/docs/DOC-60764 ) for details on the necessary settings in SAP TM, since both rule activities call the same function module /SCMTMS/UPDATE_RESOURCE in SAP TM.
If you want to support “SIGHTING” events for your freight order event handler to report the exact position based on geo coordinates, you can create a custom event handler type as described below.
You can copy the standard event handler type ODT30_TO to new event handler type ZGEO_ODT30_TO and make the following changes:
You should handle “SIGHTING” as unexpected event if you do not need to keep the single event messages with the event handler. Event message then can be used to update the last known position in EM and TM and then processing can be quit.
By this, each “SIGHTING” event message can be processed against the expected event (the flag “Reprocess Expected Event” has to be set), but on the UI only the latest one will be shown
To test the new rule activity TM_UPDATE_RES_POS the standard user profile ODT30_TO can be copied to new user profile ZGEO_ODT30_TO. The related selection profile and event message profile have to be copied as well.
In the selection profile the configured field ODT30_EH_TYPE_TO has to be replaced by new configured field that contains the selection for the new event handler type.
The event message profile can be enhanced with new event reporting item to allow reporting of “SIGHTING” event messages from the EM web UI.
To send simple event message for “SIGHTING” with optional location ID, latitude, longitude and reporting time stamp the following event reporting item details can be maintained:
Note | Description | Support Package |
New rule set activity to update resource position in SAP TM | EM 9.2 SP07 | |
New rule set activity to update resource master data in SAP TM | EM 9.0 SP08 | |
Enhancements on Resource Master for TM | SCM_BASIS 713 SP05 | |
Resources: New attributes and enhancements on latest resource position | TM 9.1 SP03 | |
TM 9.1 SP03 | ||
TM 9.1 SP04 | ||
Dump in the function module: /SCMTMS/UPDATE_RESOURCE while reporting an event for a resource | TM 9.1 SP05 | |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
8 | |
6 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 | |
2 |