Exploring new territories - the unknown world between two SAP ERP systems Philipp Liegl @ecosioHQ 1
Electronic Data Interchange is fully automatedBut until it works, it is a people business
5
SAP Project Manager“We must deliver on
time and budget”
SAP Consultant“I must adhere to the
business blue print and get the customizing right”
ABAP programmer“*@%#& them and their
constantly changing requirements”
SAP Basis“The instance is too small,I told them a million times”
Car manufacturer“Please call global service
helpdesk for further assistance”
Customer“We must go live on xyz
by all means”
Supplier“We do not have time
for EDI now, please comeback in 6 months”
EDI service provider“SAP team, customer,
suppliers and OEMs, please provide commitment”
Agenda
The roots of electronic data interchange (EDI)
EDI in detailIdentificationRepresentationData exchange
EDI and SAP
6
Goods identification and advanced shipping notifications
8
„Information about the transported goods is as important as the goods themselves“
-- Edward Guilbert
What is Electronic Data Interchange exactly?
• Not a „single“ technology – rather a concept
• The exchange of structured electronic documents between software systems of different companies with minimal human intervention.
9
Supplier
ERP system A
Manufacturer
ERP system B
Order
Advanced shipping notification
Goods
The three main requirements of electronic data interchange
Unique identification of exchanged products and services as well as the participating partners
Unique representation of exchanged information
Exchange procotol, which guarantees the delivery of electronic documents
11
Machine processing without unique identification. How many companies do you see?
14
ecosio InterCom GmbH
Leoprechtingstr. 3281739 München
Deutschland
ecosio InterCom GmbH
Leoprechtingstraße 32
81739 München
ecosio InterCom GmbH
Leoprechtingstrasse 32
81739 Munich
Germany
ecosio InterCom GmbH
Leoprechtingstr. 32
81739 Muenchen
Allemagne
Necessity of unique identification
• Companies
• Products and services• Transport units
• EDI addresses
Solution
• Use of a common code scheme, which is maintained by a central administration body
• Prevents use of duplicate codes and guarantees global uniqueness
17
Where to take these “unique” numbers from?
18
Bilateral agreement between partners
• Global uniqueness• Very common in retail• Unique identification of partners (GLN),
products (GTIN), pallets (SSCC), etc.
• Global uniqueness• Unique identification of partners only (DUNS no.)
• No global uniqueness• Often used in industry (e.g., BMW-AG,
JLR, etc.)• Customer/supplier material numbers
Global Location Numbers (GLN)Unique identification of business partners and EDI mailboxes
19
N1 N2 N3 N4 N5 N6 N7 N8 N9 N10 N11 N12 N13
GS1 company prefix(7 – 9 digits)
location reference check digit
Structure
Example
Company XYZBranch 1
Company XYZBranch 2
GLN: 9 0 1 2 3 4 5 0 0 0 0 0 4
GLN: 9 0 1 2 3 4 5 1 0 0 0 0 1
GTIN – Global Trade Item Number
• GS1 number for the unique identification of trade items
• A GTIN has 8/12/13/14 digits
• GTIN is based on the GLN of a company
• GTINs are exchanged using master data exchange concepts (e.g., GDSN - Global Data Synchronization Network)
21
SSCC – Serial Shipping Container Code
Unique identification of transport units
22
Sender:ecosio InterCom GmbHLeoprechtingstr. 3281739 München
SSCC:
GTIN:
Production date: Lot:
3 426030462 1234567 8
42 6030462 999 4
15.12.2016 4711A3
NVE
Why is the transport label in conjunction with EDI so important?
23
Pallet 1SSCC: 342603046212345678GTIN: 4260304629994Delivered units: 10
Pallet 2SSCC: 342603046212345685GTIN: 4260304629987Delivered units: 20
Pallet 3SSCC: 342603046212345692GTIN: 4260304629970Delivered units: 30
Sandwich pallet:Master SSCC: 342603046212345104
Representation
24
import java.math.BigDecimal;
import lombok.Data;
//Generates toString, equals, hashCode and //all getters and setters@Datapublic class Product {
private String id;private String name;private BigDecimal price;
}
import com.ecosio.entities.Product;
import java.math.BigDecimal;import java.util.ArrayList;import java.util.List;
public class ProductProcessor {
List<Product> productList = new ArrayList<>();
private void loadProducts() { Product p = new Product();p.setId("4711");p.setName("Some name");p.setPrice(new BigDecimal("34.50"));productList.add(p);
}}
Unambiguous representation of exchanged information is an important prerequisite for EDI
Application-to-application communication requires a standardized exchange format, which sender and recipient understand
26
Sender‘sERP system
Recipient‘sERP system
EDIFACT EANCOM D01B DESADV
Sender‘sERP system
Recipient‘sERP system
Converter
EDIFACT EANCOM D01B DESADV
VDA 4913 dispatch advice
Data exchange formats
27
VDAFlat-Text
EDIFACT
EDIFACT EANCOM
XMLcXML CSV
IDocTRADACOM GS1 XML
openTRANS
proprietaryformat
ZUGFeRD
UBL
JSON
ANSI ASC X12
A few standardization organizations
28
A Joint Publication
ECM RecommendationPart 0 (ECM) Version 2.0, issued Aug. 2009 Replacements: Version 1.0
VDA 4965 – Part 0 Version 3.0, issued Jan. 2010 Replacements: Version 2.0
A Joint Publication
ECM RecommendationPart 0 (ECM) Version 2.0, issued Aug. 2009 Replacements: Version 1.0
VDA 4965 – Part 0 Version 3.0, issued Jan. 2010 Replacements: Version 2.0
Conversion (or mapping) – translating between different formats
30
Sender
ERP system A
Recipient
ERP system B
Proprietary format A
Proprietary format B
ConversionRouting
EDI formate.g., VDA, EDIFACT, etc.
ConversionRouting
Inhouse-conversion vs. external service provider
31
ERP system
EDI converter EDI serviceprovider
Routing
ERP-System
EDI serviceprovider
RoutingConversion
• In-depth EDI know-how necessary(setup of conversions and maintenance)
• Considerable initial costs and continuous maintenance costs
• For high volume EDI
• Setup and maintenance of conversion is done by external service provider
• Low inital costs – well suited for SMEs• No inhouse EDI know-how necessary
Examples for EDI standards
• UN/EDIFACT delimiter based
• ANSI ASC X12 delimiter based• VDA EDIFACT-based and fixed-length
• ODETTE based on EDIFACT
• EANCOM EDIFACT subset
• cXML XML
• openTRANS XML• IDoc XML or fixed-length, rather an exchange format, than
• … an EDI standard
33
EDIFACT example for an ORDERS message
34
UNA:+.? 'UNB+UNOA:3+01234567890123:14+01234567890124:14+130516:1552+MSGNR111++++++1'UNH+1+ORDERS:D:96A:UN:EAN008'BGM+220+DOCNR1234'DTM+137:20130519:102'DTM+2:20130520:102'NAD+BY+5682357469542::9'NAD+DP+3839204839274::9'NAD+SU+0293083940382::9'LIN+1++1122334455667:EN'QTY+21:11.00:PCE'UNS+S'CNT+2:1'UNT+12+1'UNZ+1+MSGNR111'
UNB segmentInterchange header
35
UNA:+.? 'UNB+UNOA:3+01234567890123:14+01234567890124:14+130516:1552+MSGNR111++++++1'
Used charset
UNOA = UN/ECE level A equals ISO 646 – with some exceptionsUNOB = UN/ECE level Blike UNOA with less exceptionsUNOC = UN/ECE level Cequals ISO-8859-1UNOD = UN/ECE level Dequals ISO-8859-2UNOE = UN/ECE level Eequals ISO-8859-5 (cyrillic)UNOF = UN/ECE level Fequals ISO 8859-7 (latin/greek)etc.
Sender of message
Receiver of message
Date and time
Interchange ID
Test indicator
XML standards
• Became increasingly popular by mid/end of the nineties of the last century
• Distinction between markup and content• Larger memory footprint than delimiter based or fixed-length formats
36
<document:MessageHeader><document:MessageReferenceNumber>1</document:MessageReferenceNumber><document:MessageType>DELFOR</document:MessageType>
</document:MessageHeader><document:BeginningOfMessage><document:DocumentNameEncoded>241</document:DocumentNameEncoded><document:DocumentNumber>000000108</document:DocumentNumber>
</document:BeginningOfMessage>
Memory footprint comparisonDoes it matter?
37
VW DELFOR (EDIFACT)
Internal converter format(XML)
SAP IDoc DELFOR(XML)
12 KB 120 KB(10 x)
58 KB(~ 5 x)
UN/EDIFACT IDoc XML
Keep in mind that routing and storage do not come for free!
Typical message types in the retail industry
38
Supplier Buyer
Order (ORDERS)
Order Change (ORDCHG)
Order Response (ORDRSP)
Dispatch Advice (DESADV)
Goods
Receipt Advice (RECADV)
Invoice (INVOIC)
Price Catalog (PRICAT)
https://blogs.sap.com/2017/09/05/realizing-procurement-edi-processes-with-ansi-asc-x12-edifact-and-idocs/
Typical message types in the automotive industry
39
Tier 1 supplier OEM
JIT forecast (DELJIT)
JIS forecast (DELJIT)
Goods
Receipt Advice (RECADV)
Invoice/Credit note (INVOIC)
Forecast (DELFOR)
ASN (DESADV)
Funct. Ack (CONTRL)
https://blogs.sap.com/2017/08/17/realizing-automotive-edi-processes-with-vda-edifact-ansi-odette-and-idocs/
Routing of EDI messages
Each EDI message must be able to answer the following four questions:
• Who are you?• Where do you come from?
• Where do you want to go?
• Are you a test message?
Additional questions• What is your unique ID?
• When have you been created?
40
Data transport today using dedicated protocols
• AS2
• SFTP, FTPS
• OFTP2
• OFTP1 (not recommended, as ISDN will soon be switched off)
• X.400 (can be quite costly)
• RESTful Web Services• Usually for the last mile between ERP and service provider
• SOAP/WSDL• Quite verbose and rigid – cf. WS Death Star
• SMTP• Only when sender authenticates at the SMTP
• VAN• Old term for dedicated EDI networks. Some still exist, e.g., ANXeBusiness, ENX, JNX, etc.
42
Data transport – usually a four corner model is used
43
Company ASAP
ERP system
Service provider A
Routing
Delivery andFetch
Service provider B
Company BMS Dynamics ERP system
Delivery andFetch
IDoc – Intermediate DocumentProvide XML Schema and documentation to the EDI service provider
47
WE60
SAP and EDIYes, there are dragons
48
Customer‘s domain
SAP-System
Business partner
Business partner
Business partner
Business partner
Business partner
Business partner
…
EDIFACT D96A, X.400Telekom
VAN 1
VAN 2etc.
UBL-XML, SFTP
ODETTE DELFOR, SMTP
CSV, X.400
EANCOM D98B, AS2
VDA 4913, OFTP, ISDN
AS2server
X.400box
SFTPserver
etc.
EDIconverter
Performsmappings
Generates andconsumes IDocs
Typically a service provider is hired, who tames the „dragons“
49
Import-/export-interface
Business partner
Business partner
Business partner
Business partner
Business partner
Business partner
…
all business partners,protocols and formats
onemanaged
connectionEDI service
provider(routing,
conversion)
ERP system
Closer integration using an API – EDI functionality as native feature of the ERP system
50
ERPEL Add-On
Business partner
Business partner
Business partner
Business partner
Business partner
Business partner
…
all business partners,protocols and formats
SAP system
ERPEL API
Incoming messagesExample delivery forecast
Customer
VDA 4905 delivery forecastvia OFTP2
EPO Connector
1
2Convert VDA 4905 -> SAP IDocPack in JSON object (with meta data)
4Unpack IDocs and hand over tofunction module in SAP
5aAfter successful creation of IDoc, call callbackservice and pass IDoc ID
5bIn case of an error, call callback, pass error message and pass IDoc ID
6 Correlate callback to original ID
1a OFTP EERP/NEERP
Acknowledgement
Message
3PULL using HTTP GETRetrieval of JSON objectwith embedded IDocplus ecosio message ID
Outbound message routing, based on EDI_DC40 informationOften unique sender and receiver identification is missing
53
<DESADV01><IDOC BEGIN="1"><EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM><MANDT>100</MANDT><DOCNUM>0000000046615484</DOCNUM><DOCREL>700</DOCREL><STATUS>30</STATUS><DIRECT>1</DIRECT><OUTMOD>2</OUTMOD><IDOCTYP>DESADV01</IDOCTYP><MESTYP>DESADV</MESTYP><SNDPOR>SAPP01</SNDPOR><SNDPRT>LS</SNDPRT><SNDPRN>P01CLNT100</SNDPRN><SNDLAD>7844849473214</SNDLAD><RCVPOR>ECOSIO</RCVPOR><RCVPRT>KU</RCVPRT><RCVPFC>SP</RCVPFC><RCVPRN>1005101</RCVPRN><RCVLAD>95412163215412</RCVLAD><CREDAT>20170822</CREDAT><CRETIM>064159</CRETIM><SERIAL>20170822064159</SERIAL>
</EDI_DC40>...
</DESADV01>
oftenmissing
Example Daimler
54
UNA:+.? 'UNB+UNOA:1+SUPPLIER-XYZ+O0013007313MB006000+171005:1638+5571'UNH+80035375+DESADV:D:96A:UN'
Receiver identification on aper-factory basis must be retrieved from the exported IDoc
Re-keying of information
Oftentimes no unique representation of information is available• Buyer’s article number vs. supplier’s article number• Buyer’s sold-to identification vs. supplier’s sold-to identification• Matching of purchasing organization vs. sales organization• etc.
55
Margarete (Gretchen) to Faust:
“Where shall we re-key?”
Where to re-key?
57
Serviceprovider Daimler
Ship-To: GLC Germersheim4711
GLC GermersheimO0013007313MB006000
DESADVD96AIDoc
• The originator must re-key (= the SAP)
• Do not re-key in the mapping on the service provider’s side (maintenance nightmare)
Wrap up
• EDI is a prerequisite for efficient inter-organizational processes
• Large enterprises and medium-sized companies need EDI to run their business
• SMEs must comply with the EDI requirements
• However, they may benefit from EDI as well
• EDI converter – local vs. outsourced
• Four corner-model communication• SAP may serve as target/source for EDI processes
• EDI in SAP is not turn-key – some configuration is always necessary
58
59
ecosio InterCom GmbHLeoprechtingstr. 3281739 München, GermanyTel: +49 89 6066 6456
ecosio GmbHLange Gasse 301080 Wien, AustriaTel.: +43 1 996 21 06
Email: [email protected]: https://www.ecosio.comTwitter: @ecosioHQ
Image credits
SAP Logo: SAP SE, http://www.sap.comWorld map: http://www.gallery.oldbookart.com/ Map of Germany, landing C-17, care package, planes at Tempelhof, tower of Babel, UN security council, IBM 360 at Volkswagen, Minen-Mines, Gretchen and Faust: Wikimedia CommonsCompany logos: https://www.fastcodesign.com/3034007/whats-the-difference-between-a-logo-and-a-symbol Loading ramp: http://www.butt.deGoods on truck: http://www.mvn.chBorder control: http://www.zimbio.com/pictures/n56225uJLV6/Customs+Border+Protection+Screen+Travelers/3etDcuVTplj Icons: Freepik - http://www.flaticon.comRed Bull: own pictureRough road: https://www.flickr.com/photos/childplay/7852066624
60