8/3/2019 Idoc Concepts
1/29
2004 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without
notice
ALE / EDI Training MaterialPreparation
IDOC Concepts
8/3/2019 Idoc Concepts
2/29
page 2
IDOC Concepts
Audience
ABAP Consultants & Functional Consultants
Prerequisite
Introduction to ALE Technology
Extra Material:
http://teams1.sharepoint.hp.com/teams/GADSCSAPTD/ABAP%20training%20material/ALE,%20EDI%20and%20IDOCS/Idoc%20Extra%20Material.ppt
8/3/2019 Idoc Concepts
3/29
page 3
IDOC Concepts
IDOC Definition IDOC Partner Profile
IDOC Benefits IDOC Outbound Status
IDOC Components IDOC Inbound Data Flow
IDOC Message Types IDOC Inbound Status
IDOC Process Codes
IDOC Structure
IDOC Types of Processing
IDOC Outbound data flow
IDOC Port Definition
IDOC RFC Destination
Table ofContents
8/3/2019 Idoc Concepts
4/29
page 4
IDOC Concepts - Definition
IDOC Is not a process and its an Intermediate document
An IDOC is simply a data container that is used to exchange
the information between any two process that can understand
Syntax and semantics of the data
An IDOC is created as a result of execution of an outbound
ALE or EDI Process.
In an inbound ALE or EDI process, an IDOC serves as an
input to create application document
8/3/2019 Idoc Concepts
5/29
page 5
IDOC Concepts Data Transfer
Asynchronous
Document-related
R/3 System
System 1
SAP
Document
EDI subsystem
R/3 System
R/2 System
3rd party software
System 2
Document
Transaction
Message
IDoc
8/3/2019 Idoc Concepts
6/29
8/3/2019 Idoc Concepts
7/29
page 7
IDOC Components
y The advantage of using the IDOC interface is that it is an open interface. It is Independent of sending and receiving applications.
y Communication with back level IDOCS. Custom Applications, which are developed with the previous version of the IDOCS, aresupported. SAP Can Generate and process back level IDOCS.
y Exception Handling via Workflow, SAP Uses the Workflow to route the errors to the Concerned Person.
Enhance the add on (Customer) Requirements.
The IDOC Components are as follows
Segments
Basic IDOC Type
8/3/2019 Idoc Concepts
8/29
page 8
IDOC Concepts IDOC Segments
Control Record
Status Records
Data Records
Tree of Segments
E1HDDOC
M 1
E1TLSUM
C 1
E1HDADR
C 5
C 99
E1ITSCH
C 5
E1ITDOC
M 1
8/3/2019 Idoc Concepts
9/29
page 9
IDOC Concepts IDOC Segments
The Displayed segments are released in different
versions. TCODE WE31
8/3/2019 Idoc Concepts
10/29
page 10
IDOC Concepts IDOC Segments
Each Segment has three components
1. Segment type 2. Segment Definition 3. Documentation
Segment type will start with E1, Segment definition with E2 and
Documentation with E3. For example if you create one custom
Segment , it will create three segments starting with Z1,Z2 and
Z3 respectively.
Note: Segment is version dependent, once you release the
Segment you cannot edit till you reset the release.
8/3/2019 Idoc Concepts
11/29
page 11
IDOC Concepts Basic IDOC Types
Basic IDOC Type is a structure of data records in the IDOC.
Basic IDOC Type is a group of segments arranged hierarchicall
The segments maybe mandatory or Optional. While generating
The IDOC Inbound or outbound ,the data should be filled in the
Mandatory segments.
8/3/2019 Idoc Concepts
12/29
page 12
IDOC Concepts Basic IDOC Types
WE30
8/3/2019 Idoc Concepts
13/29
page 13
IDOC Concepts Basic IDOC Types
The popup screen shows the max , min parent segment & Level
attribute
s
8/3/2019 Idoc Concepts
14/29
page 14
IDOC Concepts Message Types
WE81
Message type represents the Business process . For example
ORDERS Message type for PO/Order.
8/3/2019 Idoc Concepts
15/29
page 15
IDOC Concepts Process Codes
Process Codes will be assigned in the Partner Profile. Two
types of process codes are used in the Partner Profile.
Outbound Process Code This Process code will be defined
in the Message control of the partner profile, Outboundprocess will be triggered through the Message Control. The
Process code names the relevant function module.
Inbound Process Code Names the Function module or
Workflow , which read the IDOC data and transfers the datato the application document.
8/3/2019 Idoc Concepts
16/29
page 16
IDOC Concepts IDOC Structure
Status Record IDoc-IDStatus information
Data Record IDoc-IDSequence/Hierarchy
Segment Format definition for header data
item data
Control Record IDoc-IDSender-ID
Receiver-ID
IDoc type and logical message
External structure
8/3/2019 Idoc Concepts
17/29
page 17
IDOC Concepts IDOC Structure
Rules of an IDOC
Only Valid segments are defined in the IDOC Type
Segments may be mandatory or Optional
Mandatory data should be filled
Data Record repetition should not exceed the max no as
Mentioned in the segment attributes.
8/3/2019 Idoc Concepts
18/29
page 18
IDOC Concepts Partner Profile
Outbound Messages
Inbound Messages
8/3/2019 Idoc Concepts
19/29
page 19
IDOC Concepts Partner Profile
PORT
IDOC Type, Extension, and View
8/3/2019 Idoc Concepts
20/29
page 20
IDOC Concepts Port Types
SAP Application
IDoc Interface & ALE Services
IDocIDoc
MIME
Internet
CPI-C
IDoc &IDoc &
statusstatus
R/2
IDocIDoc
tRFC
ALE
Any
IDoc &IDoc &
statusstatus
File
+ RFC
EDI
Any
IDocIDoc
ABAP
Any
IDocIDoc
XML
EC
Any
2.1 on 3.0 on 3.0 on 3.1 on4.5 on 4.6 on
8/3/2019 Idoc Concepts
21/29
page 21
IDOC Concepts Types of processing
Types of Processing
Inbound
Outbound
8/3/2019 Idoc Concepts
22/29
page 22
IDOC Concepts Outbound flow
IDoc
NASTRecord
Document
Document
SAP Application
Message Control (NAST)
System 2, e.g. EDI subsystem
IDoc Interface & ALE Services
Programs
8/3/2019 Idoc Concepts
23/29
page 23
IDOC Concepts With Stand Alone
Programs
Use the Standard Programs Like BD10 for MATMAS and send
the IDOC Manually
The Program will extract the data and then creates the Master
IDOC using MASTER_IDOC_DISTRIBUTE.
Then It will determine the no of receivers through distribution
Model. For each receiver it will check the Filters, Conversions, Versions, etc
For each receiver one Communication IDOC will be created and at the
same time IDOC Will create in the database alsoAfter Creating the Communication IDOC it will dispatch to the target system
8/3/2019 Idoc Concepts
24/29
page 24
IDOC Concepts Message Control
1/2
Single IDoc
Transfer according
to output mode
Batch of IDocs
by RSEOUT00
3/4
R
S
N
A
ST
E
DCall ALE Service
Call Selection Module
(application)
Read Partner Profile
Check NAST-Reord
8/3/2019 Idoc Concepts
25/29
page 25
IDOC Concepts Outbound Status
Status by the SAP system:01 IDoc created03 Data passed to port OK18 Triggering port OK25 Processing despite syntax error (outbound)26 Error during syntax check of IDoc (outbound)29 Error in ALE service30 IDoc ready for dispatch (ALE service)31 Error - no further processing37 IDoc created with errors39 IDoc received in target system40 Error - application document not created in target system41 Application document created in target system42 IDoc created by test transaction
Status by the EDI subsystem:
06 Translation OK08 Syntax check OK10 Interchange handling OK12 Dispatch OK14 Interchange Acknowledgement positive16 Functional Acknowledgement positive22 Dispatch OK, acknowledgement still due24 Control information of subsystem OK
8/3/2019 Idoc Concepts
26/29
page 26
IDOC Concepts Inbound Data flow
SAP Application
SAP Business Workflow
System 2, e.g. EDI subsystem
IDoc Interface & ALE Services
Document
IDoc +Process
IDoc
IDoc +Function Module
8/3/2019 Idoc Concepts
27/29
page 27
IDOC Concepts Inbound Through WF
In thisIn Process through Workflow
In this process inbound process code is defined with the workflow
options. The WF task could be single or multiple tasks. This will be
used in EDI process not in ALE.
Use the direct input via function call rather than Workflow for
inbound processing because of the performance overhead of
invoking Workflow for each inbound IDOC or IDOC packet.
8/3/2019 Idoc Concepts
28/29
page 28
IDOC Concepts Inbound Through FM
ALE reads the inbound IDOC customizing settings to determine
which function module to call.
ALE Layer calls the function module and given the IDOC(s) to be
processed.
The function module returns status information about whether
the IDOC was successfully processed.
If it was successfully processed, it returns the ID of the application
document that was created or changed.If an error occurred while processing the IDOC, the ALE layer
triggers the SAP Business Workflow event assigned to the IDOC.
8/3/2019 Idoc Concepts
29/29
page 29
IDOC Concepts Inbound Status
IDoc added56 IDoc with errors added60 Error during syntax check of IDoc (inbound)61 Processing despite syntax error (inbound)62 IDoc passed to application
63 Error passing IDoc to application64 IDoc ready to be passed to application65 Error in ALE service66 IDoc waits for predecessor (Serialization)68 Error - no further processing
74 IDoc added by test transactionStatus by the SAP system (Applications):51 Error - Application document not posted52 Application document incomplete posted53 Application document posted
Top Related