Lesson 5 of 6
Testing with WE19
6 min
Listen to this lesson
A fix is not finished until it is proven. For IDoc interfaces the proving ground is WE19, the IDoc test tool. It lets you build a test IDoc, usually by copying an existing one, change what you need, and run it through processing in a test system without the partner and without middleware. Used well, it turns "I think the customizing fix works" into evidence.
What WE19 does
- Create a test IDoc from an existing IDoc number (the usual route), from a basic type and extension (an empty structure you fill), or from a file.
- Change the control record: sender and receiver partner, partner type, port and direction, so the test IDoc matches the partner profile you want to test.
- Change data records: open a segment and overwrite field values, for example a different PO number, quantity or tax rate.
- Process inbound with Standard Inbound, which uses the partner profile and process code exactly as production would, or with Inbound function module, which calls a function module you name directly, optionally in debug mode.
- Process outbound with standard outbound processing to test the port and the partner profile for a test IDoc.
Every IDoc WE19 creates is a new IDoc with its own number; the copy source is not touched. Inbound test IDocs are marked as created by the test transaction (status 74, or 42 for outbound) before processing continues, so they are easy to separate from real traffic in reports.
Standard inbound or function module?
Use Standard Inbound for anything you want to sign off, because it exercises the partner profile, process code and processing mode. Use Inbound function module for developer debugging, for example to step through a customer exit that reads a custom segment. A test that only ran the function module directly has skipped the partner profile check, so it cannot prove a status 56 fix.
| You want to prove | Use | Why |
|---|---|---|
| A partner profile or process code fix (status 56) | Standard Inbound | Only this route reads WE20 the way production does |
| A customizing or master data fix (status 51) | Standard Inbound | Same path as production, so the evidence carries over |
| An exit or custom segment logic | Inbound function module in debug mode | Lets the developer step through the code with the test data |
| A new partner before go-live | Standard Inbound with the partner's test IDocs | Exercises the full SAP side; middleware is tested separately |
A worked example
The status 51 ORDRSP for PO 4500002210 from Lesson 2 was fixed by adding confirmation control key 0001 to the PO item. Priya wants evidence that the same fix works for every Lakeside PO created from the purchasing info record, which the buyers corrected too. In CMQ she creates PO 4500003105 for 500 rotors CMC-RTR-200 from the corrected info record, copies a real Lakeside ORDRSP IDoc in WE19, replaces the PO number in E1EDK02 (qualifier 001) and E1EDP02, and runs Standard Inbound. The test IDoc posts with 53, the PO item shows the confirmation with creation indicator for EDI, and the confirmed date matches the 855.
- Test IDoc number, copy source IDoc number and system/client (CMQ 100).
- The fields changed in WE19 and why.
- Processing route (Standard Inbound) and resulting status sequence.
- The business result: PO 4500003105 item 10 confirmation overview, with confirmed quantity and date.
- A negative test: the same IDoc against a PO item without a confirmation control key returns 51 with the expected message.
WE19 has limits worth stating in a test plan. It tests the SAP side only: not the Process Orchestration mapping, not the AS2 or VAN connection, not the partner's translator. A complete regression for an interface still needs at least one end-to-end run from the partner's test system through XQ1 into CMQ, and Lesson 6 covers how to monitor that run.
- WE19 builds a new test IDoc, usually as a copy of a real one, and processes it inbound or outbound.
- Use Standard Inbound for evidence; it exercises the partner profile and process code.
- Use the inbound function module route with debugging for developer tests of exits and custom segments.
- Run WE19 in test clients only and pair it with an end-to-end test through middleware.
Check your understanding · not graded
Lesson check
1. Which WE19 option proves that a missing inbound partner profile has been fixed?
2. What happens to the source IDoc when you copy it in WE19 and process the copy?
3. Why is a passing WE19 test not enough to sign off a new EDI partner?