TM-IV Integration : Invoice verification notification service
The ERP system sends notifications to the TM system after an incoming invoice is posted or canceled for a TM (transport management) document in the ERP system. The notification includes detailed information about the posted invoice document.
Scenario for the notification service, sent to TM after IV document posting
To enable the notification service , the relevant BC-set (MM_SWFDEVTYP_S) and the switch (MM_ESOA_SFWS_SC1) for the workflow should be active. The events ‘Posted’ and ‘Canceled’ should also be set for the MM-IV object BUS2801 via the transaction SWETYPV as shown below :
- SWETYPV – Event Type Linkages
Object Category : BOR Object Type
Object Type : BUS2081
Event : CANCELLED and POSTED
Receiver Type : WS53800006
Receiver Function Module : SWW_WI_CREATE_VIA_EVENT_IBF
Linkage Activated : Checked
Event POSTED is triggered by service operations like Create Invoice , Create Supplier Invoice or by online postings of incoming invoices (e.g. transaction MIRO).
When an invoice is posted or canceled, firstly the workflow WS53800006 for MM-IV object BUS2081 will trigger the invoice notification service by running the class method CL_SE_IV_INVOICENOTIFICATION=> PROCESS_BY_WORKFLOW.
The workflow WS53800006 definition can viewed using Workflow Builder (transaction SWDD).
- SWDD – Workflow Builder
The workflow template WS53800006 for MM-IV object BUS2081 registers event ‘posted’ and ‘canceled’ as shown below :
Secondly the method PROCESS_BY_WORKFLOW of the class CL_SE_IV_INVOICENOTIFICATION method imports the document number and fiscal year of the invoice. Then the document is read, mapped out and the notification service is called within the same class.
Lastly the Data is mapped from backend format to XI format using the Mapping Tool. The message is then sent as an A2A message.
The mapping of invoice data can be customized using Customizing Transformation Workbench (transaction WUFWUF ) as shown below:
Application : IVE_E_INVOICE_NOTIFICATION_OUT
If an error occurs during outbound processing of the service, the system terminates the workflow and creates an entry in the application log. The transaction SLG1 “Analyse Application Log” can be used to analyze the application log.
The entries in the application log are stored under the object name OPS_SE “ERP Operations: Service enabling”. The “External ID” field contains the work item ID of the terminated workflow.
To restart the terminated workflow the transaction SWPR “Workflow Restart After Error” is used and to narrow down the search to only Invoice Notification workflows, the displayed list of records can be filtered using Task ID WS53800006.
There is also a Business Add-In (BAdI) IV_SE_INVOICENOTIFICATION_ASYN for this outbound operation.
The SAP TM system can be integrated with or without SAP PI . All A2A interfaces of SAP TM are enabled for point-to-point integration (Web Service Reliable Messaging – WS/RM).
As of NetWeaver 7.40, WS/RM messages are only monitored in transaction SRT_MONI. You can analyze errors in transaction SRT_UTIL.
The settings that needs to be configured for a point-to-point configuration based on WS/RM for TM – ERP integration (particularly for Invoice Verification) are as follows:
- For Invoice Integration the note 1748128 is necessary.
- For a TM and ERP system, make sure that the business function FND_SOA_REUSE _1 is activated to enable WS/RM usage in these systems. This business functions enables the customizing entry
Transaction SPRO -> Cross-Application Components -> Processes and Tools for Enterprise Applications -> Enterprise Services -> Point-to-Point Enablement for Asynchronous Enterprise Services ->Activate Support for Point2Point Communication.
Press ‘New Entries’, set the check box ‘Active’, and press Save.
- Perform Technical setup , configure SLD, central system , domain system , managed system and create a domain in central SOAManager . Refer the technical guide provided in note 1978857 for more details.
- Application Configuration :
To complete the application-specific configuration, the following steps must be followed:
- Create one central business scenario configuration per integration scenario.
In SOAMANAGER for your central system, choose tab Service Administration Business Scenario Configuration .All integration scenarios consist of multiple service groups. In order to setup the integration you need to configure all service groups.
Invoice Integration consists of service groups TM_ERP_INVINT and /SCMTMS/TM_ERP_INVINT.
Create a new business scenario configuration/ connection using the appropriate system and service group from the table below.
Invoice Integration :
The following Service Groups must be created as Connections in a Central Business Scenario Configuration to support the Invoice Integration functionality.
- Create and assign logon data to specify the required credentials (username/password or PSE) and preferred authentication method. For more information, see
- Trigger Change Processor : In this step the relevant changes are done by the Change Processor, which is running the configuration of the consumer and of the managed systems, applying the settings specified in the previous steps
- Create Logical Receiver Determinations (in local SOAMANAGER) :
You should create Logical Receiver Determinations for a service group if the service group contains a logical receiver determination structure (LRD filter). The local SOAMANAGER, can be called directly out of the Central System via Central System Connections open local SOAMANAGER
The logical port is an optional parameter in the consumer proxy creation process. During runtime, it is checked whether there is a logical port which is flagged as default. If the logical port is not specified for a consumer proxy then the default port is used. In case if there is no default logical port also then the messages are sent using the PI system instead of WS.
A simple way to check if a logical port exists and if it is used as default in ERP is to simply start the test environment for the consumer proxy and to use F4 for logical port.
- Execute transaction SPROXY_START
- Enter ABAP Name of consumer proxy ( CO_IVE_E_INVOICENO)
- Execute it and check the search help (F4) for logical port.
After performing these steps , the invoice notification service for transport management will become active.