Recently, we had a production issue with an inbound EDI 214 signal from one of our trading partners. We use SAP PI/PO 7.4 system's out of the box B2B adapter for processing the messages. The issue was that the adapter was unable to successfully parse the inbound message and consequently creating a negative acknowledgement in the form of an EDI 997 message.
The communication channel log on the EDIReceiver communication channel was something on the lines of,
X12 message with message transaction set {0} and Message ID {1} has errors. The message shall not be disptached. |
The error was quite vague and since we did not use the "split" option the in communication channel, the EDI 997 also did not point to the exact error.
We had to raise an OSS message with SAP and finally it was found that the data in the EDI element N104 (City name in shipper address) was causing the error.
In other words, the standard EDI definition of 214 message has the N104 element defined with a minimum length of 2 characters. However, when the data has a single character, the parser was throwing an error.
To fix this, SAP corrected the adapter level code and suggested a patch implementation as described in the SAP Note
2391095 .
However, we could not implement the patch as suggested by SAP, due to dependencies of other projects. As an alternative, I have come up with a way to bypass the standard EDI conversion routines, using a custom control key. Essentially, we are diverting certain edi interfaces to use a custom control key in place of the standard .
Here are the steps to create a custom control key and modify the element level validations.
- Create a custom key : Launch the b2bic tool using the URL https://<SAP PI/PO host>:<port>/b2bic
- Click the link EDI Content Manager.
- Chose from Menu Ansi X12>Editor>Control Key description editor
- Give a name to your control key and a description.
- Chose from menu, ANSIX12>Editor> Control Key Scenario Association and click insert to add a new association. This step is key to tell your system to invoke the new control key for a set of interfaces defined by the condition. Make sure you choose the new control key defined in previous step.Click save.
- Choose from menu Ansi X12->Editor->Message Editor.
- In the subsequent screen, chose your new custom control key, version(In my case 4010, EDI Set (In my case 214).
- Traverse the message structure to the element for which you want to modify the specifications (In my case i wanted to change the minimum acceptable length of N104 element to 1 character instead of 2 characters.
- Click save button to save your changes.
That is about it. When the next EDI 214 message arrived from our partner, it no longer used the standard default control key and instead was forced to use our new control key, thereby avoiding the validation and circumvented the error due to the validation.
I hope this weblog helps you and that you do not have to go through the trouble we went through
🙂