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

IDOC

Former Member
0 Likes
1,185

Hi Experts,

I would like to know what is an IDOC...

How and when it is used in a project...

If I want to know more about it, where should I look into...

Which Tcode to go to find IDOCs...

Regards,

Sangeeta.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,141

Hi,

This link may help u.

www.erpgenie.com/sapedi/idoc_abap.htm

Regards.

Hi Experts,

I would like to know what is an IDOC...

How and when it is used in a project...

If I want to know more about it, where should I look into...

Which Tcode to go to find IDOCs...

Regards,

Sangeeta.

8 REPLIES 8
Read only

Former Member
0 Likes
1,141

Hi,

Transaction for Idoc is WE02/WE05.

Regards,

Padmam.

Read only

Former Member
0 Likes
1,141

Hi Sangeetha,

http://www.sap-img.com/basis/explain-what-is-idoc.htm

If u want to see list of all IDoc transaction codes....go to IDoc Menu ( WEDI is the transaction code ). Here u can see all outbound/ inbound tcodes and also documentation on IDOC's

Reward points.

Regards,

Hk

Read only

former_member404244
Active Contributor
0 Likes
1,141

Hi,

Plz gothrough the links.

http://searchsap.techtarget.com/sDefinition/0,,sid21_gci852485,00.html

Check the tcode WEDI for all transactions...

Regards,

Nagaraj

Read only

VikasB
Active Participant
0 Likes
1,141

hi Sangeeta

IDOC - Intermediate documents.

mainly used for treansfer of data

want to know more abt it...go for

<a href="http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/IDOC_tutorial.html">http://www.sapbrainsonline.com/TUTORIALS/TECHNICAL/IDOC_tutorial.html</a>

Read only

Former Member
0 Likes
1,141

Hello Sangeeta,

Please find some information on IDOC.

IDocs can be seen as plain ASCII files Keep this in mind: IDocs are basically a small number of records in ASCII format, building altogether a logical entity. In order to sharpen your imagination, you should always see an IDoc as a plain ASCII text file. E.g. an IDoc may contain the data of a purchase or sales order, resp. or it may contain the data of a material master or of a customer master. See the illustration MATMAS for an example of a material master IDoc or illustration ORDERS for an example of a purchase order IDoc.

We will discuss the example of the material master IDoc MATMAS in the paragraphs below. The contents of such an IDoc is shown in the illustration MATMAS .

IDocs are defined in WE31 The definition of the IDoc structure MATMAS01 is deposited in the data dictionary and can be viewed with WE30 .

Header record plus many data records = 1 Idoc Any IDoc consists of two sections

the header record

which is always the first line of the file and provides the adminstrative information.

The rest of the file is made up by

the data records

which contain the application dependent data, in our example the material master data.

The IDoc Header Record

Header Record with context information Each IDoc is trailed by a header record, which provides important information about the context under which the IDoc package has been received. The header record has a fixed pre-defined structure, which is defined in the data dictionary as EDIDC and can viewed with SE11 in the R/3 data dictionary. The header of our example will tell us, that the IDoc has been received from a sender with the name PROCLNT100 and sent to the system with the name DEVCLNT100 . It further tells us that the IDoc is to be interpreted according to the IDoc definition called MATMAS01 .

Header EDIDC MATMAS01 ... DEVCLNT100 PROCLNT100 ...

Sender The sender's identification PROCLNT100 tells the receiver who sent the IDoc. This serves the purpose of filtering unwanted data and gives also the opportunity to process IDocs differently with respect to the sender.

Receiver The receiver's identification DEVCLNT100 should be included in the IDoc header to make sure, that the data has reached the intended recepient.

IDoc Type The name of the IDoc type MATMAS01 is the key information for the IDoc processor. It is used to interpret the data in the IDoc records, which otherwise would be nothing more than a sequence of meaningless characters.

The IDoc Data

