SAP IDOC Tutorial - Definition, Structure, Types, Format & Tables
SAP IDOC Tutorial - Definition, Structure, Types, Format & Tables
What is an IDOC?
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.
In the SAP System, I DOCs are stored in database. Every IDOC has a unique
number(within a client).
What is an IDOC?
Structure of an IDOC
IDOC Types
What is a Segment?
What is Extension IDOC type?
IDOC Views
Partner Profiles
Port
The Outbound Process
The Inbound Process
Key Features
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 1/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Structure of an IDOC
1. The administration part(Control Record)- which has the type of idoc, message
type, the current status, the sender, receiver etc. This is referred to as the
Control record.
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 2/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
2. The application data (Data Record) – Which contains the data. These are called
the data records/segments.
3. The Status information (Status Record)- These give you information about the
various stages the idoc has passed through.
As seen the screenshot above IDOC record has three parts Control, Data and Status.
Let’s look into them in detail – Control Record
All control record data is stored in EDIDC table. The key to this table is the
IDOC Number
It contains information like IDOC number, the direction(inbound/outbound),
sender, recipient information, channel it is using, which port it is using etc.
Direction ‘1’ indicates outbound, ‘2’ indicates inbound.
Data Record
Data record contains application data like employee header info, weekly
details, client details etc
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 3/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
All data record data is stored in EDID2 to EDID4 tables and EDIDD is a structure
where you can see its components.
It contains data like the idoc number, name and number of the segment in the
idoc, the hierarchy and the data
The actual data is stored as a string in a field called SDATA, which is a 1000
char long field.
Status Record
IDOC Types
An I DOC Type, (Basic) defines the structure and format of the business document
that is to be exchanged. An IDOC is an instance of an IDOC Type , just like the
concept of variables and variables types in programming languages. You can define
IDOC types using WE30
What is a Segment?
A Segment defines the format and structure of a data record in I-DOC. Segments are
reusable components.
Definitions keep changing as per the version but the segment type remains the
same.
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 4/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Transaction:WE31
1. Basic
2. Extension
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 5/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
SAP provides many a pre-defined Basic IDOC Types which can not be modified. In
case you want to add more data to these restricted basic type you may use an
extension type. Most of the times you will NOT use extension.
Documentation
Each IDOC are thoroughly documented in transaction WE60
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 6/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Message Type
A message represents a specific type of document that is transmitted between two
partners Ex. Orders, orders responses, invoices etc
Also, a message type can be associated with different idoc types. Transaction WE81
IDOC Views
An IDOC type can be used for more than one message type, which results in IDOCs
containing more fields than required for a particular message type.
IDOC views are used to improve performance in generating IDOCs to ensure only
the relevant segments are filled with data. IDOC Views are important only for
Outbound Processing.
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 7/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Partner Profiles
A partner is defined as a business partner with whom you conduct business and
exchange documents
In the partner profile of a partner that we exchange Idocs with, we maintain the
parameters that are necessary for exchanging the data. The transaction used is
WE20.
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 8/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Port
The port defines the technical characteristics of the connection between your SAP
system and the other system you want to transfer data with (subsystem). The port
defines the medium in which data is exchanged between the 2 systems.
There are different types of ports. The 2 most commonly used are the TRFC ports
used in ALE and File ports which EDI uses.
For TRFC ports we have to give the name of the logical destination created using
SM59.
When using file port you can specify the directory where the IDOC file should be
placed. The other system or the middleware will pick up the file from here. The
Function module can be used to generate a file name for the idoc. While Testing
you can use “Outbound file” to specify a constant file name. The tab “outbound
trigger” can be used to supply information if we want to trigger some processing on
the subsystem when an idoc is created at this location. We have to specify the
command file name and the directory which has to be run.
This is so CONFUSING!
Let’s understand the process of creating an IDOC with an example –
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 9/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
The process of data transfer out of your SAP system is called the Outbound process,
while that of data moving into you SAP system is called Inbound process. As a
developer or a consultant who will be involved in setting up theses process for your
organization. Here are the steps how to set them up-
1. Create segments(WE31)
2. Create an idoc type(WE30)
3. Create a message type (WE81)
4. Associate a message type to idoc type(WE82)
5. Create a port(WE21)
6. If you are going to use the message control method to trigger idocs then create
the function module for creating the idoc and associate the function module
to an outbound process code
7. Otherwise, create the function module or stand-alone program which will
create the idoc
8. Create a partner profile(WE20) with the necessary information in the
outbound parameters for the partner you want to exchange the idoc
with.Trigger the idoc.
About
About Us
Advertise with Us
Write For Us
Contact Us
Career Suggestion
SAP Career Suggestion Tool
Software Testing as a Career
Interesting
eBook
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 11/12
7/2/23, 1:40 PM SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables
Blog
Quiz
SAP eBook
Execute online
Execute Java Online
Execute Javascript
Execute HTML
Execute Python
https://www.guru99.com/all-about-idocdefinition-architecture-implementation.html 12/12