Electronic Data Interchange (EDI) is the standard format for exchanging business data. SAP uses a standard format called Document (IDOC) for communicating EDI & ALE messages.
The IDoc interface contains data structures and processing logic for each business transaction. They are grouped into various types. The external server is responsible for EDI receiving messages sent by the trading partners. These messages are then mapped to the IDoc structure at field level and stored. The data is stored in tables EDIDC, EDID4 and EDIDS.
EDI / IDoc supports both inbound and outbound interfaces. The interface layer has an IDoc error handling, reporting, monitoring and reprocessing mechanism built into it (Transaction Wedi). IDoc is also tightly integrated with the Workflow system SAP for the opening of other tasks when receiving / sending EDI messages.
The IDoc interface can be used for non-SAP applications or integrated with other ERP Softwares to load or extract data from SAP system. But generally, EDI / IDoc is engaged in SAP is to be integrated at one of its partners (customers, suppliers and other partners) to achieve the standard corporate operations (such as Create sales orders, sending orders to suppliers, etc. …).