Вы находитесь на странице: 1из 9

An Overview of IDocs in SAP R/3

Name
Author(s)

Suresh Kumar K.B

Reviewed by

Anupama Ramachandran

256968442.doc

1. Introduction of Intermediate Documents (IDocs) and SAP R/3:..............................3


2. SAP R/3 Overview:........................................................................................................3
3. IDoc Types and Segment Definitions:..........................................................................4
3.1 What is an IDoc?........................................................................................................4
3.2 Process.......................................................................................................................4
3.3 Intermediate Document.............................................................................................4
3.4 IDoc Types.................................................................................................................4
4. Structure of an Idoc:......................................................................................................5
4.1 Control section...........................................................................................................5
4.2 Data section...............................................................................................................5
4.3 Status section.............................................................................................................6
5. Structure of a segment:.................................................................................................6
5.1 Control segment.........................................................................................................6
5.2 Data segment.............................................................................................................6
5.3 Status segment...........................................................................................................6
6. IDoc Transactions:.........................................................................................................7
7. Standard statuses of IDoc:............................................................................................7
7.1 Outbound IDocs.........................................................................................................7
7.2 Inbound IDocs...........................................................................................................8
7.3 List of standard basic IDoc types...............................................................................8
8. Application of IDoc:.......................................................................................................9
9. Reference:.......................................................................................................................9

256968442.doc

1. Introduction of Intermediate Documents (IDocs) and SAP


R/3:
SAP (Systems, Applications, and Products in Data Processing) is an enterprise-scale,
customizable, workflow application produced by SAP AG of Frankfurt, Germany. This application
was basically designed to automate the entire core processes involved in a large business
including order processing, order fulfillment, customer service, supply chain management, and
inventory management. This product is widely used for medium and large businesses across the
globe.
The Key factor for the success of SAP is its powerful integration features that enable
disparate third-party applications and incompatible databases to exchange information with each
other. The main objective of an implementation of the SAP R/3 ERP is to group all the functions of
the company together, in a single system. But it is very unlikely that this philosophy is applied so
strictly.
To communicate with each other, SAP has designed for R/3 systems its own
communication tool: IDocs. These Intermediate Documents are the basis of every interface
between R/3 systems. It is even possible, using a middleware EDI system, to have an R/3 system
communicate by IDocs on its side, with an open system by XML files on the other side. An IDoc is
a transactional message, in the form of a pure ASCII file, sent from a SAP-connected application
to other applications. Most of an IDoc message consists of fields of data grouped into segments.
The segments themselves have a hierarchical relation to each other.

2. SAP R/3 Overview:


SAP R/3 is SAP's integrated software solution for client/server and distributed open
systems. SAP's R/3 is the world's most-used standard business software for client/server
computing. R/3 meets the needs of a customer from the small grocer with 3 users to the multibillion dollar companies. The software is highly customizable using SAP's proprietary
programming language, ABAP/4. R/3 is scalable and highly suited for many types and sizes of
organizations.

256968442.doc

The R/3 architecture is comprised of application and database servers. The application
servers house the software and the databases servers handle document updates and master file
databases. The system can support an unlimited number of servers and a variety of hardware
configurations. SAP R/3 is based on various hardware and software architectures, running on
most types of UNIX, on Windows NT and OS/400. SAP R/3 runs on several databases Oracle,
Adabas D, Informix, and DB2 for UNIX, DB2/400, and Microsofts SQL Server 6.0.

3. IDoc Types and Segment Definitions:


3.1 What is an IDoc?
An IDoc is simply a data container that is used to exchange information between any two
processes that can understand the syntax and semantics of the data. IDoc is not a process.
Since an IDoc is a message, both the sending and receiving applications must conform to
a common convention about where, in a given IDoc, each piece of data will be found. In order to
put an end for this, SAP AG has defined several hundred IDoc types and a large number of
segment types. And SAP owners can create their own custom IDoc types and segment types.

3.2 Process
The two available processes for IDocs are

Outbound Process
When the data is sent out from the system, the process is called Outbound
Process and the IDoc is known as Outbound IDoc.

Inbound Process
When the data is coming in, the process is called Inbound Process and the IDoc
is known as Inbound IDoc.

256968442.doc
3.3 Intermediate Document

IDocs are stored in the database.


In the SAP system, IDocs are stored in database tables.
IDocs are independent of the sending and receiving systems.
IDocs are independent of the direction of data exchange.

3.4 IDoc Types


There are basically two types of IDocs.

Basic Idoc: Basic IDoc type defines the structure and format of the business document
that is to be exchanged between two systems.

Extension Idoc: Extending the functionality by adding more segments to existing Basic
IDocs.

Some tips
Identifying a parser file is one step in setting up to use data from IDocs. A parser file for
an IDoc type contains the information needed to parse the IDocs; such as what segments can
appear in it, which segments are repeatable, what data fields will appear in each segment, what
order the fields will be in, and what length each field will have.
IDoc types have names of six letters and two numerals. SHPMNT01 is an IDoc that
embodies a message about shipments. SAP revises the definitions of IDocs from time-to-time,
and the two numerals at the end of the name identify the revision.
Segment names may end in three digit version numbers. For example, E2KNA1M001 is
a segment for the DEBMAS02 (customer masters) IDoc type.

4. Structure of an Idoc:
An IDoc is made of three sections: control, data and status. Each section is named
following the name of the one or many segments that composed it. Thus, the control section
contains a single control segment only, the data section contains one or many data segments,
and the status section contains one or many status segments.
It is important to notice that when exchanging IDocs between systems, whether they are
SAP R/3 or not, only control and data sections are sent. Indeed, the status section remains
system specific. Nevertheless, the status section is conceptually associated with the IDoc, so it is
systematically represented as being a part of the IDoc.

