Welcome! Log In Create A New Profile

Advanced

EDIFACT FILES

Posted by Gautam.pcs.crosspost 
Gautam.pcs.crosspost
EDIFACT FILES
August 04, 2008 06:35PM
Hello All

Has anyone used Windev to read edifact files? I am totally new to Edifact format so anyone out there who has used Windev and Edifact I would love to hear from you!
My initial thoughts are to try and convert Edifact to XML and then use Windev to read the XML file - any help in the right direction will be highly appreciated.

Thanks

Gautam

Message forwarded from pcsoft.us.windev
Jimbo
Re: EDIFACT FILES
August 04, 2008 09:24PM
Hi, I'm parsing EDIFACT files for quite some years now, not yet in Windev, but still in BASIC. The basic advice, however, remains to be the same.

0 - Do you know the basics? EDIFACT is standardized by the United Nations and therefore you'll find the specs here: [www.unece.org]
EDIFACT files can be represented either in a plain string or in XML-file, mostly sent / received by a web service. Neither of the two representations is easy to read. Ok, what's easy in our profession ..

1 - If the EDIFACT messages you expect seem too complicated then why not use one of the prefabricated EDIFACT-converters? They do not come cheap but its much faster to get something working. Integration of EDIFACT into an existing software application is still not easy and will take a lot of your time. See: [www.edifactory.de] (You can find a syntax checker there, just in case you're building EDIFACT strings and want to test for compliance)

2 - Most EDIFACT files of string-type should be short enough to be loaded into a string. From there, the parsing will take place.

3 - Converting EDIFACT strings into an XML-file should be possible, I do not see much benefit in it. There'd be two sources of errors, one in the conversion business and another in parsing / traversing the XML-file. Be warned, some identifiers look quite the same but are different in their meaning and their specifiers. Depending on the version of EDIFACT. Quite a number of versions is used in parallel, so, take care of the specific version!

4 - Parsing is relatively easy, you cut the string into pieces, called 'segments' using the information from the UNA-segment. WinDev has the great command ExtractString(..) for that. After getting the information of each main-segment and its specifiers you come back to this point, for multiple sub-segments (specifiers) of a single segment you have to have a point of return in each main segment code. In fact, you have to know what to expect. Its a lot of help, if the (future) sender of EDIFACT-files sends you an example file which contains all possible segments. Most companies in the retail business have sample files and specifications so that you know what to expect and what not.

This was was the starting point, feel free to ask further questions ..

Regards, Guenter
Michael ZEISS.pcs.crosspost
Re: EDIFACT FILES
August 06, 2008 10:20AM
Hello Gautam,

I've written an application to write EDIFACT-files, but its also simple to read EDIFACT.

You can open the EDIFACT as normal text file and the separators are in the first line of the header ( see details in the EDIFACT documentation of the UN ).

You have to read the file line by line with the function fReadLine() and separate the field informaton with ExtractString().

Thats it more or less.

Greetings

Michael

Message forwarded from pcsoft.us.windev
gautam.pcs.crosspost
Re: EDIFACT FILES
August 06, 2008 02:18PM
Thanks Michael

I will have a look at the UN Site for further documentation on interpreting Edifact files.

Gautam

Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: