1 - IDocs
1 - IDocs
IDocs are SAP's standard data containers for EDI (Electronic Data
Interchange) and application integration.
You can create custom IDocs for your own business processes.
You can implement processing logic for inbound and outbound IDocs.
Term Explanation
Message
Links business process with IDoc basic type
Type
Transaction WE81
Transaction BD64
3. Enhancements of IDocs
Change outbound
BAdI: IDOC_OUTPUT SE18
IDocs
4. IDoc Processing
4.1 Outbound Processing (Sending IDocs)
Status
Meaning
Code
01 Created
12 Dispatching
16 Data received
Error during
51
processing
Successfully
64
processed
Use Web Services or REST APIs as alternative, but IDocs are still widely
used.
Write ABAP program to create and send an IDoc with sample data.
abap
CopyEdit
lv_idoc_control-mestyp = 'ZINVOICE'.
lv_idoc_control-idoctyp = 'ZCUSTOM_INVOICE'.
lv_idoc_control-rcvprn = 'LOGICAL_SYS'.
ls_idoc_data-segnam = 'HEADER'.
ls_idoc_data-segnam = 'ITEM'.
EXPORTING
master_idoc_control = lv_idoc_control
TABLES
communication_idoc_data = lt_idoc_data
EXCEPTIONS
error_error = 1
OTHERS = 2.
IF sy-subrc = 0.
ELSE.
ENDIF.