Skip to main content

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​

  1. In SAP enter transaction code:

    WE21

    The Ports in IDoc processing screen opens.

  2. In the Ports column, expand Ports and select Transactional RFC.

  3. In the application toolbar, select Create The Create icon in SAP ECC6 (or Port > Create from the menu).

    The Creating a tRFC port dialog opens.

  4. 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, or WORKATOPRD.

  5. Select the The Continue icon in SAP ECC6 Continue icon.

    The Creating a tRFC port screen appears.

  6. 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, or WORKATOPRD.

      tip

      You can also select the matchcode iconThe matchcode icon in SAP ECC6 in the RFC Destination field to open a list of available destinations, and select the correct Workato destination from the list.

  7. From the toolbar, select Save The Save icon in SAP ECC6 to save the port.

Create a Logical System​

  1. In SAP enter transaction code:

    SALE

    The Display IMG screen opens.

  2. In the Structure section, navigate to IDoc Interface / Application Link Enabling (ALE) > Basic Settings > Logical Systems

  3. Locate the Define Logical System item, and select the The Execute icon in SAP ECC6 Execute icon next to it.

    If a Caution dialog appears, select the The Continue icon in SAP ECC6 Continue icon to dismiss it.

  4. In the application toolbar, select New Entries.

    The New Entries: Overview of Added Entries screen opens.

  5. In the Logical Systems table, Fill in the first row as follows:

    FieldValue
    Log.SystemEnter the name of the Workato environment you're configuring the integration for:
    WORKATODEV, WORKATOTST, or WORKATOPRD.
    NameWorkato ENV System

    Where ENV is either Dev, Test, or Prod, depending on the environment you specified in the Log.System field.
  6. From the toolbar, select Save The Save icon in SAP ECC6 (or Table View > Save from the menu).

    If a warning window appears, select the The Continue icon in SAP ECC6 Continue icon to confirm the new entry.

The Logical system is now created.

Create a Partner Profile​

  1. In SAP enter transaction code:

    WE20

    The Partner profiles screen opens.

  2. In the Partner table, select the Partner Type LS folder.

  3. In the application toolbar, select Create The Create icon in SAP ECC6 (or Port > Create from the menu).

  4. Create a Partner profile, and enter the following values:

    FieldValue
    Partner No.The name of the Logical system you created in Create a Logical System:
    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Partn. TypeLS
    Select the matchcode iconThe matchcode icon in SAP ECC6 to choose from a list.
    Ty.O (Organizational Unit).
    Select the matchcode iconThe matchcode icon in SAP ECC6 to find the type.
    AgentYour main organizational unit.
    For example, MaintainX root organization.
    Select the matchcode iconThe matchcode icon in SAP ECC6 to find the unit.
    Lang.EN
  5. From the toolbar, select Save The Save icon in SAP ECC6 (or Partners > Save from the menu) to save the new profile.

  6. 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.

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:

  1. Navigate to the Outbound parmtrs. section.

  2. In the Outbound parmtrs. section toolbar, select The Create Outbound Parameter icon in SAP ECC6 Create Outbound Parameter.

    The Partner profiles: Outbound parameters screen opens.

  3. In the Message Type field, enter MATMAS.

  4. Navigate to the Outbound Options tab and set the following values:

    FieldValue
    Receiver PortThe name of the logical system you created in Create a Logical System:
    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Output ModePass IDoc Immediately and Do not start subsystem
    Basic TypeMATMAS05
  5. Navigate to the Post Processing: Permitted Agent tab, and set the following values:

    FieldValue
    Ty.US (User)
    AgentWORKATO_INT
    Lang.EN
  6. From the toolbar, select Save The Save icon in SAP ECC6 (or Outbound parameters > Save from the menu) to save the new parameter and return to the Partner Profiles screen.

Add an Outbound Parameter for Vendors​

If your integration includes Purchase order Sync in MaintainX, you need to create an outbound parameter for Vendors Master in SAP.

