Skip to Content


SAP Cloud Integration offers Number Ranges to insert unique sequence numbers as part of the inbound or outbound messages. This is one of the highly recommended requirement in EDI message processing. A number sequence is created to help the trading partners to detect and avoid duplicate, missing or out of sequence interchange transmissions.

From July 2018 release of Cloud Integration, Number Ranges are available for consumption for all customers. Earlier, Number Ranges were available only with Enterprise licensed tenants.

In this blog, I will explain in detail on how to configure and consume Number Ranges with few examples of EDI inbound and outbound messages.

Configuring Number Ranges:

To configure Number Ranges, navigate to Monitor->Manage Stores->Number Ranges as shown in the below screenshot.


Usecase 1: Using Number Ranges in an EDI outbound scenario:

       Consider an outbound scenario where you receive an IDoc from the ERP and convert it to an ANSI X12 message. Finally sending the converted EDI document to a trading partner. Let’s call the partner as “ABC Industries”.

Consider you have a requirement to generate a new Interchange Control Number each time you are sending an ANSI X12 message.

Create a Number Range:

       Let’s create a Number Range for generating a unique Interchange Control Number, each time an IDoc is converted to an ANSI X12 message.

In this example, I created a Number Range called “ABCIndustries_ICN_IDocToX12” with a field length of 9 (As per ANSI X12 message standard the Interchange Control Number ISA12 field should always be of 9 characters) as shown the below diagram.


NOTE:  Interchange Control Number in ANSI X12

Create a Header of Type Number Range in the Integration Flow:

You can consume the Number Ranges in a content modifier as shown in the below diagram. Here I selected the type of the header as “Number Range” and used the number range that I created before ( i.e, ABCIndustries_ICN_IDocToX12 )  as the value .

NOTE:  You can also consume the number ranges in exchange properties as well.

This header will always generate a new unique value each time the integration flow is executed and the next Interchange Control Number is incremented by 1.

Usecase 2: Using Number Ranges with a Correlation:

a) Consider an inbound scenario where you receive a Bulk EDI document with multiple messages ( e.g: 850 ) .Now, you want to maintain the same Interchange Control Number value for all split individual messages. To achieve this requirement, I would declare the header value in the content modifier as


b)  Let’s consider another scenario, where an AS2 sender adapter retries sending messages to the receiver due to processing failures. In such cases, you do not want to increment the Number Range value for each retry, then declare the value of the header as

               ABCIndustries_ICN_X12ToIDoc:${header. SAP_MessageProcessingLogID}


    We learnt about creating and using Number Ranges in different EDI scenarios. Though the examples show the cases related to EDI message processing, you can use the number ranges wherever you need to generate unique sequence number in your integration scenario.

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Naresh Dasika

    Thanks for the Blog Appala Naidu.

    I couldn’t see the same option “Number range” on my CPI tenant which is of version 2.41.9.


Leave a Reply