Showing posts with label CSV. Show all posts
Showing posts with label CSV. Show all posts

Friday, 5 June 2026

Learning EDI - Day 2 : Difference Between EDI, XML, JSON, and Flat Files

1. EDI (Electronic Data Interchange)

EDI follows industry standards.

Example (X12 850 Purchase Order)

ISA*00*          *00*          *ZZ*BUYER*
GS*PO*BUYER*SUPPLIER*
ST*850*0001
BEG*00*NE*PO12345
SE*4*0001
GE*1*1
IEA*1*000000001

Characteristics

  • Highly standardized
  • Used between trading partners
  • Requires EDI translator/mapping
  • Common in retail, healthcare, logistics, manufacturing

2. XML (Extensible Markup Language)

XML uses opening and closing tags.

Example

<PurchaseOrder>
    <OrderNumber>PO12345</OrderNumber>
    <Customer>ABC Hospital</Customer>
</PurchaseOrder>

Characteristics

  • Self-describing
  • Easy to validate using XSD
  • Widely used in SAP, Oracle, enterprise applications

3. JSON (JavaScript Object Notation)

JSON uses key-value pairs.

Example

{
  "OrderNumber": "PO12345",
  "Customer": "ABC Hospital"
}

Characteristics

  • Lightweight
  • Easy to read
  • Popular for REST APIs
  • Common in cloud integrations

4. Flat Files

Plain text files with delimiters or fixed positions.

CSV Example

PO12345,ABC Hospital,100

Pipe Delimited Example

PO12345|ABC Hospital|100

Fixed Length Example

PO12345   ABC Hospital       100

Characteristics

  • Very simple
  • Easy to create
  • Common in legacy systems
  • Often used in SAP PI/PO and batch integrations

Example

Imagine a customer sends a Purchase Order.

EDI Version

BEG*00*NE*PO12345

XML Version

<OrderNumber>PO12345</OrderNumber>

JSON Version

{
  "OrderNumber":"PO12345"
}

Flat File Version

PO12345

Same business information, different formats.


When to Use What?

Use EDI when:

  • Working with retailers, distributors, hospitals, logistics providers.
  • Exchanging official business documents.
  • Trading partners require standards like X12 or EDIFACT.

Use XML when:

  • Integrating enterprise systems.
  • Need strong validation and hierarchical data.

Use JSON when:

  • Building APIs.
  • Cloud integrations.
  • Modern web applications.

Use Flat Files when:

  • Legacy systems are involved.
  • Batch processing is sufficient.
  • Simplicity is preferred.

 

Tuesday, 25 February 2025

Different File Formats in an EDI System

An EDI system processes multiple file formats to facilitate seamless B2B (Business-to-Business) transactions. These formats are used for data transformation, integration, and communication between trading partners, ERPs, and enterprise applications.


Standardized EDI Formats (Structured Formats)

These formats are globally recognized and follow specific industry standards.

File Format

Description

X12 (EDI ANSI X12)

Fixed-format EDI standard used mainly in North America.

EDIFACT

International EDI standard for structured data exchange.

TRADACOMS

UK-based EDI format, mostly replaced by EDIFACT.

VDA

German automotive industry format.

OFTP2 (VDA-Based)

Used for file exchange in the automotive sector.

RosettaNet (PIP XML)

XML-based EDI for high-tech & semiconductor industries.

PEPPOL BIS

XML-based European public procurement format.

Learning EDI - Day 5: ISA, GS, ST, SE, GE, and IEA Segments in an X12 File

ISA, GS, ST, SE, GE, and IEA segments form the envelope structure of an X12 EDI file. They tell us: Who sent the file Who r...