EDI IDoc Overview

  • View
    261

  • Download
    11

Embed Size (px)

Text of EDI IDoc Overview

UNISON

Overview of EDI and the IDoc Interface in SAPBy

Emmanuel Hadzipetros

Last Revised: 4/30/2006 EDI/IDoc Overview

Page 1 of 22

UNISON

Version ControlVersion1

Created ByEmmanuel Hadzipetros

Created On1/31/2005

Last Revised: 4/30/2006 EDI/IDoc Overview

Page 2 of 22

UNISON

Table of ContentsEXECUTIVE SUMMARY ........................................................................................................................................................4 PURPOSE ....................................................................................................................................................................................... 4 INTENDED A UDIENCE ................................................................................................................................................................. 4 A SSUMPTIONS .............................................................................................................................................................................. 4 SCOPE ............................................................................................................................................................................................ 4 A CRONYM DEFINITIONS ............................................................................................................................................................. 4 EDI ARCHITECTURE ..............................................................................................................................................................4 IDOCS: THE HEART OF SAPS EDI A RCHITECTURE............................................................................................................... 4 Idoc Objects............................................................................................................................................................................5 Messsage Types: ....................................................................................................................................................................5 THE SAP EDI PROCESS FLOW: A BIRDS EYE VIEW .......................................................................................................... 10 Outbound Processing..........................................................................................................................................................11 Inbound Processing.............................................................................................................................................................17 THE HANDSHAKE: EXTERNAL SUBSYSTEM REQUIREMENTS.............................................................................................. 20 Inbound Requirements........................................................................................................................................................20 Outbound Requirements.....................................................................................................................................................22

Table of FiguresFigure 1: Idoc Record Types......................................................................................................................................................... 6 Figure 2: Idoc Record Type. ......................................................................................................................................................... 7 Figure 3: The EDI process flow begins and ends in SAP...................................................................................................... 10 Figure 4: Highly simplified outbound SAP EDI architecture............................................................................................... 11 Figure 5: Output screen at header level of a purchase order. ................................................................................................ 12 Figure 6: Selection screen for program RSEOUT00.............................................................................................................. 14 Figure 7: Simplified inbound SAP EDI architecture.............................................................................................................. 17 Figure 8: Selection screen for program RBDAPP01.............................................................................................................. 19

TablesTable 1: Control record structure with Inbound values............................................................................................................ 7 Table 2: Control record structure with Outbound values......................................................................................................... 9 Table 3: Status codes that can be sent to SAP from TrustedLink detailing important milestones. ................................ 15 Table 4: The status file expected by SAP................................................................................................................................. 15 Table 5: SAP Idoc interface outbound status codes................................................................................................................ 16 Table 6: SAP Idoc interface inbound status codes.................................................................................................................. 20 Table 7: Parameters and switches for startrfc .......................................................................................................................... 21 Table 8: Required fields in inbound Control record ............................................................................................................... 22

Last Revised: 4/30/2006 EDI/IDoc Overview

Page 3 of 22

UNISON

Executive SummaryPurpose The purpose of this document is to provide a high-level overview of how EDI works in SAP and to introduce some fundamental concepts about IDocs. The information presented should be used during the interface technical design process. Intended Audience The document is intended for the application architecture interface team, technical designers, technical developers and other interested parties. Assumptions The following assumptions have been made: This document is for informational purposes only and does not describe any probable interface scenarios. References to outbound/inbound interfaces are from an SAP perspective. An outbound interface originates in SAP and travels outbound to the existing or business partner system. An inbound interface originates in the existing or business partner system and travels inbound into the SAP system. For the purposes of this document, the EDI subsystem is not relevant. This document assumes a file-based EDI interface within SAP. This does not imply any architectural or design preferences.

Scope This document is for educational purposes only and contains architectural and technical details of how EDI works within SAP. Acronym Definitions Some key acronyms are translated below. ALE - Application Link Enabling BAPI - Business Application Programming Interface EDI Electronic Data Interchange IDoc - Intermediate Document

EDI ArchitectureIdocs: The Heart of SAPs EDI Architecture Idocs Intermediate Documents -- facilitate the exchange of data between SAP and other non-SAP or SAP systems. They are independent of the complex structures and tables used by SAP to store application data, allowing SAP to rearrange its internal structures without affecting existing interfaces.Last Revised: 4/30/2006 EDI/IDoc Overview

Page 4 of 22

UNISON

Idocs are structured for flexibility. They encapsulate all the available data in an SAP business document or transaction and are designed to support asynchronous communication and distributed processes, rather than simply invoking functions. They communicate messages between linked systems representing specific business objects -Orders, Customer Acknowledgements, Delivery Documents, Invoices, etc. -- the very documents that anchor critical business relationships between trading partners. IDOC OBJECTS To understand Idocs, we need to distinguish between four distinct terms describing different objects: Messsage Types: The business document, encapsulated in an SAP transaction, exchanged between distributed systems and partners. Idoc Record Types: These structures form the building blocks of all Idocs and are used by the runtime system to pass Idoc data to the Idoc database (the Idoc database includes tables EDIDC, EDID4 and EDIDS). Each Idoc Record Type is defined in the following manner:

One control record defined by the SAP Data Dictionary structure EDI_DC40, with a record length of 524 bytes. The control record is stored in table EDIDC: one for each distinct Idoc in the Idoc database. It contains control information relating to supporting configuration including, but not confined to:n n n n n

Idoc number Direction of transmission Sender and Receiver information: Port and Partner Message Type Idoc Type

One or more data segments defined by the SAP Data Dictionary structure EDI_DD40, with a total record length of 1,063 bytes (a 63 byte record envelope and 1,000 byte data record). Idoc data is stored, segment by segment, each with its own structure, in table EDID4 in the Idoc database. Many data segments can be associated with one control record. One or more status records defined by SAP Data Dictionary structure EDI_DS40, with a total record length 562 bytes. Status records are stored in table EDIDS, as the Idoc achieves various milestones in its processing history. In the outbound process, status records are also generated by the EDI subsystem and transmitted back into SAP.

Last Revised: 4/30/2006 EDI/ID