![](/cvo_files/imgs_sap_abap/logos/logo_cvo_academy_it.png)
✒️ABAP La configuración de un IDoc
ABAP La configuración de un IDoc
![ABAP La configuración de un IDoc ABAP La configuración de un IDoc](https://www.cvosoft.com/cvo_files/imgs_sap_abap/og-images/292.jpg)
Configuring an IDoc
IDoc Structure
An IDoc's structure comprises several segments, each consisting of a sequence of fields. The IDoc type structure defines data syntax by specifying segment organization, segment attributes, and field formats.
An IDoc consists of the following sequence of three types of records:
- Control Record
- Contains all administrative information of the IDoc (origin, recipient, and IDoc type).
- This record is crucial as it determines the IDoc's recipient. The SAP table where these are stored is EDIDC (storing control records of an IDoc).
- Its structure is identical for all IDocs and is defined by SAP. They are automatically created and inserted by the system at runtime.
- Additionally, the structure is defined by the dictionary structure EDI_DC40.
- Data Record
- Stored in the table EDID4 in a field of 1000 characters. To interpret this string, the record has a field indicating the structure with which the data should be interpreted.
- An IDoc can have many data records, depending on how the IDoc Type structure is defined.
- This structure is defined by the dictionary structure EDI_DD40.
- Status Record
- Reports the different statuses the message goes through until it is successfully processed.
- If the receiver reports a communication error, exception handling is triggered via a Workflow, informing the IDoc responsible person. This step is optional.
- Contain status information (status code, date, and time the checkpoint was reached).
- These status records only exist in SAP and are not stored in the output file.
- The structure of these status records is defined by the dictionary structure EDI_DS40. They are stored in the table EDIDS.
Each IDoc consists of a single control record and several data and status records.
Data Segments
As seen, a data record or data segment defines the format of the data to be sent or received via an IDoc, which may have one or more defined data segments.
A data segment is itself a structure. After creating it, we can view it from transaction SE11.
The structure of data segments is:
- Hierarchical IDocs: Child segments are below their parents. They must respect the sequence in which they enter the message. Hierarchy information is stored in segment control fields.
- Non-hierarchical IDocs: Segments must be arranged by types, not by hierarchy. They are related through a value in the data segment.
In both, the information must be sent following the order of the segments, or the IDoc will fail.
Base Type
Also called IDoc Type, it defines the structure of the application data of the IDoc. It is also the structure of the data transferred between systems. Additionally, they are stored in the standard table EDBAS.
From transaction WE30, we can view the format of Base Types.
An extension of a Base Type is a concept similar to append structures with standard tables. They are used to add Z fields within a standard segment.
Message Type
It is a view of the IDoc Type (Base Type). It represents the business object.
They are stored in the standard table EDMSG.
The message type can be composed of different Base Types. This is because the same business object can be sent to different systems with different structures. Even different versions of SAP R/3 generated different Message Types.
To create them, we use transaction WE81.
 
 
 
Sobre el autor
Publicación académica de Jaime Eduardo Gomez Arango, en su ámbito de estudios para la Carrera Consultor ABAP.
Jaime Eduardo Gomez Arango
Profesión: Ingeniero de Sistemas y Computación - España - Legajo: SW34C
✒️Autor de: 149 Publicaciones Académicas
🎓Egresado de los módulos:
- Carrera Consultor en SAP Fiori
- Carrera Consultor ABAP Nivel Avanzado
- Carrera Consultor ABAP Nivel Inicial
Disponibilidad Laboral: FullTime
Presentación:
Ingeniero de sistemas y computación con 8 años de experiencia el desarrollo frontend & backend (react/node) y en cloud (aws), actualmente desarrollando habilidades en sap btp, ui5, abap y fiori.
Certificación Académica de Jaime Gomez