0% found this document useful (0 votes)
192 views126 pages

Presentation v3

i hope

Uploaded by

iedgkim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
192 views126 pages

Presentation v3

i hope

Uploaded by

iedgkim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 126

SAP Supply Chain : EDI

Ver1.0, 14.03.2019
Electronic Data Interchange (EDI)

Author: Abdul Kadir Maulud


Course Content

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

What is Electronic Data Interchange →EDI?


Concept to Understanding
• Formatting
• Transmission
• Processing
How it is used
• Why is it so important in SCM
• Business Case
Benefits of EDI

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

Purchase Order Sales Order

• Purchase Order • Sales Order


• Delivery date • Delivery date
• Material - Apples • Material - õun
• Quantity – 1 dozen • Quantity – 12
EDI – Infrastructure

Purchase Order Sales Order

SAP
Oracle
Netsuit, etc Means of Transmission

(Internal format) TCP/IP

Encoding X12 Encoding Idocs


Use of EDI – Architecture
EDI in the Supply Chain

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

Internal Format → EDI → Internal format


Delivery Distribution

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

XML/SOAP, via TCP/IP


HTTPS SOAP (Simple Object Access Protocol)

EDI Network
Applicability Statement 2 (AS2), VAN

File Transfer Protocol


Flat files for batch processing

Email or Web Server


TCP/IP, but the transmission method via the web
EDI Standard
EDI Nomenclature

UN/EDIFACT ODETTE
UN and the only international European automotive industry
standard. OFTP (ODETTE File Transfer
Protocol)

GS1 EDI X12


Predominantly used in global American National Standards
supply chain (Retail, FMCG). Institute (ANSI), created the
Accredited Standards
Committee (ASC) X12

TRADACOMS Edig@s (EDIGAS)


Article Number Association Standard pertaining to
(now known as GS1 UK) and is commerce, transport, and gas
predominantly applied in the UK storage
retail industry
EDI ANSL X12
180 Return Merchandise Authorization and Notification
290 Cooperative Advertising Agreements
810 Invoice
816 Organizational Relationships
832 Price/Sales Catalog
846 Inventory Inquiry/Advice
850 Purchase Order
855 Purchase Order Acknowledgment
856 Ship Notice/Manifest
857 Shipment and Billing Notice
860 Purchase Order Change Request - Buyer Initiated
865 Purchase Order Change Acknowledgment/Request - Seller Initiated
875 Grocery Products Purchase Order
876 Grocery Products Purchase Order Change
877 Manufacturer Coupon Family Code Structure
880 Grocery Products Invoice
881 Manufacturer Coupon Redemption Detail
885 Retail Account Characteristics
888 Item Maintenance
EDIFACT → SAP Message Formats
EDIFACT messages Message Type Idoc Type Description
DELFOR Delivery forecast DELFOR DELFOR01 Delivery Schedule
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
Key to EDI Message

Formatting Standards Transmission


EDI- Formatting Concept
YES OR NO Format

NAVIGATION Assume we want to represent the following line item


information using the LIN segment

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

Message Header UNH Mandatory

User Data Segments As required

Message Trailer UNT Mandatory


Interchange Trailer UNZ Mandatory
Use of EDI
GS1

Purchase Order EDI Idoc Sales Order XML Distribution Portal


Customer

Customer Company Distribution Retailer Consumer


UNA:+.? '
LIN+1+11+4260304623843 :EN' UNB+UNOA:3+8773456789012:14+9123456789012:14+140218:1552+
MSGNR4711++++++1' UNH+1+DESADV:D:96A:UN:EAN005'
BGM+351+DOCNR4712+9' DTM+137:20180218:102'
DTM+2:20180220:102' NAD+SU+9983083940382::9'
NAD+BY+5332357469542::9' NAD+DP+3839204835454::9' CPS+1'
PAC+1++PK' PCI+33E' GIN+BJ+342603046212321014' CPS+2+1'
PAC+11++CT' PCI+33E' GIN+BJ+342603046212341547'
LIN+1++4260304623843:EN' QTY+11:110:PCE' RFF+ON:8493848394:1'
CPS+3+1' PAC+22++CT' PCI+33E' GIN+BJ+342603046212378547'
LIN+2++4260304622123:EN' QTY+12:330:PCE' RFF+ON:8493848394:2'
CPS+4+1' PAC+45++CT' PCI+33E' GIN+BJ+342603046212332145'
LIN+3++4260304624412:EN' QTY+12:450:PCE' RFF+ON:8493848394:3'
CNT+2:3' UNT+34+1' UNZ+1+MSGNR4711’
XML SOAP
Example with mapping (use your own field names)
<?xml version="1.0" encoding="UTF-8"?>
• Pineapples <Data>
<SalesOrder CustomerID="100025" ContactID="001" CustomerOrderNumber="001325"
DeliveryDate="27-12-2016" ProductID="9393398439325 " Quantity=“1"/>
Line item number: 2 </Data>

