cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc

Former Member
0 Kudos

Dear Sapians

Iam Sunith newly registered in Sdn

My query is What is an Idoc and Why an Idocs are used

what is the difference between Idoc and LSMW

regards

Sunith

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sunith, welcome to the SDN community.

Answers for your queries in simple terms.

First of all there is no relevance for comparision between IDOC and LSMW.

In short IDOC is an intermediate document.

Let us say there are X and Y companies where X is a cusotmer to Y and Y working on SAP and X on either SAP or Legacy.

Now suppose X creates a purchase order in his system(legacy) through interface(XI or something) this purchase order comes into SAP and creates a sales order. now u have to give the order acknowledgement to ur custemer. Now company Y sends a IDOC of sales order creation to system X. So basically IDOC is a communication method used by SAP for external systems. Not only in creation of a sales order, when ever you have to send an information from SAP to any other system, we use IDOC fomat and send the appropriate information to the customer or vendor or any one else.

On the other hand, LSMW is a data migration tool to upload the data in SAP. Through LSMW u can upload Master data as well as Transactional data into SAP.

For example, say you are working on a implementation project. As the client has data in his system and which is not SAP, u need to get this data(customer master records) into SAP. For this LSMW is one of the best tools available in SAP.

cheers,

Anil.

Former Member
0 Kudos

IDOCS are data containers used to exchange data between two distributed environments.

LSMW is a data migration tool used to migrate data from legacy system to SAP.

Former Member
0 Kudos

Hi sunith kumar ,

i will give you an example , previously you run your bussiness

in VB or oracle , now you have implemented SAP . now how to transfer data from that VB to SAP . Here IDOC is used as an intermediate Document to transfer data from your VB to SAP . it's just nothing but a container which holds data that has to be transfered.

whereas LSMW is the technique to transfer data . in LSMW

we can use any one of the methods for transfering , it may be either

Batch input method

IDOC

BAPI .

Hope this may be helpful.

Please reward points if find helpful.

Thanks and regards,

Rajeshwar.

Sunil76
Participant
0 Kudos

Dear Sunith,

IDOCS - Its an intermediate document interface. Its part of EDI. It can be used to send an reicevre messages from SAP to Non SAP system.

You can get the detail in help.sap.com - ALE programming guide.

Please reward

Regards

Sunil

Former Member
0 Kudos

hi

IDOC's are intermediary documents into which the data will be transferred and then this idoc's gets transferred to sap or non-sap system.

ALE is used to create link between 2 systems. So without the linking the data cannot be uploaded or downloaded.

BAPI, LSMW and BDC are used to transfer data b/w systems.

BDC is used to transfer data b/w only sap systems.

LSMW is used to transfer data b/w sap and non-sap systems.

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

IDOCTP IDOC type

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.

e.g.

DATA INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.

DATA W_SEGDATA LIKE zsegment "custom segment zsegment

INT_EDIDD-SEGNAM = 'ZSEGMENT'

W_SEGDATA-field1 = value "taken from some table

W_SEGDATA-field2 = value "taken from some table

INT_EDIDD-SEGDATA = W_SEGDATA

APPEND INT_EDIDD

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

structure.

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.

hope this is helpful

reward if helpful

regards,

Krishna Prasad

Former Member
0 Kudos

Hi Kumar,

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

IDOCTP IDOC type

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.

e.g.

DATA INT_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE.

DATA W_SEGDATA LIKE zsegment "custom segment zsegment

INT_EDIDD-SEGNAM = 'ZSEGMENT'

W_SEGDATA-field1 = value "taken from some table

W_SEGDATA-field2 = value "taken from some table

INT_EDIDD-SEGDATA = W_SEGDATA

APPEND INT_EDIDD

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

structure.

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.

difference between Idoc and LSMW.

IDOC's are intermediary documents into which the data will be transferred and then this idoc's gets transferred to sap or non-sap system.

LSMW is used to transfer data b/w sap and non-sap systems.

If useful please reward points.

Regards

Sasikanth.Ch