Friday, February 21, 2020

IDOC Tutorial

What is IDOC, ALE and EDI 

IDOC (stands for Intermediate Document) is a SAP standard format for transferring data between systems. Each IDOC exists as an ASCII text file that can be transmitted directly to the requesting workstation without a central database. 

ALE and EDI 

IDOC uses ALE (Application Link Enabling) and EDI (Electronic Data Interchange) to deliver the data to the receiving systems.  

When the data needs to be transferred between two SAP systems, then IDOC uses the ALE Technology.  

For exchanging data between a SAP system and a non-SAP system, IDOC uses EDI to convert and deliver the data. 

 

IDOC Structure 

Ex: 

 

An IDOC consists of three parts: 

  • One Record Control: It is always the first line of the file and contains administrative information such as the IDOC’s functional category (Message Type/Basic IDOC Type), as well as its origin (Sender) and destination (Receiver) as in conventional EDI. 

 

  • One or Many Data Record: Includes application data in the segments and describes the hierarchy of these segments in the IDOC. An IDOC always contains a header segments consisting of 6 fields: 

  • SEGNAM – Segment 

  • MANDT – Client 

  • DOCNUM – IDOC Number 

  • SEGNUM – Segment Number 

  • PSGNUM – Number of the Parent Segment 

  • HLEVEL – Hierarchy Level 

 

  • One or Many Status Record: contains all previous processing status as well as messages… 

You can see the IDOC structure as illustrated as image below: 

 

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 Extension IDOC type? 

An IDOC is of 2 types:- 

  1. Basic 

  1. Extension 

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. 

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 

An idoc type can be associated with many message types 

Also, a message type can be associated with different idoc types. Transaction WE81 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 

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. 

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. 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 


Goods Movement against Production Order