GTIN: 9393398439325
Type: article has been added
• The resulting EDIFACT
segment is:
• LIN+2+1+9393398439325:EN'
EDI in Supply Chain
Course Content

Business process of EDI in SCM


Examples of EDI SCM
• Message type & flow
• Message type → SAP Idoc
EDI Mapping Strategy
What to consider

SAP or Industrial Standards


Depending on the industry and relationship, either you confirm to
the industry standards or work with the partners on a common
standard. EDI is a relationship, not just files.

Middleware do the heavy lifting


The middleware is there for a reason. Use it! Even for non Idoc
related stuff, we are using the middleware.
Middleware could also be a software platform such as Ariba or JDA
It might be that “error management” might be moved to ERP

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

Web Distribution SAP++


SAP++

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

Means to Transmission Shipment


Scope
End to End Supply Chain EDI
• Purchase Order / Sales Order
• Outbound → Purchase Order
• Inbound → Sales Order
• Outbound → Sales order Acknowledgment
• Inbound → Purchase Order Confirmation
• Logistic & Transportation
• Outbound → Outbound Delivery Creation
• Inbound → Outbound Delivery PGI
• Outbound → Shipment Creation and Tender
• Inbound → Shipment complete
• Outbound → Advance Shipping Notice
• Inbound → Inbound Delivery Creation and Confirmation (GR)
• Finance
• Outbound → Invoice to customer
• Inbound → Logistic Payment Invoice
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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

Mapping and Transformation


“Middleware is software that provides
common services and capabilities. Data
management, application services, messaging,
authentication, and API management are all
commonly handled by middleware”.
Use of EDI
GS1

Purchase Order EDI Idoc Sales Order XML Distribution Portal


Customer

Customer Company Distribution Retailer Consumer


Middleware Mapping & Transformation

EDI Standards Idocs

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

Purchase Order Sales Order

SAP
Oracle
Netsuit, etc Means of Transmission

(Internal format) TCP/IP

Sending Party Result Party


Middleware Mapping
Middleware to Idoc
Course Content

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

Get the external Create a standard SAP Idoc


file specifications
and in SAP we
create an Idoc Confirm what values are What is mandatory
for the structure for SAP to work
required (inbound) or
mandatory for the
external (outbound)
Population and transformation
Determined what
can be mapped,
determined, coded
or transformed Mapping Mapping the
fields between
external and
internal fields.
Idoc in SAP
Course Content

How Does SAP process the EDI into Idocs


• Idocs in SAP
Processing and creation
• Idoc concept
• Configuration
• Demo
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

Internal Format → EDI → Internal format


DESADV SHPCON
Delivery Distribution
856 ASN
PGI

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

Header FM SAP 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 message in document


• Print output and or create Idoc
• Determine based on a given logic
• Partners are usually based on
header data (sold-to, Ship-to, etc)
• Trigger based on requirement.

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

Customer & Vendors


Message

SAP
Oracle
Netsuit, etc Means of Transmission

(Internal format) TCP/IP


LS

Address & End formatting is done here


WE20 Entries – Purchase Order / Sales Order

Direction Description Type Idoc Program Process Code

Outbound Purchase order ORDERS ORDERS.ORDERS05 IDOC_OUTPUT_ORDERS ME10

Inbound Sales order ORDERS ORDERS.ORDERS05 IDOC_INPUT_ORDERS ORDE

Outbound Sales order


Confirmation IDOC_OUTPUT_ORDERS
ORDRSP ORDRSP. ORDERS05 SD10

Inbound Purchase order


Confirmation ORDRSP ORDERS.ORDERS05 IDOC_INPUT_ORDERS ORDR
WE20 Entries – Logistic
Direction Description Type Idoc Program Process Code

