I am struggling to understand how IDoc are used in SAP. What an IDoc is I understand but I have a few questions about how this IDoc are used by SAP (can't find such details on sap blog):
PS: I am new with SAP and all these things are new for me.
Thank you for your patience.
If you are still looking for clarification regarding IDocs, I recommend the SAP Learning Hub ebook on ALE (application link enabling). It offers a technical and conceptual summary of IDoc technology and its use in SAP.
To answer a few of your questions, yes, there are predefined IDoc types. Together, the basic type and message type characterise the structure and data to be sent in the IDoc.
The IDoc itself consists of:
The segments that you use will be defined by the configuration and business requirements of the SAP system you are working in. You can append the segments and create customer defined types, but, as there are so many predefined IDocs, there will likely already exist something you can use.
IDocs are intended to be used in integration scenarios. They can be used to send data out of an SAP system or to receive data into an SAP system. IDocs are designed for data exchange between, rather than within, a system. They can be sent to other SAP systems or to non SAP systems, depending on business requirements. This is their main purpose in SAP.
If you are interested in the process of configuring an ALE scenario for a specific business process, this blog post provides a thorough example: