Virtualize SAP IDoc Communication

This task describes how to set up your systems to virtualize SAP IDoc message transfer. You can record and simulate asynchronous IDoc message transfer between two SAP systems.

  1. Prerequisites: Make sure you have configured the Service Virtualization SAP agent. For details, see Configure the SAP Agent.
  2. Configure your SAP systems:

    • Configure the source SAP system for IDoc message processing.
    • Configure the target SAP system for IDoc message processing.

    For an example of setting up the SAP systems, see the SAP IDoc Demo readme file, located in the sample project folder.

  3. Create a SAP IDoc virtual service. For details, see Create a Virtual Service.
  4. If you have different sets of credentials for logging on to your source and target SAP systems, you must edit the Service Virtualization credential store. For user interface details, see Edit Credential Store Dialog Box.
  5. Add a SAP IDoc operation, and select corresponding fields to use for request and (optionally) response messages. In the Service Description Editor, in the bottom left of the Operations pane, click Add Operation.

    Note: The selected fields cannot be empty.

  6. Optional: Import IDoc messages from SAP. In the data model, select an operation and expand a rule. Right-click and select Import Message. Enter IDoc numbers to retrieve messages from the SAP system.
  7. Learn. If you have not imported IDoc messages, place the virtual service into Learning mode to record the real service behavior - the destination SAP system responses.

    1. On the SAP source system, create and send request messages.
    2. On the SAP target system, create and send response messages.
  8. Simulate. Place the virtual service into Simulating mode On the SAP source system, create and send request messages. The virtual service responds.