Outbound Outbound delivery Create DESADV DESADV.DELVRY03 IDOC_OUTPUT_DELVRY DELV

Outbound Delivery PGI -


Inbound DESADV DESADV.DELVRY03 IDOC_INPUT_DESADV1 DELS
Confirmed
Outbound Outbound Delivery ASN
ORDRSP ORDRSP.ORDERS02 IDOC_INPUT_DELVRY DELV

Inbound Inbound Created


DESADV DESADV.DELVRY03 IDOC_INPUT_DESADV1 DELS

Outbound IDOC_OUTPUT_SHPMNT SD11


Instructions of transport SHPADV SHPMNT. SHPMNT06

Inbound Transport booking IDOC_INPUT_SHPMNT SHPM


SHPMNT SHPMNT. SHPMNT05
confirmation
WE20 Entries – Invoice
Direction Description Type Idoc Program Process Code

Outbound Invoice message INVOIC INVOIC.INVOIC02 IDOC_OUTPUT_INVOIC SD09

Outbound Invoice message REMADV REMADV.PEXR2003 IDOC_INPUT_REMADV REMC


Inbound Invoice message IDOC_INPUT_INVOIC_MRM INVF
INVOIC INVOIC.INVOIC02
WE20 Entries – Misc
Direction Description Type Idoc Process Code

Vendor master
Outbound CREMAS CREMAS05 CRE1

DEBMAS
Outbound Customer master DEBMAS05 ADRMAS and DEBMAS

Inbound SYSTAT01 SYSTAT01 STA1


SAP Idoc 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
Transactions
• WE09 – search
• WE02 – Idoc List
• WE20 – Idoc config
• WE19 – Idoc Processing
• BD87 - Reprocess Idoc
• WE42 – Process Code → ORDE
• WE60 – Idoc documentation
• WE14 – Idoc processing kickout program
• Notepass++ - XML program
Idoc in SAP – Demo Supply Chain
Course Content

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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

X12 Format X12 850


Enhancement Point VEDA0001
Process Code ME10
Message Type ORDERS
Outbound : SO Confirmation

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

X12 Format X12 855


Enhancement Point VEDA0001
Process Code ORDR
Message Type ORDRSP
Outbound : Outbound Delivery
What Description
What The outbound delivery based on the Sales Order. Usually this data is sent to 3rd party
logistic or warehouse for picking and shipping to the customer. Details such as material,
confirmed quantity, picking locations, etc are sent.
The Idoc is also sent to customers after Post Goods Issue as an ASN.
Idoc DESADV.DELVRY03
Function module IDOC_OUTPUT_DELVRY
Key fields • Customer’s Purchase order number
• Outbound delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Location
X12 Format X12 830 -
X12 856 - Advance Ship Notice (ASN)
Process Code DELV
Inbound : ASN from Supplier (Inbound)
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_DESADV1
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
Process Code DELS
Message Type DESADV
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
Inbound : Shipment

What Description
What A status confirmation or price tender acceptance
Idoc SHPMNT. SHPMNT05
Function module IDOC_INPUT_SHPMNT
Key fields • Delivery number
• Status
• Date

Process Code SHPM


Message Type SHPMT
Outbound : Customer Invoice

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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

