Subject:Problem with UNB Author:Bruce Cantor Date:26 May 2021 10:40 AM
Hi Forum
I am experiencing a problem with a XML > EDIFACT conversion.
I have done a number of these conversions without seeing this before, but this particular conversion is creating output where the UNB has a whitespace in the line, just before the timestamp:
I have created a simple scenario in order to test and found that this happens even if I do nothing more than convert the edifact file to xml and then convert it back to edifact.
Can anybody tell me how to fix this problem?
Thank you for any help.
Subject:Problem with UNB Author:Ivan Pedruzzi Date:27 May 2021 01:09 AM
Bruce the problem is the syntax version which is 3.
UNB+UNOC:3
In version 3 the date field UNB0401 (S004->0017) is a 6 digits number.
Our converter uses the date field definition from syntax version 4 which is 8 digits number.
When converting from XML to EDI the engine prepares an 8 digits space and fills with 6 digits value, so you experience the two spaces before the value.
one possible workaround is to override the date field minimum length creating a SEF file using Stylus Studio EDI to XML Conversion.
Once you have the SEF you can reference it from the converter URL like in the following example
Subject:Problem with UNB Author:Ivan Pedruzzi Date:08 Jun 2021 06:56 PM
Bruce,
our EDI experts provided additional insights
This transaction is not EDIFACT but rather EANCOM, specified by field UN = EAN007
DESADV:D;01B:UN:EAN007
Our EDI converter engine uses the EANCOM 2002 "01B" definition of the UN* segments, which map UNB0401 to 8 digits, even though it's syntax 3.
EANCOM 2002 has its own definition of the UN* segments, instead of leaving it EDIFACT.
You can force to interpret the transaction as EDIFACT using the following URL, the syntax will be correctly interpreted as 3 and the the date field will be sized properly
Subject:Problem with UNB Author:Bruce Cantor Date:11 Jun 2021 10:46 AM
This is a better solution.
When you specify the user file option the URL is not relative and deployment needs manual editing in pipeline file in order to work
Also saves a lot of work since sef file definition is not needed.