Edifact D01B - Mapping INVOIC to XML example?

183 views
Skip to first unread message

Josef Peuermann

unread,
Jan 31, 2024, 5:34:13 AM1/31/24
to Bots Open Source EDI Translator
Hey community :)

I am trying to set up a mapping from edifact INVOIC D01B to an inhouse XML format.
There are some errors I am running into and I was wondering if there was a demo-mapping for the edifact INVOIC D01B to some XML format. The only one I found was a mapping for D96A and this one is quite different from D01B, it seems.

Any help is much appreciated.

Regards,
Joe

Josef Peuermann

unread,
Jan 31, 2024, 7:50:50 AM1/31/24
to Bots Open Source EDI Translator
Here is an error I am currently facing: InMessageError: [M51]: Edi file does not start with a valid interchange.
What does this mean? The file starts with an UNB-line (like it's supposed to). Is this error thrown from the grammar or the mapping?

Eppye Bots

unread,
Jan 31, 2024, 8:00:16 AM1/31/24
to bots...@googlegroups.com
it means the read file does not  start with a valid interchange.
might eg mean there is no valid UNZ
when a edifact is read there is always a global check to see if there are one or more valid interchanges.
kind regards, Henk-Jan Ebbers


--
You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/botsmail/d06d4898-5622-4289-a63a-aad18b5b8c5an%40googlegroups.com.

Josef Peuermann

unread,
Jan 31, 2024, 9:15:24 AM1/31/24
to Bots Open Source EDI Translator
Thanks for the timely response.
According to the grammar?

Because the grammar file starts with the definition of UNH and ends with the one of UNT:
Grammar_UNH.png

Grammar_UNT.png

My test files start with UNH:
File_UNH.png

And end with UNT:
File_UNT.png

Or could the error be anywhere in the files?

Regards
Joe

Eppye Bots

unread,
Jan 31, 2024, 9:19:43 AM1/31/24
to bots...@googlegroups.com
yes, the definition of UNB/UNZ is in a grammar.

edifact files never start with UNH.
UNH-UNT is a message.
messages are contained in an interchange/envelope (UNB-UNZ).

so your test file is not a valid edifact file.

kind regards, Henk-Jan Ebbers


Josef Peuermann

unread,
Feb 1, 2024, 12:46:53 AM2/1/24
to Bots Open Source EDI Translator
I adapted file to match the grammar (since the grammar includes no UNA/UNB/...).
Where is the UNA/UNB/... specified?

Regards
Joe

Josef Peuermann

unread,
Feb 1, 2024, 2:01:24 AM2/1/24
to Bots Open Source EDI Translator
This is the original file:
File_UNB.png

But upon importing it, I receive the follwing error:
MessageError: [S50]: Line:1 pos:1 record:"UNB": message has an error in its structure; this record is not allowed here. Scanned in message definition until mandatory record: "UNH".

That's why I adapted it.

Regards
Joe

Henk-Jan Ebbers

unread,
Feb 1, 2024, 3:40:26 AM2/1/24
to bots...@googlegroups.com
in route:
editype = edifact
messagetype = edifact

kind regards, henk-jan ebbers


Josef Peuermann

unread,
Feb 1, 2024, 4:53:04 AM2/1/24
to Bots Open Source EDI Translator
I see, thank you.
So to properly read this file, I suppose the edifact definition is already correct:
File_edifact.png

My guess would be the error coming from the envelope queries?
File_envelope.png

How would my file have to look in order for the queries to check out?
Our partner ensured me, they are up to D01B standard 😅

Henk-Jan Ebbers

unread,
Feb 1, 2024, 5:15:21 AM2/1/24
to bots...@googlegroups.com
yes, send the file.
there are often errors in testfiles.

kind regards, henk-jan ebbers


Josef Peuermann

unread,
Feb 1, 2024, 5:56:36 AM2/1/24
to Bots Open Source EDI Translator
Alright, here you go. Thanks.

Regards
Joe

edifact_D01B_test.edi

Henk-Jan Ebbers

unread,
Feb 1, 2024, 6:11:33 AM2/1/24
to bots...@googlegroups.com
tested, file is ok here.
kind regards, henk-jan ebbers


Josef Peuermann

unread,
Feb 1, 2024, 6:26:55 AM2/1/24
to Bots Open Source EDI Translator
Thank you. I will take a look at my setup and report back (hoping the information helps another lost soul in the future :D).

Regards
Joe

Josef Peuermann

unread,
Feb 1, 2024, 7:03:36 AM2/1/24
to Bots Open Source EDI Translator
I edited my setup to the hopefully correct configuration.
The error thrown now is:
MessageError: No (valid) grammar for editype "edifact" messagetype "INVOICD01BUNEAN011".

My grammars look as follows (directly downloaded from the sourceforge hub):
Grammars.png
Do I have to rename the file for D01B or am I missing the correct download?

Regards
Joe

Henk-Jan Ebbers

unread,
Feb 1, 2024, 7:38:49 AM2/1/24
to bots...@googlegroups.com
yes, rename is needed here.
 
kind regards, henk-jan ebbers


Josef Peuermann

unread,
Feb 1, 2024, 9:09:55 AM2/1/24
to Bots Open Source EDI Translator
Thank you. Now the only thing that's missing is the translation.
Are there any demo-translations from D01B INVOIC to whatever (mappings)?

Regards
Joe

Reply all
Reply to author
Forward
0 new messages