IDoc is an SAP object that carries data of a business transaction from one system to another in the form of electronic message. IDoc is an acronym for Intermediate Document. The purpose of an IDoc is to transfer data or information from SAP to other systems and vice versa. The transfer from SAP to non-SAP system is done via EDI (Electronic Data Interchange) subsystems whereas for transfer between two SAP systems, ALE is used.
IDoc can be triggered in SAP system or in EDI subsystem. This depends on the direction in which IDoc is sent and is called as Inbound IDoc and Outbound IDoc accordingly. In case of outbound flow, IDoc is triggered in SAP through document message control which is then sent to EDI subsystem. EDI converts the data from IDoc into XML or equivalent format and then sends the data to partner system through Internet.
For inbound flow, EDI converts partner data and IDoc is created in SAP. After successful processing of this IDoc, Application Document is posted in SAP.