Promote the Author $5 $10 $15

What is IDoc ?

VN:F [1.9.8_1114]
Rating: 7.6/10 (5 votes cast)

Classical BAdI @ SAP EBook

About IDoc

If you are dealing with transfer of data between SAP or non-SAP systems, you would have certainly come across the term IDoc. In this post, lets get an overview about IDoc.

  • IDoc stands for Intermediate Documents. It’s a data container used to exchange data between two software processes. It’s created by an outbound ALE (Application link enabling)/EDI (Electronic data interchange) process and acts as input to an inbound ALE/EDI process.
  • Data in IDoc are stored on database in different database tables instead of flat files.
  • Every IDoc has a unique number.
  • IDocs are independent of sending and receiving systems.
  • IDocs are based on EDI standards, but is closest to EDIFACT standard.
  • Different outbound and inbound processes can use the same IDoc e.g. IDoc type ORDERS01 is used by MM module for purchase order as well as by SD module for accepting sales order.
  • IDocs contain data in character format (no binary data) i.e. can be viewed in simple text viewer.

IDoc Definition Components

Basic IDoc Type

  • Name:
  • Before release 4.0           – 8 characters

    Since release 4.0              – 30 characters

    Last 2 characters represent the version number. After a basic IDoc type is released and you move to a newer version of SAP, any change to basic IDoc type would create a new version of basic IDoc type e.g. ORDERS01, ORDERS02, ORDERS03 etc.

  • List of permitted segments
  • Hierarchy of permitted segments – Parent child relationship
  • Mandatory vs. Optional segments – Which segment is mandatory and which one is optional?
  • Minimum/maximum range for each segment – What is the minimum and maximum number of data records corresponding to a particular segment in an IDoc?

Segments

Segments define the structure and format of data records. These are reusable components i.e. could be used in more than one IDoc types.

Three parts:

  • Segment type : Version independent name of a segment. Begin with E1/Z1.
  • Segment definition :
  • Version dependent definition of a segment where the data fields are specified. Can not be more than 1000 characters.

    Segment definition name : Upto 30 characters. Start with E2/Z2 and last 3 characters for version. E.g. Z2TEST, Z2TEST001, Z2TEST002 etc.

  • Segment Documentation : Each segment has only one documentation with name starting from E3/Z3. It contains description about each field.

Data Fields

It represents a single data item in a segment. Can be only alphanumeric e.g. CHAR, CLNT, CUKY, DATS, LANG, and NUMC.

IDoc Runtime Components

An IDoc is a instance of IDoc type. At runtime, the IDoc contains several records which can be classified into following broad categories:

  • Control record
  • Data record
  • Status record

IDoc number is the element which ties the control record, data records and status records together.

Control record

Control record contains the control information about an IDoc e.g. IDoc number, sender & receiver information, IDoc type etc.

There’s only one control record per IDoc.

  • DDIC structure :
  • Before release 4.0           -              EDI_DC

    Since release 4.0              -              EDI_DC40

  • Transparent table : Stored in client dependent table EDIDC. Key field of this table is IDoc number.

Data record

Data records contain application data.

  • Each data record has 2 parts:
  • Administrative section : Segment name, Client, IDoc number, segment number and hierarchy level information.

    Data section : 1000 bytes of application data.

  • DDIC structure :
  • Before release 4.0           -              EDI_DD

    Since release 4.0              –              EDI_DD40

  • Transparent table : Stored in client dependent table with key field as IDoc number, Counter in cluster table and Segment number.
  • Before release 4.0           -              EDID2

    Since release 4.0              –              EDID4

Status record

During the lifecycle of IDocs, various status records are attached to an IDoc.

Multiple status records could be attached to an IDoc.

Latest status code is also maintained in the control record.

  • Status codes:
  • For outbound process :  01           -              49

    For inbound process    :  50           and above.

  • Transparent table:           Stored in table EDIDS.

List of status codes can be viewed using transaction WE47.

Hope that the above content brings you to talking terms about IDoc. In my future posts, I would throw more light on working with IDocs. Until then, GoodBye.

VN:F [1.9.8_1114]
Rating: 7.6/10 (5 votes cast)
What is IDoc ?, 7.6 out of 10 based on 5 ratings
Hey friends!!! Don't forget to promote the post by pressing the buttons below, if you liked it...
  • Digg
  • del.icio.us
  • StumbleUpon
  • Twitthis
  • Yahoo! Buzz
  • Facebook
  • Technorati
  • LinkedIn

Leave a Reply

  

  

  


*

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>