Messages processed in SAP CPI are monitored with unique Id. This Message id is used by Sender or Receiver system and SAP CPI to trace the exchanged message.
For B2B communication, the message id is required to be unique and sequential. Thus, when an EDI message is processed, unique and sequential number is added to the messages. This sequential number is helpful in tracing the message at the B2B partner workbench. This also is useful in determining if any messages are undelivered or failed during EDI message interchange.
In SAP CPI, ‘Number Ranges’ are used to define and deliver sequential numbers. These are added as part of exchanged message content.
Configure Number Range:
Number Ranges are configured in Monitor->Number Ranges.
For a customer, Return orders are created in SAP S4. There return orders are updated with return percentage amount and sent back to customer as ‘RETINS’ edifact message.
This is achieved in CPI by converting Order Response IDOC to ‘RETINS’ edifact message. Each EDI message sent from SAP S4, is updated with sequential number to monitor each message exchanged.
This sequential number is sent as an Interchange control reference field in UNZ segment.
A Number Range for creates a unique Interchange Control reference per EDI conversion.
As per customer request, we created Number Range of 5 characters. Thus, it starts with 00000 and is incremented by 1 with each EDI conversion.
When a Rotate box is clicked, it resets the counter to 00000 when maximum value is reached.
Access Number Range via header property
Number Ranges can be accessed via Header property or Exchange Property in the iflow. Create a header of type Number Range.
This header value then can be passed to EDI Interchange control reference field in UNZ segment
Generated EDI output is updated with the counter and then counter is auto incremented.
Number Ranges can thus be used in multiple scenario’s where unique and sequential ids are required.