While editing your partner profile on the Partner Profiles screen, do the following:

  1. Navigate to the Outbound parmtrs. section.

  2. In the Outbound parmtrs. section toolbar, select The Create Outbound Parameter icon in SAP ECC6 Create Outbound Parameter.

    The Partner profiles: Outbound parameters screen opens.

  3. In the Message Type field, enter CREMAS.

  4. Navigate to the Outbound Options tab and set the following values:

    FieldValue
    Receiver PortThe name of the logical system you created in Create a Logical System:
    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Output ModePass IDoc Immediately and Do not start subsystem
    Basic TypeCREMAS06
  5. Navigate to the Post Processing: Permitted Agent tab, and set the following values:

    FieldValue
    Ty.US (User)
    AgentWORKATO_INT
    Lang.EN
  6. From the toolbar, select Save The Save icon in SAP ECC6 (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:

  1. Navigate to the Outbound parmtrs. section.

  2. In the Outbound parmtrs. section toolbar, select The Create Outbound Parameter icon in SAP ECC6 Create Outbound Parameter.

    The Partner profiles: Outbound parameters screen opens.

  3. In the Message Type field, enter ORDERS.

  4. In the Partner Role field, enter LS.

    If a warning appears, press Enter to override it.

  5. Navigate to the Outbound Options tab and set the following values:

    FieldValue
    Receiver PortThe name of the Logical system you created in Create a Logical System:
    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Output ModePass IDoc Immediately and Do not start subsystem
    Basic TypeORDERS05
  6. Navigate to the Message Control tab.

  7. From the Message Control table toolbar, select The Insert Row icon in SAP ECC6 Insert Row.

    A new row is added to the Message Control table.

  8. In the new row, enter the following values:

    FieldValue
    ApplicationEF
    Message typeNEU
    Process codeME10
    Change MessageUnchecked (False)
  9. Select The Insert Row icon in SAP ECC6 Insert Row again to create another row in the Message Control table. In the new row, enter the following values:

    FieldValue
    ApplicationEF
    Message typeNEU
    Process codeME10
    Change MessageChecked (True)
  10. Navigate to the Post Processing: Permitted Agent tab, and set the following values:

    FieldValue
    Ty.US (User)
    AgentWORKATO_INT
    Lang.EN
  11. From the toolbar, select Save The Save icon in SAP ECC6 (or Outbound parameters > Save from the menu) to save the new parameter and return to the Partner Profiles screen.

Add an Outbound Parameter for Maintenance Notifications​

If your integration includes Work Request Sync in MaintainX, you need to create an outbound parameter for Maintenance Notifications in SAP.

While editing your partner profile on the Partner Profiles screen, do the following:

  1. Navigate to the Outbound parmtrs. section.

  2. In the Outbound parmtrs. section toolbar, select The Create Outbound Parameter icon in SAP ECC6 Create Outbound Parameter.

    The Partner profiles: Outbound parameters screen opens.

  3. In the Message Type field, enter INOTIF.

  4. Navigate to the Outbound Options tab and set the following values:

    FieldValue
    Receiver PortThe name of the logical system you created in Create a Logical System:

    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Output ModePass IDoc Immediately and Do not start subsystem
    Basic TypeINOTIF01
  5. Navigate to the Post Processing: Permitted Agent tab, and set the following values:

    FieldValue
    Ty.US (User)
    AgentWORKATO_INT
    Lang.EN
  6. From the toolbar, select Save The Save icon in SAP ECC6 (or Outbound parameters > Save from the menu) to save the new parameter and return to the Partner Profiles screen.

Add an Outbound Parameter for Maintenance Orders​

If your integration includes Work Order Sync in MaintainX, you need to create an outbound parameter for Maintenance Orders in SAP.

While editing your partner profile on the Partner Profiles screen, do the following:

  1. Navigate to the Outbound parmtrs. section.

  2. In the Outbound parmtrs. section toolbar, select Create Outbound Parameter.

    The Partner profiles: Outbound parameters screen opens.

  3. In the Message Type field, enter IORDER.

  4. Navigate to the Outbound Options tab and set the following values:

    FieldValue
    Receiver PortThe name of the logical system you created in Create a Logical System:

    WORKATODEV, WORKATOTST, or WORKATOPRD.
    Output ModePass IDoc Immediately and Do not start subsystem
    Basic TypeIORDER01
  5. Navigate to the Post Processing: Permitted Agent tab, and set the following values:

    FieldValue
    Ty.US (User)
    AgentWORKATO_INT
    Lang.EN
  6. From the toolbar, select Save The Save icon in SAP ECC6 (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 Orders 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:

  1. In SAP enter transaction code:

    NACE

    The Conditions for Output Control screen opens.

  2. In the Application column, select EF.

  3. In the application toolbar, select Condition Records.

    The Output Types dialog opens.

  4. Select Output Type NEU, then select the The Continue icon in SAP ECC6 Continue icon.

    The Key Combination dialog opens.

  5. Select Purchasing Output Determination: Document Type option, then select the The Continue icon in SAP ECC6 Continue icon.

    The Change Purchase order (NEU): Selection screen appears.

  6. Leave the default values, and, in the application toolbar, select the The Execute icon in SAP ECC6 Execute icon.

    The Change Condition Records (Purchase order): Fast Change screen appears.

  7. In the Condition Recs. table, add a new row by entering the following values:

    FieldValue
    Doc. TypeNB
    NameStandard PO
    Funct.LS
    PartnerWORKATODEV, WORKATOTST, or WORKATOPRD
    Medium6
    Date/Time4
    LanguageEN

    The table should look like this:

  8. From the toolbar, select Save The Save icon in SAP ECC6 (or Outbound conditions > Save from the menu).

    The Output Types dialog opens again.

  9. Select the The Continue icon in SAP ECC6 Continue icon.

Run the INOT Report to Send the Maintenance Notification IDoc (Work Requests Only)​

If your integration includes Work Requests in MaintainX, you have to run a report in SAP to send messages when a maintenance notification is created or changed.

The Maintenance Notification IDoc is sent via the INOT transaction code, which runs the ABAP program, IREAD_NOTIFICATIONS.

tip

Alternatively, you can create a custom report to send this IDoc. For more information, see Run a Custom Report to Send the Maintenance Order and Maintenance Notification IDocs.

Requirements​

Before you send the Maintenance Notification IDoc, make sure your SAP installation meets the following criteria:

  • The Status profile and User status fields must be predefined. These fields are required by the INOT transaction code.

    The system updates maintenance notifications with the User status when the IDoc is sent successfully.

  • Status should be maintained in SPRO and exits for the both: Maintenance Notification and Task within the Item

  • Items with the Tasks should exist within Maintenance Notification.

Send the Maintenance Notification IDoc​

To send a Maintenance Notification IDoc:

  1. In SAP enter transaction code:

    INOT

    The report screen opens.

  2. On the Selection criteria screen, you can specify different options for Maintenance Notifications.

  3. Select Run.

Schedule a Job to Send the Maintenance Notification IDoc Automatically​

To send the Maintenance Notification IDoc automatically, you can schedule an SAP job using transaction code SM36 for the IREAD_NOTIFICATIONS program and custom variants.

For more information, see Scheduling Background Jobs in the SAP documentation.

Run the IORD Report to Send the Maintenance Order IDoc (Work Orders Only)​

If your integration includes Work Orders in MaintainX, you have to run a report in SAP to send messages when a maintenance order is created or changed.

The Maintenance Order IDoc is sent using transaction code IORD, which runs the ABAP program, IREAD_SM_PM_ORDERS.

tip

Alternatively, you can create a custom report to send this IDoc. For more information, see Run a Custom Report to Send the Maintenance Order and Maintenance Notification IDocs.

Requirements​

Before you send the Maintenance Order IDoc, make sure your SAP installation meets the following criteria:

  • The Status profile and User status fields must be predefined. These fields are required by the IORD transaction code.

    The system updates maintenance orders with the User status when the IDoc is sent successfully.

  • Status should be maintained in SPRO and exits for the both: Maintenance Order and PP/PM: operation.

  • Operations should exist within the Maintenance Order.

Send the Maintenance Order IDoc​

To send a Maintenance Order IDoc:

  1. In SAP enter transaction code:

    IORD

    The report screen opens.

  2. On the Selection criteria screen, you can specify different options for Maintenance Orders.

  3. Select Run.

Schedule a Job to Send the Maintenance Order IDoc Automatically​

To send the Maintenance Order IDoc automatically, you can schedule an SAP job using transaction code SM36 for the IREAD_SM_PM_ORDERS program and custom variants.

For more information, see Scheduling Background Jobs in the SAP documentation.

Run a Custom Report to Send the Maintenance Order and Maintenance Notification IDocs​

note

If you're using the standard SAP reports to send the Maintenance Notification and Maintenance Order IDocs, skip this section.

Instead of using the standard INOT and IORD reports to send Maintenance Order and Maintenance Notification IDocs, you can write a custom report that calls the MASTER_IDOC_DISTRIBUTE function module to create the IDoc and add it to the outbound queue.

For more information, see Call of MASTER_IDOC_DISTRIBUTE in the SAP documentation.

For an example, see Example Program for Generating an IDoc in the SAP documentation.

Create a Distribution Model with Message Types​

  1. In SAP enter transaction code:

    BD64

    The Display Distribution Model screen opens.

  2. In the application toolbar, select The Switch Between Display and Edit Mode icon in SAP ECC6 Switch Between Display and Edit Mode to activate edit mode.

  3. In the application toolbar select The Create icon in SAP ECC6 Create Model View.

    The Create Model View dialog appears

  4. Enter the following Model View values:

    FieldValue
    Short textModel View for Workato
    Technical NameWORKATODEV, WORKATOTST, or WORKATOPRD
  5. Select the The Continue icon in SAP ECC6 Continue icon to add your distribution model.

  6. In the Distribution Model column, select the distribution model you just created.

Add the Message Type for Materials​

  1. In the application toolbar, select The Create icon in SAP ECC6 Add Message Type.

    The Add Message Type dialog opens.

  2. To create the message type for Materials, enter the following values.

    FieldValue
    Model viewWORKATODEV, WORKATOTST, or WORKATOPRD
    SenderThis should be your SAP system.
    Select the matchcode iconThe matchcode icon in SAP ECC6 to choose from a list.
    ReceiverWORKATODEV, WORKATOTST, or WORKATOPRD
    Message TypeMATMAS
  3. Select the The Continue icon in SAP ECC6 Continue icon.

Add the Message Type for Purchase Orders​

  1. In the application toolbar, select Add Message Type again.

    The Add Message Type dialog opens.

  2. To create the message type for Purchase Orders, enter the following values.

    FieldValue
    Model viewWORKATODEV, WORKATOTST, or WORKATOPRD
    SenderThis should be your SAP system.
    Select the matchcode iconThe matchcode icon in SAP ECC6
    ReceiverWORKATODEV, WORKATOTST, or WORKATOPRD
    Message TypeORDERS
  3. Select the The Continue icon in SAP ECC6 Continue icon.

Add the Message Type for Vendors​

  1. In the application toolbar, select Add Message Type again.

    The Add Message Type dialog opens.

  2. To create the message type for Vendors, enter the following values.

    FieldValue
    Model viewWORKATODEV, WORKATOTST, or WORKATOPRD
    SenderThis should be your SAP system.
    Select the matchcode iconThe matchcode icon in SAP ECC6
    ReceiverWORKATODEV, WORKATOTST, or WORKATOPRD
    Message TypeCREMAS
  3. Select the The Continue icon in SAP ECC6 Continue icon.

Add the Message Type for Maintenance Notifications​

  1. In the application toolbar, select Add Message Type again.

    The Add Message Type dialog opens.

  2. To create the message type for Maintenance Notifications, enter the following values.

    FieldValue
    Model viewWORKATODEV, WORKATOTST, or WORKATOPRD
    SenderThis should be your SAP system.

    Select the matchcode iconThe matchcode icon in SAP ECC6
    ReceiverWORKATODEV, WORKATOTST, or WORKATOPRD
    Message TypeINOTIF
  3. Select the The Continue icon in SAP ECC6 Continue icon.

Add the Message Type for Maintenance Orders​

  1. In the application toolbar, select Add Message Type again.

    The Add Message Type dialog opens.

  2. To create the message type for Maintenance Orders, enter the following values.

    FieldValue
    Model viewWORKATODEV, WORKATOTST, or WORKATOPRD
    SenderThis should be your SAP system.

    Select the matchcode iconThe matchcode icon in SAP ECC6
    ReceiverWORKATODEV, WORKATOTST, or WORKATOPRD
    Message TypeIORDER
  3. Select the The Continue icon in SAP ECC6 Continue icon.

Save the Distribution Model​

  1. From the toolbar, select Save The Save icon in SAP ECC6 (or Distribution Model > Save from the menu).

    Your distribution model should look like this:

    A distribution model in the Distribution Model table in SAP ECC6
    Your new distribution model
    note

    Instead of SAPClient 001 MBS you should see the name of your SAP system.