Configure SAP to Send IDocs to Workato
IDoc is the data structure an SAP system uses to exchange data with other systems. For the MaintainX/SAP integration to be triggered in real time, Workato must receive IDocs from SAP when activity happens in SAP.
This article explains how to configure your SAP system to send IDocs to Workato.
Define a RFC Port​
-
In SAP enter transaction code:
WE21
The Ports in IDoc processing screen opens.
-
In the Ports column, expand Ports and select Transactional RFC.
-
In the application toolbar, select Create (or Port > Create from the menu).
The Creating a tRFC port dialog opens.
-
In Creating a tRFC port dialog, do the following:
-
Select own port name.
-
In the Name field, enter the name for the Workato environment you're configuring the integration for.
This should match the name of the destination you created in the Create an RFC Destination in SAP: either
WORKATODEV
,WORKATOTST
, orWORKATOPRD
.
-
-
Select the Continue icon.
The Creating a tRFC port screen appears.
-
On the Creating a tRFC port screen, do the following:
-
In the Description field, enter
Workato System Port
. -
In the RFC destination, enter the destination you created in the Create an RFC Destination in SAP step: Either
WORKATODEV
,WORKATOTST
, orWORKATOPRD
.tipYou can also select the matchcode icon in the RFC Destination field to open a list of available destinations, and select the correct Workato destination from the list.
-
-
From the toolbar, select Save to save the port.
Create a Logical System​
-
In SAP enter transaction code:
SALE
The Display IMG screen opens.
-
In the Structure section, navigate to IDoc Interface / Application Link Enabling (ALE) > Basic Settings > Logical Systems
-
Locate the Define Logical System item, and select the Execute icon next to it.
If a Caution dialog appears, select the Continue icon to dismiss it.
-
In the application toolbar, select New Entries.
The New Entries: Overview of Added Entries screen opens.
-
In the Logical Systems table, Fill in the first row as follows:
Field Value Log.System Enter the name of the Workato environment you're configuring the integration for: WORKATODEV
,WORKATOTST
, orWORKATOPRD
.Name Workato ENV System
WhereENV
is eitherDev
,Test
, orProd
, depending on the environment you specified in the Log.System field. -
From the toolbar, select Save (or Table View > Save from the menu).
If a warning window appears, select the Continue icon to confirm the new entry.
The Logical system is now created.
Create a Partner Profile​
-
In SAP enter transaction code:
WE20
The Partner profiles screen opens.
-
In the Partner table, select the Partner Type LS folder.
-
In the application toolbar, select Create (or Port > Create from the menu).
-
Create a Partner profile, and enter the following values:
Field Value Partner No. The name of the Logical system you created in Create a Logical System: WORKATODEV
,WORKATOTST
, orWORKATOPRD
.Partn. Type LS
Select the matchcode icon to choose from a list.Ty. O
(Organizational Unit).
Select the matchcode icon to find the type.Agent Your main organizational unit.
For example,MaintainX root organization
.
Select the matchcode icon to find the unit.Lang. EN
-
From the toolbar, select Save (or Partners > Save from the menu) to save the new profile.
-
Add outbound parameters to the partner profile.
The outbound parameters map SAP IDocs to MaintainX entities. You need to set up an outbound parameter for each entity type that your integration includes.
- For Parts Inventory, see Add an Outbound Parameter for Material Master/Parts Inventory.
- For Purchase Orders, see Add an Outbound Parameter for Purchase Orders.
Add an Outbound Parameter for Parts Inventory​
If your integration includes Parts Inventory in MaintainX, you need to create an outbound parameter for Material Master in SAP.
While editing your partner profile on the Partner Profiles screen, do the following:
-
Navigate to the Outbound parmtrs. section.
-
In the Outbound parmtrs. section toolbar, select Create Outbound Parameter.
The Partner profiles: Outbound parameters screen opens.
-
In the Message Type field, enter
MATMAS
. -
Navigate to the Outbound Options tab, and set the following values:
Field Value Receiver Port The name of the logical system you created in Create a Logical System: WORKATODEV
,WORKATOTST
, orWORKATOPRD
.Output Mode Pass IDoc Immediately and Do not start subsystem Basic Type MATMAS05
-
Navigate to the Post Processing: Permitted Agent tab, and set the following values:
Field Value Ty. US
(User)Agent WORKATO_INT
Lang. EN
-
From the toolbar, select Save (or Outbound parameters > Save from the menu) to save the new parameter and return to the Partner Profiles screen.
Add an Outbound Parameter for Purchase Orders​
If your integration includes Purchase Orders in MaintainX, you need to create an outbound parameter for Purchase Orders in SAP.
While editing your partner profile on the Partner Profiles screen, do the following:
-
Navigate to the Outbound parmtrs. section.
-
In the Outbound parmtrs. section toolbar, select Create Outbound Parameter.
The Partner profiles: Outbound parameters screen opens.
-
In the Message Type field, enter
ORDERS
. -
In the Partner Role field, enter
LS
.If a warning appears, press Enter to override it.
-
Navigate to the Outbound Options tab, and set the following values:
Field Value Receiver Port The name of the Logical system you created in Create a Logical System: WORKATODEV
,WORKATOTST
, orWORKATOPRD
.Output Mode Pass IDoc Immediately and Do not start subsystem Basic Type ORDERS05
-
Navigate to the Message Control tab.
-
From the Message Control table toolbar, select Insert Row.
A new row is added to the Message Control table.
-
In the new row, enter the following values:
Field Value Application EF
Message type NEU
Process code ME10
Change Message Unchecked (False) -
Select Insert Row again to create another row in the Message Control table. In the new row, enter the following values:
Field Value Application EF
Message type NEU
Process code ME10
Change Message Checked (True) -
Navigate to the Post Processing: Permitted Agent tab, and set the following values:
Field Value Ty. US
(User)Agent WORKATO_INT
Lang. EN
-
From the toolbar, select Save (or Outbound parameters > Save from the menu) to save the new parameter and return to the Partner Profiles screen.
Create an Output Condition (Purchase Orders Only)​
If your integration includes Purchase Order in MaintainX, you have to configure an output condition in SAP to receive messages when a purchase order is created or changed.
To create an output condition:
-
In SAP enter transaction code:
NACE
The Conditions for Output Control screen opens.
-
In the Application column, select EF.
-
In the application toolbar, select Condition Records.
The Output Types dialog opens.
-
Select Output Type NEU, then select the Continue icon.
The Key Combination dialog opens.
-
Select Purchasing Output Determination: Document Type option, then select the Continue icon.
The Change Purchase order (NEU): Selection screen appears.
-
Leave the default values, and, in the application toolbar, select the Execute icon.
The Change Condition Records (Purchase order): Fast Change screen appears.
-
In the Condition Recs. table, add a new row by entering the following values:
Field Value Doc. Type NB
Name Standard PO
Funct. LS
Partner WORKATODEV
,WORKATOTST
, orWORKATOPRD
Medium 6
Date/Time 4
Language EN
The table should look like this:
-
From the toolbar, select Save (or Outbound conditions > Save from the menu).
The Output Types dialog opens again.
-
Select the Continue icon.
Create a Distribution Model with Message Types​
-
In SAP enter transaction code:
BD64
The Display Distribution Model screen opens.
-
In the application toolbar, select Switch Between Display and Edit Mode to activate edit mode.
-
In the application toolbar select Create Model View.
The Create Model View dialog appears
-
Enter the following Model View values:
Field Value Short text Model View for Workato
Technical Name WORKATODEV
,WORKATOTST
, orWORKATOPRD
-
Select the Continue icon to add your distribution model.
-
In the Distribution Model column, select the distribution model you just created.
-
In the application toolbar, select Add Message Type.
The Add Message Type dialog opens.
-
To create the message type for Materials, enter the following values.
Field Value Model view WORKATODEV
,WORKATOTST
, orWORKATOPRD
Sender This should be your SAP system.
Select the matchcode icon to choose from a list.Receiver WORKATODEV
,WORKATOTST
, orWORKATOPRD
Message Type MATMAS
-
Select the Continue icon.
-
In the application toolbar, select Add Message Type again.
The Add Message Type dialog opens.
-
To create the message type for Purchase Orders, enter the following values.
Field Value Model view WORKATODEV
,WORKATOTST
, orWORKATOPRD
Sender This should be your SAP system.
Select the matchcode iconReceiver WORKATODEV
,WORKATOTST
, orWORKATOPRD
Message Type ORDERS
-
From the toolbar, select Save (or Distribution Model > Save from the menu).
Your distribution model should look like this:
Instead of SAPClient 001 MBS you should see the name of your SAP system.