Presentation v3
Presentation v3
Ver1.0, 14.03.2019
Electronic Data Interchange (EDI)
Introduction to EDI
• What is EDI and why is it important
• EDI in the Supply Chain
Using EDI
• Concept and Practical
• E2E use case of EDI
• EDI, middleware and Idocs
• Configuration and demo
• Best Practice
What is EDI?
Course Content
EDI
Usage
EDI/XML, web Portals Mass
80 – 90 % B2B use EDI
Lots of order via EDI
Global
Cost
Global Langauge
Time
Reduce cost by faster
processing & less errors
Real-time processing
and updates
EDI - Concept
SAP
Oracle
Netsuit, etc Means of Transmission
Internal formatting. Sales order is 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
created in the ERP. to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
Order
Idoc Idoc Invoice
Purchase Order EDI Sales Order Invoice Customer
GS1
Distribution
Shipment
XML
Customer Transport
Company Customer
Asynchronous
Partners
Envelope
Formatting
Means to Transmission Shipment
Method of Transmission
How to transfer data
EDI Network
Applicability Statement 2 (AS2), VAN
UN/EDIFACT ODETTE
UN and the only international European automotive industry
standard. OFTP (ODETTE File Transfer
Protocol)
EDI line
Line item number: 1
GTIN: 9393398439325
LIN+1+7+9393398439325:EN' Quantity: 7
LIN+1+7+9393398439325:EN'
Example of EDI file
Interchange Header UNB Mandatory
GTIN: 9393398439325
Type: article has been added
• The resulting EDIFACT
segment is:
• LIN+2+1+9393398439325:EN'
EDI in Supply Chain
Course Content
M : 1 Mapping
Keeping it simple in ERP.
Use of EDI – Architecture
EDI in the Supply Chain
Internal formatting. Sales order is 3PL & distributor agree on Lots of formats that needs to be
Lots of formats that needs to be
created in the ERP. formats supported
supported
X12 X12
GS1 Preset
Order
X12 Idoc Idoc Invoice
Purchase Order Sales Order Invoice GS1 Customer
SAP++ Web
Distribution
Preset
Email
X12
Software
Platform
Customer Transport
Company SAP++
Customer
Asynchronous
Partners Pre-Set
Envelope
Software
Formatting Platform
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack
ORDRSP SHPCON
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
EDIFACT → SAP Message Formats
EDIFACT messages Message Type Idoc Type Description
DELVRY01, DELVRY02, DELVRY03
DESADV Despatch advice message DESADV Delivery Shipping Notification
(previously: DESADV01)
INVOIC Invoice message INVOIC INVOIC01 Invoice
ORDCHG Purchase order change request message ORDERS01, ORDERS02,
Sales Order Change
ORDCHG ORDERS03,
Purchase Order Change
ORDERS04, ORDERS05
ORDERS01, ORDERS02,
Sales Order
ORDERS Purchase order message ORDERS ORDERS03,
Purchase Order
ORDERS04, ORDERS05
ORDRSP Purchase order response message ORDERS01, ORDERS02,
Sales Order Confirmation
ORDRSP ORDERS03,
Purchase Order Confirmation
ORDERS04, ORDERS05
IFTMIN Instructions of transport SHPADV SHPMNT03 Shipping Notification
IFTMBF Transport booking request SHPCON DELVRY01 Shipping Confirmation
SHPMNT01, SHPMNT02,
IFTMBC Transport booking confirmation SHPMNT Shipment Notification
SHPMNT03, SHPMNT04
EDI in the Middleware
Course Content
LIN+1+7+9393398439325:EN Item : 1
Qty : 7
Itn,1,1,9983083940382;
Product :
9393398439325
L;1;7;9983083940382.
Error Handling
Other
Customer 2
TCP/IP
Customer 1
SAP
Middleware – Best Practice
Error Handling Mapping & Validation
• Minimal errors management existing, so • Mapping of fields from source file to
any errors would be emailed or passed target file.
back to the external systems
• Validation of know formats. For
• Load Balancing & Processing example, it could error out a record if
the data formatting is incorrect. Best
• Firewall and security used with conjunction with sending
back errors.
• Multiple message formats into the
standard internal formatting.
Transformation Response
• Splitting or consolidation • Manage system responses between
system. Errors & status sent.
• Message transformation, M : 1
• Encryption & firewalls
• Means of transmission conversion. So
from VAN to TCP/IP, etc • End Day Hash validation
• Sometimes conversation too, dates, • Access multiple mode of connections
Unicode, etc
EDI – Response Back
SAP
Oracle
Netsuit, etc Means of Transmission
Middleware to Idoc
• Mapping and Transformation
• Middleware will create the data / structure in
the target system
• In SAP, this can be Idocs or XML files, etc
Mapping made easy
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML
Customer Transport
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
Example Idoc And Processing Program
FM Zprogram 1
Item line
FM Zprogram 2
Handling Unit
Process Code ORDERS
Idoc template
ORDERS05
Inbound
• Partner Processing
• Message Program
(Process Code)
Configuration
Outbound
• Partner
• Message output
• Processing
program
• Idoc
Outbound Idoc Message
Outbound Delivery
Instruction
Shipment
ASN
Customer
PROGRAMMING INFOGRAPHIC
Partners
Who is the partner in which we are talking to. We use KU, LI
and LS
Message type
The message type for the EDI message.
Process Code
The process code that will be used for the Idoc
Idoc
The message structure.
EDI – Partners
SAP
Oracle
Netsuit, etc Means of Transmission
Vendor master
Outbound CREMAS CREMAS05 CRE1
DEBMAS
Outbound Customer master DEBMAS05 ADRMAS and DEBMAS
Introduction to EDI
• E2E case study of EDI in the Supply Chain
• EDI Mapping
• Idoc in SAP
• Processing Logic
Use of EDI – Architecture
EDI in the Supply Chain
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
Outbound : Purchase Order
What Description
What The Purchase Order sent from the customer to the Vendor
Idoc ORDERS.ORDERS05
Function module IDOC_OUTPUT_ORDERS
Key fields • Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Delivery location
X12 Format X12
Process Code ME10
Inbound : Sales order Create
What Description
What A customer’s Purchase Order that is now a Sales Order in our system
Idoc ORDERS.ORDERS05
Function module IDOC_INPUT_ORDERS
Key fields • Customer’s Purchase order number
• Material number
• Quantity shipped
• Value
• Delivery date
• Delivery location
What Description
What The SO Order con from the customer to the Vendor
Idoc ORDRSP. ORDERS05
Function module IDOC_OUTPUT_ORDERS
Key fields • Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Delivery location
X12 Format X12
Process Code SD10
Outbound : Purchase Order Acknowledgment
What Description
What The confirmation of the customer’s Purchase Order based on our Sales Order. The
customer will validate details such as delivery date, price, confirmed quantity, etc
Idoc ORDERS.ORDERS05
Function module IDOC_INPUT_ORDERS
Key fields • Customer’s Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity shipped
• Value
• Delivery date
What Description
What A status confirmation or price tender acceptance
Idoc SHPMNT. SHPMNT05
Function module IDOC_INPUT_SHPMNT
Key fields • Delivery number
• Status
• Date
What Description
What The invoice as sent to the customer
Idoc INVOIC.INVOIC02
Function module IDOC_OUTPUT_INVOIC
Key fields • Customer’s Purchase order number
• Invoice number
• Delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Price
X12 Format X12 810
Process Code SD09
Inbound : Inbound Payment or Remittance Advice
What Description
What The payment advice is sent by the vendor to the customer
Idoc REMADV.PEXR2003
Function module IDOC_INPUT_REMADV
Key fields • Customer’s Purchase order number
• Invoice number
• Delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Price
X12 Format X12 820
Process Code REMC
Message Type REMADV
Errors
• The IDoc will fail if the master or customer master (partner) is missing.
• Material master is usually from EAN11 or GTIN
• Customer master info record
• Customer master is usually a look-up from sender
• ILN is also used to determine the customer
• Internal organisation data cannot be determined.
• This is usually determined internally
• Incorrect formatting
• Date, formatting
• Business logic issues lead to blocks
• Delivery or credit block
• Pricing issues
Technical error
• Incorrect command in segment or incorrect logic being used.
• Idoc command maybe incorrect business process (PGI when picking is not done)
• Zprogram or Zsegment creating issues
Idoc in SAP – Purchase Order
Course Content
Process Step
• Purchase order / Sales Order
• EDI Mapping and standards
• Idoc in SAP
• Processing Logic
Use of EDI – Architecture
EDI in the Supply Chain
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
Outbound : Purchase Order
What Description
What The Purchase Order sent from the customer to the Vendor
Idoc ORDERS.ORDERS05
Function module IDOC_OUTPUT_ORDERS
Key fields • Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Delivery location
X12 Format X12
Process Code ME10
EDI Message formats
Header Item X
Sold to:
Ship to:
Item : 1
Requested Delivery Date :
PO number Product : 9393398439325
Qty : 1
Item : 2
Product : 9393398437525
Qty : 5
Inbound : ORDERS Mapping
Segment Element Column1 SAP field Description
E1EDKA1 PARVW 'AG' VBAK KUNNR Sold-to partner
E1EDKA1 ORGID VBAK KUNNR
E1EDKA1 PARVW 'WE' VBPA KUNNR Ship-to partner
E1EDKA1 ORGID VBPA PARVW
E1EDK02 QUALF '001'
E1EDK02 BELNR VBKD BSTKD Customer PO number
E1EDK02 DATUM VBKD BSTDK Customer PO date
E1EDP01 POSEX '0010'
E1EDP01 ACTION '001'
E1EDP01 MATNR VBAP MATNR Material number
E1EDP01 MENEE UOM
E1EDP01 MENGE VBAP KWMENG Order quantity
E1EDP19 QUALF '003'
E1EDP19 IDTNR VBAP MATNR Material number
E1EDK03 QUALF '002'
E1EDK03 DATUM VBAK VDATU Requested delivery date
Idoc in SAP – Sales
Course Content
Process Step
• Purchase order / Sales Order
• EDI Mapping and standards
• Idoc in SAP
• Processing Logic
Inbound : Sales order Create
What Description
What A customer’s Purchase Order that is now a Sales Order in our system
Idoc ORDERS.ORDERS05
Function module IDOC_INPUT_ORDERS
Key fields • Customer’s Purchase order number
• Material number
• Quantity shipped
• Value
• Delivery date
• Delivery location
What Description
What The SO Order con from the customer to the Vendor
Idoc ORDRSP. ORDERS05
Function module IDOC_OUTPUT_ORDERS
Key fields • Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Delivery location
X12 Format X12
Process Code SD10
Outbound : Purchase Order Acknowledgment
What Description
What The confirmation of the customer’s Purchase Order based on our Sales Order. The
customer will validate details such as delivery date, price, confirmed quantity, etc
Idoc ORDERS.ORDERS05
Function module IDOC_INPUT_ORDERS
Key fields • Customer’s Purchase order number
• Material number (for example using the EAN11 or GTIN)
• Quantity shipped
• Value
• Delivery date
Order created in ERP system and sent Internal formatting. Sales order is
to partner via EDI created in the ERP.
EAN11
→ Material 1
→ Material 2
→ Material 3
→ Material 4
Use of EDI
GS1
Process Step
• Delivery / Shipment
• EDI Mapping and standards
• Idoc in SAP
• Processing Logic
Use of EDI – Architecture
EDI in the Supply Chain
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
Best Practice –Delivery
Business Context Delivery Create
• Send to 3PL for processing • To TMS or 3PL
• 3PL sends back confirmation • Keep it as simple as possible
• Delivery Create -> Where you
are the 3PL
• Business Modeling
What Description
What The outbound delivery based on the Sales Order. This is received as a request for picking
to the 3PL, a sent ASN which can be converted to either a confirmation on the Purchase
order, or an inbound delivery.
Idoc SHPCON.DELVRY03
Function module IDOC_INPUT_DELVRY
Key fields • Customer’s Purchase order number
• Outbound delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
X12 Format X12 856
Outbound Delivery Mapping
Header
Item line
Handling Unit
Idoc in SAP – Shipment
Course Content
Process Step
• Delivery / Shipment
• EDI Mapping and standards
• Idoc in SAP
• Processing Logic
Use of EDI – Architecture
EDI in the Supply Chain
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
Outbound : Shipment
What Description
What A shipment request sent to a 3PL or freight Forwarder
Idoc SHPMNT. SHPMNT05
Function module IDOC_OUTPUT_SHPMNT
Key fields • Delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Weight
• Dimension
• Dates
• Locations
Process Code SD11
X12 943 - Shipment
Inbound : Shipment Status
What Description
What A status confirmation or price tender acceptance
Idoc SHPMNT. SHPMNT05
Function module IDOC_INPUT_SHPMNT
Key fields • Delivery number
• Status
• Date
SUPPLY CHAIN
Shipment Create
Message type : SHPMNT
Idoc Type SHPMNT05
INFORMATION FLOW
Idoc
Shipment --> 1368 Idoc 2522166
Idoc in SAP – Invoice
Course Content
Process Step
• Invoice / Payment
• EDI Mapping and standards
• Idoc in SAP
• Processing Logic
Use of EDI – Architecture
EDI in the Supply Chain
Sales order is created in the ERP. 3PL distributor receives message Advance Shipping Notification on
Order created in ERP system and sent
to ship product to customer when the product is to arrive, and
to partner via EDI
Invoice for payment
XML
ORDERS INVOIC
Purchase Order 850 Idoc Sales Order Invoice 810 Customer
XML
865 Distribution
Order Ack SHPCON
ORDRSP Shipment
XML Transport
Customer
Company Customer
Asynchronous Confirm
Partners SHPMNT
Envelope
Formatting
Means to Transmission Shipment
WE20 Entries – Invoice
Idoc INVOIC.INVOIC02
Function module IDOC_INPUT_INVOIC_MRM
Key fields • Customer’s Purchase order number
• Vendor’s Sales order number
• Material number
• Quantity shipped
• Value
Best Practice –Invoicing
Process Step
• Interface not SAP standard
• Non Idoc Interface
• Supply Chain process – Other Process
Non Object Idocs
When Idocs are not Idocs
Proxy Server
Proxy server are not Idoc but are interface
Idocs - Good to know
Idocs
Requirements
Determine if
output is to be
triggered
Pre-processing User exit
triggered before
the standard
code
Post
Triggered during Processing
normal code
Post
Processing Triggered after
code execution.
Zsegments & ZIdocs
Head Segment
Head Segment
ZHeader Segment
Zfield
Zfield
ORDERS Mapping Pre-processing
Segment Element Column1 SAP field Description
E1EDKA1 PARVW 'AG' VBAK KUNNR Sold-to partner
E1EDKA1 ORGID VBAK KUNNR
E1EDKA1 PARVW 'WE' VBPA KUNNR Ship-to partner
E1EDKA1 ORGID VBPA PARVW User-exit to populate the organisation data,
E1EDK02 QUALF '001'
E1EDK02 BELNR VBKD BSTKD Customer PO number
for the standard SAP FM to process
E1EDK02 DATUM VBKD BSTDK Customer PO date
E1EDP01 POSEX '0010'
E1EDP01 ACTION '001'
E1EDP01 MATNR VBAP MATNR Material number
E1EDP01 MENEE UOM Business logic as to determine the plant,
VBAP
E1EDP01 MENGE KWMENG Order quantity route and priority of each item, based on
E1EDP19 QUALF '003' data in the Sales Order
E1EDP19 IDTNR VBAP MATNR Material number
E1EDK14 QUALF '012'
E1EDK14 ORGID VBAK AUART Order type
E1EDK14 QUALF '008'
E1EDK14 ORGID VBAK VKORG Sales organization
E1EDK14 QUALF '007'
E1EDK14 ORGID VBAK VTWEG Distribution channel Code to collect the result of the Idoc and
E1EDK14 QUALF '006'
E1EDK14 ORGID VBAK VTWEG Division
trigger a response back to the middleware
E1EDK03 QUALF '002'
E1EDK03 DATUM VBAK VDATU Requested delivery date
Vendor Managed Inventory
830 - Forecast
Sales
Delivery
Order
855 – ASN
855 – PO Acknowledgment
Purchasing Platform
SAP MATMAS
Purchase Order
Quotation
RFQ
Purchase
Purchase Change
Order
Quotation
Purchase
Change
Idoc & Debugging
EDI to Proxy Server
Course Content
Proxy Server
• What is it
• When to use it.
Concept to Understanding
D1
Idoc 1
A1 D2
Message
Via EDI B C Idoc 2
D4
A2 Zprogramz
Message
via XML
D5
BAPI Response
Why Proxy Server
Proxy Server
Response
Synchronous interface, response given back in really time
Flexibility
Coding wise. Interface engine
Sequencing
Multiple actions controlled by one program
Monitor
Consolidation of errors and monitoring is via the xml monitor
Acknowledgment Status
What Description
STATUS (EDI) Message type : STATUS Idoc type SYSTAT01 Process Code : STA2 & STA1
Status Description
4 Interchange Acknowledgement positive
15 Interchange acknowledgement negative
16 Functional acknowledgement
17 Functional acknowledgement negative
40 Application document not created in target system
End