Overview
Sometimes EDIFACT messages have a huge amount of UNH/IDE segments that can lead to problems during processing in SAP systems. This documentation shows a way of splitting those messages and aggregating them again to multiple messages with a lower amount of UNH/IDE segments.
A ChannelDistribution (HugeMessageCheck) checks the number of segments of each message processed. If the number of segments exceeds a given limit the message is moved to a defined huge message channel.
The huge message channel is built like the usual channel where the message would be processed but has additional actions to split and reaggregate the huge messages.
Customizing
Channel Distribution
In the extension EXT_CHANNEL_DIST add the following:
Class: org.b2bbp.channels.extension.HugeMessageCheck
The position of the ChannelDistribution should be at the beginning of the channel distritubtions before CodeNumberChannelDistribution but after the ChannelDistributions that do only checks like DisplayRelatedMessages or DuplicateCheck.
Additionally the following lines have to be added to the EXT_CHANNEL_DIST with inbound_default = default inbound channel
#HugeMessageCheck Channel Distribution
org.b2bbp.channels.extension.HugeMessageCheck.registeredServiceIds=*
org.b2bbp.channels.extension.HugeMessageCheck.executeOnChannelId=inbound_default
Global Properties
Please add the following global properties:
Property Key | Value | Description |
---|---|---|
B3P_HUGE_MESSAGE_SEGMENTCOUNT_BOUNDARY | 100000 | Number of segments that lead to channel switch |
B3P_HUGE_MESSAGE_SEGMENTCOUNT_CHANNEL | INBOUND_HUGE_MESSAGES | Channel to which huge messages are moved |
Huge Message Channel
The huge message channel defined in the global property B3P_HUGE_MESSAGE_SEGMENTCOUNT_CHANNEL must be cloned (duplicated) from the inbound channel that usually processes the messages.
In the huge message channel add the following actions before the NLC Converter (The NLCAction2 and all subsequent actions can be removed from the channel.)
Splitting UNH Segments (MSCONS and INVOIC)
Add the following properties to the action:
Property Key | Value | Description |
---|---|---|
B3P_EXIT_CHANNEL | true | If set to true the processing of this channel will be finished. The splitted message will be processed in the appropriate split channel |
B3P_MAX_UNH_PER_EDI | 1000 | Number of UNH segments per EDIFACT message |
B3P_UNHSPLIT_FORMATS | MSCONS,INVOIC | Formats that should be splitted |
Splitting IDE Segments (UTILMD)
Add the following properties to the action:
Property Key | Value | Description |
---|---|---|
B3P_EXIT_CHANNEL | true | If set to true the processing of this channel will be finished. The splitted message will be processed in the appropriate split channel |
B3P_IDE_PER_EDI | 1000 | Number of IDE segments per EDIFACT message |
Huge Message Channel Split
Additionally a SPLIT channel must be created. Assuming that huge message channel is “INBOUND_HUGE_MESSAGES” the split channel must be named “INBOUND_HUGE_MESSAGES_SPLIT”. So the string “_SPLIT” must be appended.
Create the split channel by duplicating the usual inbound channel again.
Remove all Actions before the NLCAction. Then put the following action to the channel:
org.b2bbp.runtime.actions.internal.PersistMessageContextAttributes
Position: At the start
Add the following properties to the action:
Property Key | Value | Description |
---|---|---|
PERSIST_TECHNICAL | B3P_BASE_SERVICE_ID;B3P_BASE_MESSAGE;B3P_BASE_CHANNEL_ID; B3P_APERAK_USED_SERVICE_ID;B3P_APERAK_FOLDER;PARENT_MESSAGE_ID |
MessageContext attributes that should be persisted |