EDIFACT messages Message Type Idoc Type Description


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
Purchase Order Mapping
Segment Element Description SAP field
E1EDK01 CURCY Currency EUR
E1EDK01 PARVW Partner function (e.g. sold-to AG : Sold-to party
E1EDK01 PARTN Partner number OSIE
E1EDKA1 PARVW Partner function (e.g. sold-to LF : Vendor
E1EDKA1 PARTN Partner number S030
E1EDKA1 PARVW Partner function (e.g. sold-to WE : Goods recipient
E1EDKA1 LIFNR Vendor number at customer loca DSIE
E1EDK02 QUALF IDOC qualifier reference docum 001 : Customer Purchase Order
E1EDK02 BELNR IDOC document number 4500018096
E1EDK02 DATUM IDOC: Date 20200502
E1EDK17 QUALF IDOC qualifier: Terms of deliv 001 : INCOTERMS part 1
E1EDK17 LKOND IDOC delivery condition code DDU
E1EDP01 POSEX Item number 10
E1EDP01 ACTION Action code for the item 001 : Item added
E1EDP01 MENGE Quantity 10
E1EDP01 MENEE Unit of measure PCE
E1EDP01 BMNG2 Quantity in price unit 10
E1EDP01 PMENE Price Unit of Measure PCE
E1EDP01 VPREI Price (net) 499
E1EDP01 PEINH Price unit 1
E1EDP01 NETWR Item value (net) 4990
E1EDP19 QUALF IDOC object identification suc 001 : Material number used by customer
E1EDP19 IDTNR IDOC material ID S2503
EDI ANSL X12

850 Purchase Order


855 Purchase Order Acknowledgment
860 Purchase Order Change Request - Buyer Initiated
865 Purchase Order Change Acknowledgment/Request - Seller Initiated
875 Grocery Products Purchase Order
876 Grocery Products Purchase Order Change
Middleware Mapping & Transformation

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

X12 Format X12 850


Enhancement Point VEDA0001
Outbound : SO Confirmation

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

X12 Format X12 855


Enhancement Point VEDA0001
Order Acknowledgment
Segment MESTYP Message Type ORDRSP
E1EDK01 KZABS Flag: order acknowledgment req X : Yes
E1EDK01 CURCY Currency EUR
E1EDK01 BELNR IDOC document number 4500018095
E1EDK02 QUALF IDOC qualifier reference docum 001 : Customer Purchase Order
E1EDK02 BELNR IDOC document number 4500018095
E1EDP01 POSEX Item number 10
E1EDP01 ACTION Action code for the item 002 : Item changed
E1EDP01 MENGE Quantity 5
E1EDP01 MENEE Unit of measure PCE
E1EDP01 PMENE Price Unit of Measure PCE
E1EDP01 VPREI Price (net) 500
E1EDP01 PEINH Price unit 1
E1EDP01 CURCY Currency EUR
E1EDP02 QUALF IDOC qualifier reference docum 001 : Customer Purchase Order
E1EDP02 BELNR IDOC document number 4500018095
E1EDP02 ZEILE Item number 10
E1EDP02 QUALF IDOC qualifier reference docum 002 : Vendor Order
E1EDP02 BELNR IDOC document number ACC.0001000155
E1EDP02 ZEILE Item number 10
E1EDP20 EDATU IDOC: Date 20200506
E1EDP19 QUALF IDOC object identification suc 001 : Material number used by customer
E1EDP19 IDTNR IDOC material ID S2503
Best Practice –Purchase Order / Sales Orders

Business Logic Creation / Change


• Customer sends a PO that is a • Price & Discounts.
SO in our ERP • Delivery date.
• Most industrial support. GTIN, • Ordered and Confirmed
EAN11, Price, etc Quantity

Substitutes & Develop Consideration


• User-exit for internal values • Error Handling – Blocks in
• Zlogic for Zsegment Middleware
• Sales order logic for EDI • Error in Idoc processing
• Customer-info record • Error in business processing
• Industrial standard GTIN & GS 1
Use of EDI – Use Case
EDI in the Supply Chain

Order created in ERP system and sent Internal formatting. Sales order is
to partner via EDI created in the ERP.

Internal Format → EDI ORDERS → Idoc ORDERS


Customer Company

Purchase Order EDI Transfor Sales


IdocOrder Sales Order
m

Confirmation Transmission Transform Idoc Sales Order


Management Management Management Management Management
• Idoc error • PO error PO error • Idoc Error • Order block
• Mapping error • Resolution • Credit block
• Conversion error • Delivery block
Core Consideration
Zdata Data ZProgram Conversion Partner

• Sales Org • Customer • User-exit • Quantity • Sold-to (ILN)


• Values from • Our material • Pre and Post • UOM • Ship-to (ILN)
master data • GTIN or ISBN Processing • Date • Further logic
• Plant • Price expected • Idoc split • etc
• Dates and PR00
GTIN / EAN11

EAN11
→ Material 1
→ Material 2
→ Material 3
→ Material 4
Use of EDI
GS1

Purchase Order EDI Idoc Sales Order XML Distribution Portal


Customer

Customer Company Distribution Retailer Consumer


UNA:+.? '
LIN+1+1+ 9983083940382:EN' UNB+UNOA:3+8773456789012:14+9123456789012:14+140218:1552+
MSGNR4711++++++1' UNH+1+DESADV:D:96A:UN:EAN005'
BGM+351+DOCNR4712+9' DTM+137:20180218:102'
DTM+2:20180220:102' NAD+SU+9983083940382::9'
NAD+BY+5332357469542::9' NAD+DP+3839204835454::9' CPS+1'
PAC+1++PK' PCI+33E' GIN+BJ+342603046212321014' CPS+2+1'
PAC+11++CT' PCI+33E' GIN+BJ+342603046212341547'
LIN+1++4260304623843:EN' QTY+12:110:PCE' RFF+ON:8493848394:1'
CPS+3+1' PAC+22++CT' PCI+33E' GIN+BJ+342603046212378547'
LIN+2++4260304622123:EN' QTY+12:330:PCE' RFF+ON:8493848394:2'
CPS+4+1' PAC+45++CT' PCI+33E' GIN+BJ+342603046212332145'
LIN+3++4260304624412:EN' QTY+12:450:PCE' RFF+ON:8493848394:3'
CNT+2:3' UNT+34+1' UNZ+1+MSGNR4711’
Idoc in SAP – Delivery
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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

Delivery update & PGI ASN


• User-exit • Usually at PGI.
• PGI is also done via Shipment • Handling Unit
• Requirement • Send to customer, GTIN
• Transfer Order Idoc translation
• No picking required (PGI 2
step)
Outbound : Outbound Delivery
What Description
What The outbound delivery based on the Sales Order. Usually this data is sent to 3rd party
logistic or warehouse for picking and shipping to the customer. Details such as material,
confirmed quantity, picking locations, etc are sent.
The Idoc is also sent to customers after Post Goods Issue as an ASN.
Idoc DESADV.DELVRY03
Function module IDOC_OUTPUT_DELVRY
Process code DELV
Key fields • Customer’s Purchase order number
• Outbound delivery number
• Material number (for example using the EAN11 or GTIN)
• Quantity
• Delivery date
• Location
X12 Format X12 853 – Delivery Information
X12 856 - Advance Ship Notice (ASN)
Inbound : ASN from Supplier (Inbound)

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

Segment MESTYP Message Type SHPCON


E1EDL20 VBELN Sales and Distribution Documen 80017783
E1EDT13 QUALF IDOC Qualifier: Date (Delivery 007 : (Outbound) Delivery
E1EDT13 NTANF Constraint for activity start 20200501
E1EDT13 QUALF IDOC Qualifier: Date (Delivery 006 : Goods Issue
E1EDT13 NTANF Constraint for activity start 20200501
E1EDL24 POSNR Item number of the SD document 10
E1EDL24 MATNR Material Number S2503
E1EDL24 LFIMG Actual quantity delivered (in 1
E1EDL24 VRKME Sales unit PCE
E1EDL19 QUALF IDOC Qualifier: Control (Deliv QUA : Change quantity
E1EDL18 QUALF IDOC Qualifier: Control (Deliv PGI : Post delivery goods issue (inbound)
Inbound Delivery

Segment MESTYP Message Type DESADV


E1EDL20 LIFEX External Identification of Del SNC-000003
E1EDT13 QUALF IDOC Qualifier: Date (Delivery 007 : (Outbound) Delivery
E1EDT13 NTANF Constraint for activity start 20200502
E1EDT13 NTEND Constraint for finish of activ 20200502
E1EDT13 QUALF IDOC Qualifier: Date (Delivery 006 : Goods Issue
E1EDT13 NTANF Constraint for activity start 20200502
E1EDT13 NTEND Constraint for finish of activ 20200502
E1EDL24 POSNR Item number of the SD document 10
E1EDL24 MATNR Material Number S2503
E1EDL24 KDMAT Material belonging to the cust S2503
E1EDL24 LFIMG Actual quantity delivered (in 10
E1EDL24 VRKME Sales unit PCE
E1EDL24 POSEX External item number 10
E1EDL43 QUALF SD document category V : Purchase Order
E1EDL43 BELNR IDOC document number 4500018096
E1EDL43 POSNR Item number 10
Delivery Structure – Idoc

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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

Process Code SHPM


Inbound : Shipment Confirm
Segment MESTYP Message Type SHPMNT
E1EDT20 TKNUM Shipment Number 1372
E1EDT18 QUALF IDOC Qualifier: Control (Shipm CHA : Change message (outbound)
E1EDT18 QUALF IDOC Qualifier: Control (Shipm PID : Specification of a primary identification field in parameter
E1EDT18 PARAM IDOC: Control Parameters TKNUM
E1EDT10 QUALF IDOC Qualifier: Date (Shipment 003 : Loading
E1EDT10 NTANF Constraint for activity start 20200502
E1EDT10 NTANZ Constraint for activity start 0
E1EDT10 NTEND Constraint for finish of activ 20200502
E1EDT10 NTENZ Basic finish time of the activ 0
E1EDT10 ISDD Actual start: Execution (date) 20200502
E1EDT10 ISDZ Actual start: Execution/setup 140800
E1EDT10 IEDD Actual finish: Execution (date 20200502
E1EDT10 IEDZ Actual finish: Execution (time 140800
Best Practice –Shipment Model

Less Than Full Truck Shipment Create - Vendor


• Communication with 3PL • Vendor creates the shipment
• Tendering purposes • They do all the planning,
• Who is doing the routing usually 3PL
• Send deliveries and not • Shipment create and
shipments complete

Full Truck Shipment Create - Internal


• We are building the shipment. • Internally we create the
• Route and destination shipment.
confirmed • Tendering & Pricing
• Shipment complete
• Status Update
FLOW OF PRODUCT IN A SUPPLY CHAIN
EDI Format

Less Than Full Truck


WAREHOUSE
OutBound Delivery SHIPPING
SHPCON
Message type : SHPCON
Idoc Type DELVRY03

SUPPLY CHAIN

Shipment Create
Message type : SHPMNT
Idoc Type SHPMNT05

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

Internal Format → EDI → Internal format


DESADV SHPCON
856 ASN Delivery Distribution
PGI

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

Direction Description Type Idoc Program


Outbound Invoice message INVOIC INVOIC.INVOIC02 IDOC_OUTPUT_INVOIC

Outbound Invoice message INVOIC REMADV.PEXR2003 IDOC_INPUT_REMADV


Inbound Invoice message IDOC_INPUT_INVOIC_MRM
INVOIC INVOIC.INVOIC02
Outbound : Customer Invoice
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
Outbound : 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
Logistics Invoice Verification
What Description
What The supplier’s invoice following the delivery or sales order. The invoice will be post
against the customer’s purchase order, with reference to the supplier’s sales order and
delivery. The interface will validate it against the PO and delivered quantity

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

Business Context Invoice Verification

• Invoice to customer • Verification against PO or


• Include as much data as to inbound
make it easy for customer • 3-way approval
• Sent to bank if SEPA or E- • Usually still requires approval
invoice
• Encryption is key
Price & Taxes Dunning & Statement
• Usually link to Sales order or • Dunning – Status Update or
delivery late payment
• Material conversion • Statement – Account
• MWST – Taxes code statements
• Self Billing
Idoc in the wild
Course Content

Process Step
• Interface not SAP standard
• Non Idoc Interface
• Supply Chain process – Other Process
Non Object Idocs
When Idocs are not Idocs

Idoc not linked to document


Custom ZIdocs created from custom
program.

Support & Management


Idoc Support and Management

Proxy Server
Proxy server are not Idoc but are interface
Idocs - Good to know

CREMAS & DEBMAS


Enterprise data from Customer PRICAT (Price/Sales
Prices Catalogue)
source system & Vendor Customer / Vendor

Idocs

MATMAS EDIFACT INVRPT and


Enterprise data from x12 846
source system Material Inventory
Program : User-Exit

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

How we implement user-exits to Idocs


• In general, enhance the current standard Idocs by adding Zsegments and
Zcode as to populate the Idocs.
• Do not enhance as to overwrite a standard SAP field.
• A total copy from standard Idocs to a Zidoc is also possible.
• ORDERS05 → ZORDERS05
• How, I prefer to still use the standard SAP processing program with exists.
Any updates to the SAP FM will be reflected.
• Only create a new ZIdoc if there is no SAP standard Idoc for the document
that you want to send. For example a SAP Financial document
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

852 Customer Inventory

830 - Forecast

Sales
Delivery
Order

855 – ASN

855 – PO Acknowledgment
Purchasing Platform

X12 832 Price Catalog

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

Middleware Proxy Server


D3
BAPI Call

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

ALEAUD (ALE) Message type : ALEAUD Idoc type ALEAUD01

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

You might also like