Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

what is idoc.

Former Member
0 Kudos

hi what is meant by idoc and tell me the step wise procedure for sap. iam a mm student so pls help me.


Former Member
0 Kudos

Hi Ramamoorthy,

Pls go through this link to know abt idoc and step by step procedure to create idoc



Edited by: Azhar on Feb 8, 2008 1:31 AM

Edited by: Azhar on Feb 8, 2008 1:31 AM

Edited by: Azhar on Feb 8, 2008 1:33 AM

Former Member
0 Kudos



Edited by: Azhar on Feb 8, 2008 1:34 AM

Edited by: Azhar on Feb 8, 2008 1:34 AM

Former Member
0 Kudos

Hi Ramamoorthy,

IDoc (for intermediate document) is a standard data structure for electronic data interchange (EDI) between application programs written for the popular SAP business system or between an SAP application and an external program. IDocs serve as the vehicle for data transfer in SAP's Application Link Enabling (ALE) system. IDocs are used for asynchronous transactions: each IDoc generated exists as a self-contained text file that can then be transmitted to the requesting workstation without connecting to the central database. Another SAP mechanism, the Business Application Programming Interface (BAPI) is used for synchronous transactions.

A large enterprise's networked computing environment is likely to connect many geographically distributed computers to the main database. These computers are likely to use different hardware and/or operating system platforms. An IDoc encapsulates data so that it can be exchanged between different systems without conversion from one format to another.

IDoc types define different categories of data, such as purchase orders or invoices, which may then be broken down into more specific categories called message types. Greater specificity means that an IDoc type is capable of storing only the data required for a particular transaction, which increases efficiency and decreases resource demands.

An IDoc can be generated at any point in a transaction process. For example, during a shipping transaction process, an IDoc may be generated that includes the data fields required to print a shipping manifest. After a user performs an SAP transaction, one or more IDocs are generated in the sending database and passed to the ALE communication layer. The communication layer performs a Remote Function Call (RFC), using the port definition and RFC destination specified by the customer model. The IDoc is transmitted to the receiver, which may be an R/3, R/2, or some external system.

Idoc creation

IDOC Programming

There are two processes in IDOC processing one is INBOUND PROCESS( IDOC coming to the system and its handling at various stages) and the other is OUTBOUND PROCESS( IDOC is send to other system . Separate ABAP programs are written for these 2 processes and different configuration settings are required for each one .Depending upon the trigeering mechanism different programming approaches are used.OUTBOUND PROGRAMS handle the IDOC creation and INBOUND PROGRAMS handle the inbound IDOC and the data trasfer from the IDOC to the database tables.

The basic structure of all outbound programs is same. The CONTROL

record which is of TYPE EDIDC has to be filled. It contains important fields like


MESTYP Message Type

RCVPRN Recieving Partner (Destination)

RCVPRT Partner Type (it is LS i.e Logical System)

The DATA RECORD internal table which is of TYPE EDIDD has to be filled

in the same order as there are segments in the IDOC definition.

It has 2 important fields which are to be filled ,these are

SEGNAM Name of the segment

SEGDATA Data in the segment and can be upto 1000 bytes.This field

is corresponds to each data segment in the IDOC.



DATA W_SEGDATA LIKE zsegment "custom segment zsegment


W_SEGDATA-field1 = value "taken from some table

W_SEGDATA-field2 = value "taken from some table



This will fill the data record corresponding to the segment ZSEGMENT . For all

segments the sam steps will be repeated until all the data corresponding to all the

segments in the idoc is filled in the internal table of type EDIDD.

There is only one control record and can be multile data records in the idoc


Which data is to be extracted from the tables to be filled in EDIDD type internal table is determined in standalone programs from the objects which are specified in the selection screen and from the object key passed to the function module in case of message control and is taken from BDCP table in case of change pointers using function modules "CHANGE_POINTERS_READ"

In case of stand alone programs and function modules based on change pointers method the function module "MASTER_IDOC_DISTRIBUTE" is used to send the IDOC to ALE layer for distribution ,in case of message control it is handled automatically by the RSNASTED program invoked by the message control.

If useful please reward points.


Adarsh Srivastava.

Former Member
0 Kudos

An Intermediate Document (IDoc is a SAP standard format for data transfer between systems.

IDocs are mainly used for Application Link Enabling (ALE) and for Electronic Data Interchange

(EDI). They are not used for processing inside an application.

Intermediate Document


Usage in ALE and EDI

Consisting of

control record

data record

status record


Transfers all fields

Business Documents (BDocs) are used by the CRM Middleware to exchange data with mobile

clients. Furthermore BDocs are the central data structure to process business objects internally.

In contrast to Idocs, for which the internal processing has to be implemented manually, the coding to

process BDoc may be generated automatically.

Business Document

tRFC or qRFC

Usage in CRM for data exchange

Possibly complex data structures

both in transport and processing

Runtime objects, e.g. services

generated from BDoc repository


Internally created

Uses delta field communication

Reward Points if Useful



Former Member