View MATMAS01 with WE30 The IDoc type MATMAS01 stands for material master and defines the data structure of the file. It has been designed to exchange data of the material master. You can view the definition of any IDoc data structure directly within R/3 with transaction WE30. The result could look like in the illustration.

Data and segment info is stored in EDID4 The data records have to match the DDIC structure EDID4, which you can view with SE11. They are made up of two parts. Every record hence is led in by a segment info. The remaining part of the record is filled with the actual IDoc data. These data is stored in the field EDID4-SDATA.

Segment Info

...E1MARAM ....

...E1MARCM ....

...E1MARDM ....

Segment Data

01000000001234567

01000000001234567

01000000001234567

Segment name tells the data structure The segment info tells the IDoc processor how the following segment should be interpreted. Most of the information in the segment info can be regarded as redundant information for eventual non-SAP-compliant partners, because this information is also stored in R/3s IDoc definition storage. The only interesting information is the name of the segment EDID4-SEGNAM.

The segment name EDID4-SEGNAM denominates a corresponding data dictionary structure with the same name, which has been cvreated by transaction WE31 automatically when defining the IDoc segment definition. You would usually do something like the following:

Data in EDID4-SDATA MOVE edidd-sdata TO my_segment.

Then you can access the fields of the IDoc segment EDIDD-SDATA as fields of the structure my_segment .

Sample coding The following coding sample, shows how you may read a MATMAS IDoc and extract the data for the MARA and MARC segments to some internal variables and tables.

DATA: xmara LIKE mara.

DATA: tmarc LIKE marc

OCCURS 0

WITH HEADER LINE.

LOOP AT edidd.

CASE edidd-segnam.

WHEN 'E1MARAM'.

MOVE edidd-sdata TO xmara.

WHEN 'E1MARCM'.

MOVE edidd-sdata TO tmarc.

APPEND tmarc.

ENDCASE.

ENDLOOP.

now do something with xmara and tmarc.

Reward IF Useful.

Regards

--

Sasidhar Reddy Matli.

Read only

Former Member
0 Likes
1,142

Hi,

This link may help u.

www.erpgenie.com/sapedi/idoc_abap.htm

Regards.

Read only

Former Member
0 Likes
1,141

Hi Sangeetha,

Creation of IDoc

To Create Idoc we need to follow these steps:

Create Segment ( WE31)

Create Idoc Type ( WE30)

Create Message Type ( WE81)

Assign Idoc Type to Message Type ( WE82)

Creating a Segment

Go to transaction code WE31

Enter the name for your segment type and click on the Create icon

Type the short text

Enter the variable names and data elements

Save it and go back

Go to Edit -> Set Release

Follow steps to create more number of segments

Create IDOC Type

Go to transaction code WE30

Enter the Object Name, select Basic type and click Create icon

Select the create new option and enter a description for your basic IDOC type and press enter

Select the IDOC Name and click Create icon

The system prompts us to enter a segment type and its attributes

Choose the appropriate values and press Enter

The system transfers the name of the segment type to the IDOC editor.

Create IDOC Type

Follow these steps to add more number of segments to Parent or as Parent-child relation

Save it and go back

Go to Edit -> Set release

Create Message Type

Go to transaction code WE81

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter

Click New Entries to create new Message Type

Fill details

Save it and go back

Assign Message Type to IDoc Type

Go to transaction code WE82

Change the details from Display mode to Change mode

After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.

Click New Entries to create new Message Type.

Fill details

Save it and go back

Reward points pls.

Regards,

Govind.

Read only

Former Member
0 Likes
1,141

Hi Sangeeta,

IDOCs are basically used to provide a standard for interfaces to SAP.

Whenever you have some interface where there is a need for data transfer both inbound and outbound IDOCs can be used.

They are nothing but structures defined for various logical functions. So whenever data needs to go out of SAP all you need to do is to populate the IDOC with the relevant data that is required for your application and SAP will create a text file out of this IDOC automatically thru message control.

An IDoc type consists of the following three record types:

· Control record

· Data records

· Status records