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

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:

  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.

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.

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

    The Add Message Type dialog opens.

  8. 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
  9. Select the The Continue icon in SAP ECC6 Continue icon.

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

    The Add Message Type dialog opens.

  11. 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
  12. 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.