Vous êtes sur la page 1sur 9

Integration of SAP TM with SAP EM Details on

the Direct Output Agents

Author: Daniel Hrder


Document Date: 06.07.2015
www.sap.com

TABLE OF CONTENTS
SUMMARY ........................................................................................................................................................ 3
AVAILABLE DOAS ........................................................................................................................................... 3
OUTPUT TYPE.................................................................................................................................................. 4
SEND_EM_DATA_FROM_INS......................................................................................................................... 6
Overview ........................................................................................................................................................... 6
Details ............................................................................................................................................................... 6
SEND_EM_DATA_FROM_TOR ....................................................................................................................... 6
Overview ........................................................................................................................................................... 6
Details ............................................................................................................................................................... 6
Synchronous ...................................................................................................................................................... 6
Asynchronous .................................................................................................................................................... 6
SEND_EM_DATA_FROM_TOR_ASYNC ........................................................................................................ 7
Overview ........................................................................................................................................................... 7
Details ............................................................................................................................................................... 7
SEND_EM_DATA_FROM_TRQ ....................................................................................................................... 7
Overview ........................................................................................................................................................... 7
Details ............................................................................................................................................................... 7
NODE DATA PROVIDED FOR THE EXTRACTION BY THE STANDARD LOGIC ........................................ 7
AVAILABLE NOTES ......................................................................................................................................... 8
Integration of SAP TM with SAP EM Details on the Direct Output Agents

SUMMARY
This document gives an overview on the direct output agents (DOA) that can be used for the standard
integration scenarios for tracking orders and/or instructions. It gives details on what has to be considered
when setting up and/or enhancing one or more of the existing tracking scenarios.

AVAILABLE DOAS
You can find the IMG activity Maintain Output Management Adapter Settings to maintain the relevant setting
for the DOA in the customizing here:
SPRO -> Cross-Application Components -> Processes and Tools for Enterprise Applications -> Reusable
Objects and Functions for BOPF Environment -> PPF Adapter for Output Management -> Maintain Output
Management Adapter Settings. In the following screen shot the EM related DOAs are highlighted:

These DOAs can be used for the following standard tracking scenarios:
SEND_EM_DATA_FROM_INS
o Tracking of Instructions with Business Process Type (BPT) TMS_INS and Application
Object Type (AOT) ODT30_INS (available with TM 9.0)
SEND_EM_DATA_FROM_TOR and SEND_EM_DATA_FROM_TOR_ASYNC
o Tracking of Freight Units with BPT TMS_TOR and AOTs ODT20_FU (available with TM
8.0) and ODT30_FU (available with TM 9.0)
o Tracking of Freight Orders/Freight Bookings with BPT TMS_TOR and AOTs ODT20_TO
(available with TM 8.0), ODT30_TO (available with TM 9.0) and ODT40_TO (available
with TM 9.2)
o Tracking of Transportation Units with BPT TMS_TOR and AOT ODT30_TU (available
with TM 9.1)
o Tracking of Resources with BPT TMS_RES and AOT RES30_RESOURCE (available
with TM 9.1)
SEND_EM_DATA_FROM_TRQ
o This can be used for tracking of Forwarding Orders with BPT TMS_TRQ, but there is no
standard scenario available for this. Only the BPT and the DOA exist as a starting point.
There is no further support for this in the standard.

3
Integration of SAP TM with SAP EM Details on the Direct Output Agents

OUTPUT TYPE
Starting with TM 9.0 SP09 respectively TM 9.1 SP01 there is a new customizing setting Output Type for the
DOAs available (see also available notes). The following values can be set for the output type:

Has Critical o/p: Process during Save - before Commit

This output type is used by default in systems where the new customizing setting is not available.
The system processes the DOA during SAVE, before it commits application data to the database.
Therefore the processing time of the data retrieval needed for the data extraction to SAP EM and the
data extraction itself add up completely to the response time of the TM process that triggers the
DOA.

Has Uncritical o/p: Process after Commit (background)

This output type is only available with the new customizing setting. The system processes the DOA
in a background job immediately after the application data was saved. The response time of the TM
process that triggers the DOA can be reduced significantly by this. Therefore this is the
recommended setting. However, the following points have to be regarded, if you set up your own
scenario (or enhance the standard scenarios):

If you need the BEFORE IMAGE data of specific nodes (of BO /SCMTMS/TOR), these
nodes have to be maintained in the table Nodes for Before Image:

For the standard scenarios these are the sub nodes


STOP
ITEM_TR
EXECUTIONINFORMATION.

Note: The sub node name has to be entered by using the F4-Help. The entry is only valid if
the sub node key has been populated automatically after the sub node name has been
selected by the F4-Help.

For the sub nodes that are maintained as seen above the BEFORE IMAGE data will be
returned by data retrievals only for those node instances that have been changed. If a node
is not maintained in this customizing, the BEFORE IMAGE data is not returned by
retrievals for this node.