4.1 Control section


The particularity of the control section is that it contains only one single segment. This
section represents the header of the IDoc; it contains an identifier of the IDoc, along with data
concerning the sender system and the receiver system.
Layout of an IDoc control Section.

256968442.doc
IDOC number
1234567890

Sender
R3NYC

Receiver
R3LA

Port
FILE

Message type
INVOICES

IDoc type
INVOICE01

This cover slip format informs the receiving system of the IDocs purpose, and the
receiving system uses it to determine the correct processing algorithm for handling the arriving
IDoc

4.2 Data section


The particularity of the data section is that it contains one or more segments which are
organized in a hierarchical way. There is a concept of parent segment and child segment, a
concept in which the child segment could not exist if the superior parent segment does not exist
in the hierarchy.
This section is the most important, because as it is implied in its name, it is this section
which contains the application data to transmit.

4.3 Status section


The particularity of the status section is that it is specific to the system where the IDoc is
displayed. Indeed, after its transfer into another system, the IDoc is actually rebuilt by copy,
segment by segment. The status segments only are not transferred: these are specific to each
one of the systems.
This status section is composed of one or more status segments. These segments are
organized in a sequential way, so that only the last segment has a real importance. In
consequence, what is referred as being the IDoc's status is actually copied from the status
mentioned in the last segment of the IDoc's status section.

5. Structure of a segment:
A segment is a record, defined as such in the vocabulary of databases. Indeed, as a line
of a database, a segment is a sequence of fields of different length. There is no hierarchical
structure within a segment; every field is at the same level .

5.1 Control segment


The most important fields of the control segment are the following:
IDoc number : number of the IDoc in the local system
Direction
: direction of the IDoc, from the point of view of the local system;
(1 stands for outbound, 2 for inbound)
Status
: current status of the IDoc in the local system
Basic type
: basic IDoc type
Extension
: type of extension, if applicable
Message type : message type
Sender or Recipient information: details concerning the sender or the receiver
Port
: port
Partner number : number of logical system
Partn.Type
: partner type; most of the time LS which stands for Logical System
SAP Release : version number of the IDoc

256968442.doc

Output Mode

: output mode; 2 stands for immediate sending, 4 for collected sending

5.2 Data segment


The structure of a data segment depends on the segment type. Each segment type has a
different number of fields, each field having a different length.
The only common characteristic between all the segment types is the format of the data.
Indeed, every field of every data segments has the character format, whatever the way the fields
are represented in the IDoc display.

5.3 Status segment


The structure of a status segment is the following:
Status: the status reported by the segment
Message: the text describing the status
The other fields of the status segment are used to create a message following a SAP standard
structure.

6. IDoc Transactions:
BD87
SALE
WE02
WE05
WE09
WE19

: Status Monitor for ALE Messages


: Display ALE Customizing
: Display IDoc
: IDoc Lists
: Search for IDoc in Database
: Test tool

7. Standard statuses of IDoc:


7.1 Outbound IDocs
Status
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Description
Not used, only R/2
IDoc generated
Error passing data to port
Data passed to port OK
Error within control information of EDI subsystem
Error during translation
Translation OK
Error during syntax check
Syntax check OK
Error during interchange handling
Interchange handling OK
Error during dispatch
Dispatch OK
Retransmission OK
Interchange Acknowledgement positive
Interchange Acknowledgement negative

256968442.doc
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

Functional Acknowledgement positive


Functional Acknowledgement negative
Triggering EDI subsystem OK
Data transfer for test OK
Error triggering EDI subsystem
Error passing data for test
Dispatch OK, acknowledgement still due
Error during retransmission
Control information of EDI subsystem OK
Processing despite syntax error (outbound)
Error during syntax check of IDoc (outbound)
Error in dispatch level (ALE service)
Not used
Error in ALE service
IDoc ready for dispatch (ALE service)
Error - no further processing
IDoc was edited
Original of an IDoc which was edited
Error in control record of IDoc
IDoc reloaded from archive
Electronic signature not performed (timeout)
IDoc added incorrectly
IDoc archived
IDoc is in the target system (ALE service)
Application document not created in target system
Application document created in target system
IDoc was created by test transaction

7.2 Inbound IDocs


Status
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

Description
IDoc added
Application document not posted
Application document not fully posted
Application document posted
Error during formal application check
Formal application check OK
IDoc with errors added
Test IDoc: Error during application check
IDoc copy from R/2 connection
Not used
Error during syntax check of IDoc (inbound)
Processing despite syntax error (inbound)
IDoc passed to application
Error passing IDoc to application
IDoc ready to be transferred to application
Error in ALE service
IDoc is waiting for predecessor IDoc (serialization)
Not used
Error - no further processing
IDoc was edited
Original of an IDoc which was edited
IDoc reloaded from archive
Not used, only R/2

256968442.doc
73
74

IDoc archived
IDoc was created by test transaction

7.3 List of standard basic IDoc types


The knowledge of standard basic IDoc types allows the interface manager to choose
interfaces very quickly, without having to develop a new specific type. Please refer the attached
document for a list of standard basic IDOC types.

List of standard basic


IDoc types.doc

8. Application of IDoc:
Several SAP applications use the robust IDOC interface. IDocs serve the basic purpose of
transferring data from one application to another.
EDI Integration
ALE Integration
Legacy System Integration
Third-party Product Integration
Workflow Integration
SAP R/3 Integration
Internet Integration

9. Reference:
1. www.sapfans.com
2. www.supinfo-projects.com
3. www.sappoint.com

Вам также может понравиться