Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 4 of 5

Control numbers and duplicates

10 min

Listen to this lesson

0:00 / 15:04

A duplicated EDI order is one of the most expensive integration defects: two sales orders for 50 alternators, two deliveries, one angry customer and a credit memo. Duplicates happen because B2B is built on retries. Partners resend when they don't get an MDN, AS2 software retries on timeouts, operators reprocess failed messages. Every layer has its own control number, and you need to know which layer catches which kind of repeat.

The control numbers in one file

AS2 Message-IDUnique per transmission, set by the sender's AS2 software. A retransmission of the same post keeps it; a new post gets a new one.
ISA13 interchange control numberNine digits, set by the sender's EDI translator per interchange, repeated in IEA02. The partner's duplicate check usually works on this number.
GS06 group control numberPer functional group, repeated in GE02.
ST02 transaction set control numberPer document within the group, repeated in SE02. The 997 refers to groups and sets by these numbers.
Business keyThe customer's purchase order number in BEG03 of the 850, which ends up in the sales order. The only number that means the same thing to both businesses.
The numbers that identify one Great Lakes 850, from transport to business key; EDIFACT has the equivalents in UNB, UNG and UNH.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-302

Each layer catches a different repeat. An AS2 retransmission of the same post is caught by the AS2 Message-ID. A partner who regenerates the same order through its translator produces a new AS2 Message-ID and a new ISA13, so only the business key catches it. And an operator who reprocesses a message inside Cloud Integration never touches AS2 at all, so only an idempotent receiver or the business key protects you.

EDIFACT has the same layers with different names. The interchange control reference sits in the UNB segment and is repeated in UNZ; the optional functional group reference sits in UNG and UNE; and each message has its message reference number in UNH, repeated in UNT. The EDI Splitter's CONTRL error codes 28 and 29 point exactly at these pairs: code 28 means a control reference in UNB, UNG or UNH doesn't match the one in UNZ, UNE or UNT, and code 29 means a count of groups, messages or segments doesn't match. When an EDIFACT partner reports a duplicate, ask which reference they checked before you start looking.

Transport-level duplicate checks in the AS2 adapter

The AS2 sender adapter has two checks on its Processing tab. Duplicate Message ID ensures an AS2 message with the same message ID isn't processed more than once; Duplicate File Name does the same for file names. Both use a Persist Duration in minutes and let you choose the MDN response type when a duplicate arrives. SAP adds a tip worth repeating: enable duplicate handling on the receiving system as well, because the adapter only sees its own window.

Three lines of defense against a duplicated 850: transport, flow and business key.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-302

Inside the flow: idempotent processing

Cloud Integration offers an Idempotent Process Call step that runs a local process only once for a given message ID, which you can set to a stable business value such as the sender ID plus ISA13 plus ST02. Use it around the step that has side effects, typically the call to the receiver, so a retried or reprocessed message doesn't post twice. In TPM's generic flows you don't build this yourself; there the B2B monitor's Restart and Retry keep the original interchange ID, and Duplicate and Retry deliberately creates a copy, so operators must check the receiver before using it.

In SAP S/4HANA: the business key

The last line is in the ERP system. In sales, the sales document type can be set to check whether the customer's purchase order number was already used, so a second order with Great Lakes' PO GLF-PO-55120 raises a message instead of quietly creating a duplicate. Whether that message is a warning or an error, and how Maria's team works the resulting IDoc, is a business decision to agree with the order-to-cash process owner. Test it, because many EDI duplicates are caught only here.

Outbound: never reuse a number

Outbound, you are the sender, and your partner's translator will reject a repeated ISA13 as a duplicate interchange. Three rules keep you safe:

  • One number range per partner and direction, so a reset for one partner never affects another.
  • Continue, don't restart, at cutover. If Process Orchestration last sent ISA13 000004511 to Great Lakes, the Cloud Integration range starts at 4512.
  • Size it and watch it. Nine digits last for years, but if Rotate resets a range, check with the partner how long it remembers old numbers.
  1. Mon 09:02OriginalIn the wave 2 test, Great Lakes replays its 850 for GLF-PO-55120 (first sent on 2026-10-14 through PO) to the test tenant: ISA13 000072318, AS2 Message-ID A. MDN times out on their side.
  2. Mon 09:07RetransmissionTheir AS2 software resends with the same Message-ID A. The test tenant's Duplicate Message ID check rejects it.
  3. Mon 11:40RegeneratedA Great Lakes clerk re-sends the order from their translator: ISA13 000072325, Message-ID B. Transport checks pass.
  4. Mon 11:41Business checkS/4HANA (CMQ) finds PO GLF-PO-55120 already on the replayed order and flags the second IDoc for Maria.
One Monday of integration wave 2 testing in the Integration Suite test tenant: each repeat is caught by a different layer.
The Sign-Off Table · thesignofftable.com/academy/sap-edi-302

What would you do?

Great Lakes regenerated three orders from their translator after a network problem. The orders have new ISA13 numbers and new AS2 Message-IDs, and the sales document type for EDI orders has no purchase order number check. What will happen, and what should Contoso change?

Key points
  • AS2 Message-ID, ISA13, GS06 and ST02 each identify a different layer; the customer PO number is the business key.
  • The AS2 sender's Duplicate Message ID and Duplicate File Name checks catch retransmissions within a persist duration.
  • Use an idempotent step around side effects in custom flows; check the receiver before Duplicate and Retry in TPM.
  • A regenerated order passes transport checks; only a business-key check in S/4HANA stops it.
  • Outbound, keep one number range per partner and direction, and continue the legacy sequence at cutover.

Check your understanding · not graded

Lesson check

  1. 1. A partner's AS2 software retransmits the same post after a timeout. Which check catches it?

  2. 2. Which number does the partner's translator usually check to reject a duplicate interchange from Contoso?

  3. 3. What does an Idempotent Process Call protect against in a custom flow?

  4. 4. Process Orchestration last sent ISA13 000004511 to Great Lakes. Where should the new number range start?