If you need BEFORE IMAGE data for additional nodes (nodes which are not already
handled in the standard), it should be retrieved by implementing BAdI method
GET_ADDITIONAL_DATA of BAdI /SCMTMS/SEND_TOR_DATA. The recommendation is
to complete the BEFORE IMAGE data by adding the current image of those node
instances that have not been changed. You can check the example implementation
/SCMTMS/GET_ADDITIONAL_DATA for an example on how this can be done (see also
available notes). If you complete the BEFORE IMAGE it will be transparent for all the
extractor and relevance functions which output type is used.

4
Integration of SAP TM with SAP EM Details on the Direct Output Agents

Note: With this output type BEFORE IMAGE data of nodes of other business objects (like
ROOT node of /SCMTMS/TRQ) is not available. This data is only available for output type
Has Critical o/p: Process during Save before Commit.

5
Integration of SAP TM with SAP EM Details on the Direct Output Agents

SEND_EM_DATA_FROM_INS
Overview
Available starting from TM 9.0 SP02/EM 9.0
Both output types are supported

Details

It is recommended to use the output type Has Uncritical o/p: Process after Commit (background) to
optimize the performance.

SEND_EM_DATA_FROM_TOR
Overview
Available starting from TM 8.0/EM 7.01 SP03
Both output types are supported

Details

Synchronous

If you use output type Has Critical o/p: Process during Save - before Commit the DOA will be executed
synchronously and the processing time will add up to the overall response time.

Asynchronous

If you use output type Has Uncritical o/p: Process after Commit (background) the DOA will be executed
asynchronously and the overall response time can be reduced significantly. As described above you have to
take care when need to retrieve additional (= not provided in the standard) BEFORE IMAGE data. This
should normally be done by implementing method GET_ADDITIONAL_DATA of BAdI
/SCMTMS/SEND_TOR_DATA. You can check example implementation
/SCMTMS/GET_ADDITIONAL_DATA for details.

The following BEFORE IMAGE data are provided already in the standard:

TOR_CAPA_ROOT_BEFORE
based on BEFORE IMAGE data of node STOP: contains the root data of the TORs that
have been assigned as capacity to the changed TOR in the before image
TOR_EXECUTION_INFO_BEFORE
TOR_ITEM_BEFORE
TOR_REQ_ROOT_BEFORE
based on BEFORE IMAGE data of node ITEM_TR: contains the root data of the freight
units that have been assigned to the changed TOR in the before image
TOR_ROOT_BEFORE
TOR_STOP_BEFORE
TRQ_ROOT_BEFORE
based on BEFORE IMAGE data of node ITEM_TR: contains the root data of the TRQs that
have been associated with the changed TOR in the before image
TOR_REQ_TU_ROOT_BEFORE (starting with TM 9.1):
based on BEFORE IMAGE data of node ITEM_TR: contains the root data of the
transportation units that have been assigned to the changed TOR in the before image

Please check chapter Node data provided for the extraction by the standard logic for complete overview of
which data is provided in the standard.

As written above the data retrieval for BEFORE IMAGE data only returns data for node instances that have
been changed. However, the BEFORE IMAGE data is made complete again (i.e. adding the unchanged
node instances which are not automatically provided) before passing the data to the EM application
interface: The CURRENT IMAGE data of the node instance that have not been changed are added to
the BEFORE IMAGE data. By this nothing has to be changed in the extractor and relevance

6
Integration of SAP TM with SAP EM Details on the Direct Output Agents

functions, no matter which output type is used. The same should be done for the additional
BEFORE IMAGE data if this is needed.
It is recommended to use the output type Has Uncritical o/p: Process after Commit (background) to
optimize the performance.

SEND_EM_DATA_FROM_TOR_ASYNC
Overview
Available starting from TM 8.0 SP09 resp. TM 8.1 SP07 with EM 7.01 SP03, TM 9.0 SP05/EM 9.0 and
TM 9.1/EM 9.0 SP04
Only output type Has Critical o/p: Process during Save - before Commit is supported

Details

This DOA should not be used anymore in systems in which the new customizing setting for the
output types is available. By using this DOA the central data retrieval is done synchronously and the data
extraction to SAP EM is done asynchronously. However, this DOA can be used to reduce the response time,
if output type setting is not available. For details on what has to be regarded if additional data has to be
retrieved, you can check example implementation /SCMTMS/GET_ADDITIONAL_DATA of BAdI
/SCMTMS/SEND_TOR_DATA.

SEND_EM_DATA_FROM_TRQ
Overview
Available starting from TM 8.0/EM 7.01 SP03
Both output types are supported

Details

As already written above this DOA can be checked and maybe used if you want to build up a tracking
scenario for forwarding orders. But there is no further support or content regarding this available in the
standard.

