In this article you will learn:
- The most common ways of IDoc replication.
- What is the best and easiest way to copy IDocs from one system to another.
- How to copy an IDoc from a Production environment to Test in 30 seconds.
Reading time: 4 minutes
The most common reason for the IDoc replication is when the business users identify an issue on Production and the interface is based on Inbound IDocs. In that case the same IDoc must be replicated on Quality or other testing environment.
In this blog I will present you the most common ways on how to copy an IDoc from one system to another. Moreover, I will focus on how to copy an IDoc from Production environment to a test environment. I will not get into the details of the common ways to achieve the IDoc replication, but I want to present you the best way to do that. It does not matter if you are a business user, a functional consultant, an integration consultant, or an ABAP developer. I will show you the easiest way that each user who needs to replicate an IDoc, will be able to do that.
The standard ways
Usually, the following ways are used to replicate an IDoc from production to test environment:
- Using the standard SAP transaction WE19 – Test Tool for IDoc Processing
- Transfer IDOC data between systems using directories. This approach is described under this SAP blog. But it is not a recommended approach for copying production IDocs. As you would need to create additional objects on production environment, which is extremely risky. ?
- Manual replication of Production IDoc to the testing system. You can always create manually in WE19 an IDoc, but this way is probably the most time consuming, even more for big IDocs with multiple segments and complex structures.
- The Integration Platform way
Take the message payload from the Production integration platform (it can be SAP PO, SAP CPI, or any non-SAP integration platform) and resend this message on the corresponding test integration platform environment. Of course, this task may be very tricky. First of all, business users and functional consultants do not have access to the integration platforms, so they can?t benefit from this case. Usually, only few developers or integration consultants do have the authorization to view and download the payloads from production. Finally, this is possible only when the payload persistence is enabled.
The best & easiest way
So, what is the easiest way to replicate an IDoc from Production environment to any other SAP system?
The only thing that you need is Int4 IFTT. Int4 IFTT is a regression testing tool, for SAP API testing. But, why not to benefit from it and use it whenever possible. So, I always use it when I need to copy an IDoc from one system to another. That way I am not only able to replicate the IDoc processing, but also Int4 IFTT does a backend validation at the same time, so I can make sure that the documents get posted in the exact same way on both systems and the issue was replicated properly.
Based on the initial configuration of the Int4 IFTT you have the option to read the IDocs from the integration platform or directly from the SAP S/4 backend. In both cases you need only the IDoc numbers. Either you already have those number or you can use the Message Selector of the Int4 IFTT Cockpit to find the needed IDocs.
Let’s have look at a step by step Example.
- Go to Int4 IFTT Cockpit using tcode: /INT4/IFTT_COCKPIT and enter Edit Mode
- Under a corresponding folder create a new row for a new test case. (point nr. 1 on the next screenshot)
- Give a description (point nr. 2 on the next screenshot)
- Select Interface Type: IDoc Inbound or PI E2E IDOC Inbound (point nr. 3 on the next screenshot)
Choose an Automation Object created based on the IDoc details
- Hit the search help or the F4 button on the Document Number field. The corresponding Int4 IFTT message selector will pop-up.
- Select the Environment (in our case we are going to get the IDoc from Production), a time range and any additional select options for the IDoc that you are looking for. Please note that based on the Automation Object, you can search for a specific IDoc based on certain field values, for instance Document Number (DOCNUM) or Purchase Order Number (BELNR).
IDoc Message Selector
- Now execute the IDOC Message Selector
- Select the IDoc or IDocs from the list and click Transfer Selected
IDoc Message Selector – Transfer Selected
- Press Save. Your test cases are ready!
Int4 IFTT cockpit – Save test cases
- Execute this new test case on the wanted environment (in my case it is TEST).
Test case execution on other environment
The IDOCs are replicated on the TEST Environment! And the whole replication process took me only 30 seconds!
Test Execution Report
The green status shows that the IDoc are replicated in the exact same way and they created the exact business documents in Test as they are in Production.
Moreover the most important is that we have our needed IDocs replicated in Test environment and we can debug and dive into the processing details!
If you have access to Int4 IFTT, why not to benefit from it in every possible way. One great way to get advantage of it is to use it always when you need to replicate business documents from one SAP system to another. That way you ensure that there is no trespassing to the production system. By creating a single test case, you have an exact copy of the wanted IDoc and you can reprocess it any number of times on any connected SAP system. And the most important, it will take just seconds to replicate the wanted IDoc from one system to another.