Musing Quills

Electronic Data Interchange

Key Highlights:

-Electronic Data Interchange (EDI) is an electronic version of data transactions.

-Extensible Markup Language (XML) is a markup language based on texts which are derived from SGML (Standard Generalized Markup Language).

-These tags are used for identifying the data and are used to organize and store information and data.

 -The source code in the VB.NET is used for converting EDI files into an XML file.

Our Authors

Samruddhi Borkhade

Anirudh Kulkarni

Netra Sadalge

Soham Das

Sourabh Deshpande

Shrihari Sadalgekar

Pooja Desai

What is Electronic Data Interchange (EDI)?

Electronic Data Interchange (EDI) is an electronic version of data transactions between two organizations, companies, or trading partners. Data information like bills, invoices, shipping details, order graphs, payments, etc. are done electronically in EDI

What is XML?

Extensible Markup Language (XML) is a markup language based on texts which are derived from SGML (Standard Generalized Markup Language). These tags are used for identifying the data and are used to organize and store information and data.

What is the need of converting EDI to XML?

If we can convert EDI X12 to XML language, then it gives us an extra benefit over other developers who are involved in the EDI projects. This will eventually help the IT department to leverage the EDI2XML in their integrated EDI projects.

How to convert X12 EDI into XML language?

Before getting into conversion you need to understand Raw EDI data

For a sample, let us use this EDI 831 transaction file from the X12 transaction set. We include this file (named 831.x12) in the “Convert to XML” folder.

ISA:00:         

:00: :01:1515151515 :01:515151

5151    

:041201:1217:U:00403:000032123:0:P:*~GS:CT:99887766

55:1122334455:20041201:1217:128:X:004030~ST:831:00128001~BGN

:00:88200001:20041201~N9:BT:88200001~TRN:1:88200001~AMT:2:10

0000.00~QTY:46:1~SE:7:00128001~GE:1:128~IEA:1:000032123~

The below example will tell you how an EDI file can be converted into an XML file. The source code in the VB.NET is used for converting EDI files into an XML file which is built with the function of EDIdEv framework EDI (FREDI). So how to convert EDI into XML? The basic and simple algorithm to convert is

1) Instantiate an Electronic Data Interchange (EDI) document (it should be in the form of a FREDI component)

2) Load on the appropriate and suitable SEF file, which is essentially a scheme of any transaction set. This is because the FREDI do know how to have parsed an EDI file correctly and correspondingly.

 

<?xml version=”1.0″ encoding=”utf-8″?>

<wsedi xmlns=”http://www.wsedi.org/ns/edi/4.1/”>

    <segment>

        <code>ISA</code>

        <element>00</element>

        <element>00</element>

        <element>01</element>

        <element>1515151515</element>

…. And so on. This is the code behind this logic.

3) Load the EDI file which is to be converted into an EDI document object.

4) This EDI document should be saved as an XML output

         “

Private Sub cmdConvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdConvert.Click

            ‘Recommended only for short EDI files

 

            Dim oEdiDoc As ediDocument

            Dim spath As String

 

            cmdConvert.Enabled = False

            Me.Cursor = Cursors.WaitCursor

 

            spath = AppDomain.CurrentDomain.BaseDirectory

 

 oEdiDoc.Set(oEdiDoc, New ediDocument) ‘instantiate EDI document ‘oEdiDoc = New ediDocument

 

            ‘Load Schema for transaction set 850 4010

            oEdiDoc.LoadSchema(spath & “850_X12-4010.SEF”, SchemaTypeIDConstants.Schema_Standard_Exchange_Format)

 

            ‘Load 850 4010 EDI File

            oEdiDoc.LoadEdi(spath & “850.X12”)

 

            ‘Save to XML format

            oEdiDoc.Save(spath & “850_X12_XmlOutput.XML”, OutputTypeIDConstants.OutputType_XML)

 

            ‘Display XML string on screen

           

MsgBox(oEdiDoc.GetEdiString(OutputTypeIDConstants.OutputType_XML))

              Me.Cursor = Cursors.Default

            MsgBox(“Done. XML file = ” & sXmlFile)

           oEdiDoc.Dispose() ‘oEdiDoc = Nothing

                    End Sub

       “

Our Community

A platform for all the enthusiast individuals to express their opinion with guidance of the experts, reach out if you too want to grow with us.

 

After using this code the suitable output of XML comes out. The partial XML File output is given below; 

Conclusion: Overall, Netsuite ERP proves to be one of the best and most prominent systems which can help your company and business. It helps you to grow in one or another way. The features like secured management and customizable UI can help the users to ease and excel in their work. It will initially help them and the company become more productive. To conclude, if your company belongs to a mid-sized or large business category and is dreaming of taking your company to new heights, then Netsuite ERP is the one-stop solution for you.

Our Blogs

Our Blogs

Best Graphic Designers in Belgaum
11 March 2022
There are...
Read More
Best Content writers in Belgaum
01 March 2022
Best Content...
Read More
Strange Meet
12 January 2022
Strange Meet...
Read More
Trust the time of your life
11 January 2022
Trust the...
Read More
Would you rather save 10K or earn 1000K?
08 January 2022
Would you...
Read More
Success is not counted until you have failed
08 January 2022
Success is...
Read More
Life and the pause
08 January 2022
Life and the...
Read More
The unreal attachment
08 January 2022
The unreal...
Read More
Depression is to be fought not be lived with
07 January 2022
Depression...
Read More
Selling Earphones to a Deaf!
07 January 2022
Selling Earphones...
Read More
Comparison of life
07 January 2022
Comparison...
Read More
Things you should know about Instagram
07 January 2022
Things you...
Read More
The first time I felt it!
07 January 2022
The first...
Read More
Mahindra Singh Dhoni
07 January 2022
Mahindra Singh...
Read More
Graphics Vs Text
07 January 2022
Graphics Vs...
Read More
Make everyday a little less ordinary
07 January 2022
Make everyday...
Read More
Wisdom of Heart and Mind
06 January 2022
Wisdom of...
Read More
Guide for Content Writers (Part2):
06 January 2022
Guide for...
Read More
I go with the flow
06 January 2022
I go with...
Read More
It Always Starts With You!
05 January 2022
It Always...
Read More
Are we still Young Enough!?
05 January 2022
Are we still...
Read More
Employee or Your own boss?
05 January 2022
Employee or...
Read More
Digitalizing the World
04 January 2022
Digitalizing...
Read More
Dark side of the Internet
04 January 2022
Dark side...
Read More
Guide for Content Writers (Part 1):
04 January 2022
Guide for...
Read More
A tale of Salesman
30 December 2021
A tale of...
Read More
My One Day Evening
30 December 2021
My One Day...
Read More
Its Ok Take Your Own Time
30 December 2021
Its Ok Take...
Read More
That stage of life
30 December 2021
That stage...
Read More
Reinvent Yourself
29 December 2021
Reinvent Yourself...
Read More
ART, BUSINESS, AND ARTISTS
29 December 2021
Art, Business,...
Read More
Electronic Data Interchange
29 December 2021
Electronic...
Read More
Content writing a skill?
29 December 2021
Content writing...
Read More
Leadership
29 December 2021
Leadership...
Read More
Give yourself the permission
29 December 2021
Give yourself...
Read More
Gone are those days
29 December 2021
Gone are those...
Read More
Are you mentally prepared?
28 December 2021
Are you mentally...
Read More
How can Netsuite ERP help your company’s growth?
26 December 2021
How can Netsuite...
Read More

Rate the post to encourage our authors

Average rating 0 / 5. Vote count: 0