IDOC is simply a data container used to exchange information between any two processes that can understand the syntax and semantics of the data.
In other words, an IDOC is like a data file with a specified format which is exchanged between 2 systems which know how to interpret that data.
IDOC stands for " Intermediate Document"
When we execute an outbound ALE or EDI Process, an IDOC is created.
In the SAP System, I DOCs are stored in database. Every IDOC has a unique number(within a client).
IDOC is used across banking sector also
Doc, short for Intermediate Document, is a SAP document format for business transaction data transfers. Non SAP-systems can use IDocs as the standard interface (computing) for data transfer. IDoc is similar to XML in purpose, but differs in syntax. Both serve the purpose of data exchange and automation in computer systems, but the IDoc-Technology takes a different approach.
While XML allows having some metadata about the document itself, an IDoc is obliged to have information at its header like its creator, creation time etc. While XML has a tag-like tree structure containing data and meta-data, IDocs use a table with the data and meta-data. IDocs also have a session that explains all the processes which the document passed or will pass, allowing one to debug and trace the status of the document.
Different IDoc types are available to handle different types of messages. For example, the IDoc format ORDERS01 may be used for both purchase orders and order confirmations.
IDoc technology offers many tools for automation, monitoring and error handling. For example, if the IDocs are customised that way on a particular server, then a user of SAP R/3 system creates a purchase order; this is automatically sent via an IDoc and a sales order is immediately created on the vendor's system.
When this order cannot be created because of an application error (for example: The price per piece is lower than allowed for this material), then the administrator on the vendor's system sees this IDoc among the erroneous ones and can solve the situation. If the error is in the master data at the vendor's system, he can correct them and order the IDoc to be processed again.
Because of the flexibility and transparency of IDoc technology, some non-SAP technologies use them as well.