NODE DATA PROVIDED FOR THE EXTRACTION BY THE STANDARD LOGIC


The following nodes of business object /SCMTMS/TOR are already handled in the standard logic, which
means that the corresponding node data is made available for the relevance and extraction function
modules. Therefore it is not necessary to retrieve the node data by method GET_ADDITIONAL_DATA of
BAdI /SCMTMS/SEND_TOR_DATA. Implementation of this method is only needed if additional data has to
be provided for the extraction.

TOR nodes for which the current and the before image is available in the standard logic:
ROOT (TOR_ROOT and TOR_ROOT_BEFORE)
STOP (TOR_STOP and TOR_STOP_BEFORE)
ITEM_TR (TOR_ITEM and TOR_ITEM_BEFORE)
EXECUTIONINFORMATION (TOR_EXECUTION and TOR_EXECUTION_BEFORE)

TOR nodes for which only the current image is available:


TENDERING (TOR_TENDERING)
PARTY (TOR_PARTY)
STOP_SUCCESSOR (TOR_STOP_SUCCESSOR)

Additional node data which is provided with current and before image:
ROOT of capacity TORs (TOR_CAPA_ROOT and TOR_CAPA_ROOT_BEFORE)
ROOT of assigned freight units (TOR_REQ_ROOT and TOR_REQ_ROOT_BEFORE)
ROOT of assigned transportation unit as requirement (TOR_REQ_TU and TOR_REQ_TU_BEFORE)
ROOT of related TRQs (TRQ_ROOT and TRQ_ROOT_BEFORE)

Additional data available:


TOR_CREATED_KEYS: Node keys of the nodes that have been created

7
Integration of SAP TM with SAP EM Details on the Direct Output Agents

TOR_LOCATION_LOG: ROOT nodes of BO /SCMTMS/LOCATION for all locations of the STOP


nodes
TOR_LOCATION_ADDR: ROOT nodes of BO /SCMTMS/LOCATION for all address locations of the
STOP nodes
TOR_STOP_ADDR: Address data of the address locations of the STOP nodes

You can also check this in the system. It is defined in customizing activity Define Business Process Types
(path SPRO -> Integration with Other SAP Components -> Event Management Interface -> Define
Application Interface) under Define Available Application Tables for business process type TMS_TOR.

AVAILABLE NOTES
1842397 - Different direct output agents available for data extraction
Consulting note regarding the available direct output agents
1935617 Multiple Queue handling for TM-EM Integration
Note that introduces BAdI /SCMTMS/SEND_TOR_DATA
All follow-up notes shall be implemented as well (1937006, 1938440, 1956427, 1940106,
1942449)
1965595 Enable data extraction for SAP EM with asynchronous direct output agent
1973815 Enhancement of BAdI implementation /SCMTMS/GET_ADDITIONAL_DATA
1965090 Direct output agent execution in update task
1972782 Execution of PPF actions and DOA in update task fails
2029960 - Direct output agent 'SEND_EM_DATA_FROM_TOR' is not working correctly
1942449 - Missing input parameter for BAdI method PREVENT_EVENT_MSG_SENDING
2016433 - Wrong extraction of TRQ related control parameters
1976808 - Setting synchronous execution as default behavior for Direct Output Agent
2022397 - Usage of direct output agent 'SEND_EM_DATA_FROM_TOR_ASYNC' leads to short dump
2155730 Enable data extraction for SAP EM with asynchronous direct output agent for business
process type TMS_TRQ

8
www.sap.com

2015 SAP SE or an SAP affiliate company. All rights reserved.


No part of this publication may be reproduced or transmitted in any form
or for any purpose without the express permission of SAP SE or an SAP
affiliate company.
SAP and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP SE (or an
SAP affiliate company) in Germany and other countries. Please see
http://www.sap.com/corporate-en/legal/copyright/index.epx#trademark for
additional trademark information and notices. Some software products
marketed by SAP SE and its distributors contain proprietary software
components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for
informational purposes only, without representation or warranty of any kind,
and SAP SE or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP SE or
SAP affiliate company 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.
In particular, SAP SE or its affiliated companies have no obligation to pursue
any course of business outlined in this document or any related presentation,
or to develop or release any functionality mentioned therein. This document,
or any related presentation, and SAP SEs or its affiliated companies
strategy and possible future developments, products, and/or platform
directions and functionality are all subject to change and may be changed by
SAP SE or its affiliated companies at any time for any reason without notice.
The information in this document is not a commitment, promise, or legal
obligation to deliver any material, code, or functionality. All forward-looking
statements are subject to various risks and uncertainties that could cause
actual results to differ materially from expectations. Readers are cautioned
not to place undue reliance on these forward-looking statements, which
speak only as of their dates, and they should not be relied upon in making
purchasing decisions.

Vous aimerez peut-être aussi