IDoc's
IDoc's
5/27/15
Copyright IBM Corporation 2007
Introduction
An IDoc is simply a data container that is used to exchange information
between any two systems that can understand the syntax and semantics
of the data.
Electronic Data Interchange (EDI) and Application Link Enabling (ALE)
are used for exchanging business data between different systems.
ALE is basically the scheduling mechanism that defines when and
between which partners ( mostly internal ) and what kind of data will be
exchanged on a regular or event triggered basis
In EDI technique business data is exchanged with an external partner
system ( customer or vendor ).
No difference between EDI & ALE processing from application point of
view
5/27/15
ALE ARCHITECTURE
Application layer
This layer provides ALE with an Interface to R/3 to originate or
receive messages containing data to or from external or other R/3
systems
Distribution / ALE Layer
This layer filters and converts messages containing data based on
predefined or custom defined rule sets.
Communication Layer
Sending data to communicating partner.
5/27/15
In a Nut Shell
Application Layer
Application
Application
Master
IDOC
Distribution/ ALELayer
Determine
Determine
Receipients
Receipients
Filter/Convert
Filter/Convert
Data,
Data, Create
CreateIDOC
IDOC
Communication
Layer
Comm.
IDOC
Carrier
Carrier
Application
Data
Application
Application
Functions
Functions
Filter/Convert
Filter/Convert
Data
Data
5/27/15
Comm.
IDOC
Transaction Data
SD, MM, FI, CO, etc.
Master Data
Material, Customer, Vendor, etc.
5/27/15
IDoc Process
The two available process for IDOCs are
Outbound Process
Inbound Process
Sending out the data from our system. The IDOC which is
called as Outbound IDOC.
5/27/15
LOGICAL SYSTEM
A logical system ( LS ) is the representation of an R/3 or external system in SAP
R/3 for the distribution of data to and from the R/3 system
In SAP, Logical system implies to client.
T-code to create Logical system : BD54
T-code to assign Logical system to client : SCC4
5/27/15
Logical System
TCODE:
BD54
5/27/15
TCODE:
SCC4
5/27/15
MESSAGE TYPE
Message Type: A message type represents the application message
being exchanged between R/3 systems and another R3/non-R3
external system.
It is the representation of the data from a business perspective.
Tcode WE81
Example: MATMAS is message type for Material Master
DEBMAS is message type for Customer Master
CREMAS is message type for Vendor Master
10
5/27/15
Message Types
WE81
11
5/27/15
BASIC TYPE
12
5/27/15
WE30
13
5/27/15
14
5/27/15
IDoc Segments
Collection of data fields filled with alphanumeric characters
Non character values (ie floating point) have to be converted to alphanumeric
characters
Fields are aligned left
Currencies, countries and units of measure have to be named in ISO-codes
The complete data in a segment can have a maximum length of 1000 bytes
15
5/27/15
Structure of Segments
IDoc Segments
Header segments
(E1EDK . . .)
Summary segments
(E1EDS . . .)
16
5/27/15
Create Segment
TCODE:
WE31
17
5/27/15
Segment, contd..
18
5/27/15
Idoc Types
TCODE:
WE30
19
5/27/15
20
5/27/15
WE82
21
5/27/15
Idoc Documentation
WE60
22
5/27/15
23
5/27/15
Structure of an IDoc
IDoc
IDoc structure
Control record
Sender
Sender Receiver
Receiver MsgType
MsgType IDoc-type
IDoc-typeStatus
Status
HEADER
HEADER
ITEM
ITEM
SUBITEM
SUBITEM
SUBITEM
SUBITEM
TEXT
TEXT
ITEM
ITEM
SUBITEM
SUBITEM
SUBITEM
SUBITEM
ACCUM
ACCUM
xxxxxxxx
xxxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxx
xxxx
xxxx
xxxx
xxxxxxx
xxxxxxx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
xxxx
xxxx
xxxx
xxxx
xxxxxxxx
xxxxxxxx
M
M
Data
records
ACCUM
ACCUM
11
M
M
16:22:34
16:22:34
11
ITEM
ITEM
M
M
9999
9999
SUBITEM
SUBITEM
Status records
"Ready
"Readyfor
forprocessing"
processing"
HEADER
HEADER
M
M
TEXT
TEXT
99
99
O
O
9999
9999
"Successfully
"Successfullyprocessed"
processed" 16:22:42
16:22:42
24
5/27/15
1 Idoc contains
1 Control record
N Data Records
N Status Records
IDOC
Intermediate
Document
25
5/27/15
Control Record
Control Record - table EDIDC
IDoc number
Direction - inbound or outbound
IDoc type
IDoc structure type
Receiver port/partner type/partner number
Sender port/sender type/sender number
26
5/27/15
Control Record
27
5/27/15
Data Records
Data Record - structure EDIDD / table EDID4
This contains two parts
Administrative Section and Data Section
Administrative Section consists of Segment Name, Segment number, Segment
Hierarchy etc.
Data Section contains the data of respective segment
Application header information
Application line item information
Application sub-line information (schedule lines, partners, tax information, text,
etc.)
28
5/27/15
Data Record
All records in the IDoc, which come after the
control record, are the IDoc data. They are all
structured alike, with a segment information part
and a data part, which is 1000 character in length,
filling the rest of the line.
Hierarchical
structure (internal
representation as
flat structure)
29
5/27/15
Status Records
Status Records - table EDIDS
Whenever a process is taken place, system will generate status records.
We can identify the process with the number of status record.
01 - 49 for Outbound Process
50 - 75 for Inbound Process
when IDoc is processed the messages are:
01 - IDoc is created
30 - IDoc is ready for dispatch
03 - IDoc is processed
30
5/27/15
Status Record
31
5/27/15
TCODE:
SM59
32
5/27/15
PORTS
A port is a logical representation of a communication channel in SAP with the data
communicated being IDOCs.
Types of Ports:
tRFC
File
R/2
Internet
33
5/27/15
TCODE:
WE21
34
5/27/15
Partner Profiles
TCODE:
WE20
35
5/27/15
Partner Profiles-Outbound
36
5/27/15
Partner Profiles-Inbound
37
5/27/15
38
5/27/15
Distribution Model
TCODE:
BD64
39
5/27/15
FILTER OBJECT
A filter object type is used in the Customer Distribution Model to
impose a selection criterion on the message type flowing to a logical
system
A filter object type with a value associated with it is called a filter
object.
Tcode to maintain filter object for message type BD59
Tcode to find list of filter object BD95
40
5/27/15
Filtration
Only the idocs having values maintained in the Distribution model for each filter
group will be allowed to pass
Maintain filter for Sender, Receiver, Message type combination
Segment level filtration ( T-code BD56 )
Idoc level filtration ( Distribution model BD64 )
Logics for filtration :
AND logic among different filter group
OR logic within the filter group
41
5/27/15
Filter Objects
BD95
42
BD59
5/27/15
43
5/27/15
PROCESS CODES
Process Codes are used in ALE and EDI to identify the function modules to be invoked for
subsequent processing
Tcode BD67
Inbound interface uses a process code to determine the application module that will process
the inbound IDOC. Stored in table TEDE1.
Tcode WE42
Outbound interface uses process codes only in the case of applications that use message
control. Stored in table TEDE2.
Tcode WE41.
44
5/27/15
Process code FM
45
5/27/15
CHANGE POINTER
CD objects record the changes in table CDHDR & CDPOS.
Internal mechanisms update table BDCP & BDCPS / BDCP2 which host
the change pointer.
Activate change pointers for message type (Tcode BD50) or generally
(Tcode BD61).
Change Pointers are R/3 objects that mark changes to SAP Master data.
- Tcode BD52
Change Pointers are managed by mechanisms in a SMD (Shared Master
Data) tool and are based on Change Document Objects. Tcode BD60.
When data volume is high, we use table BDCP2 for change pointer. Path
to config this setting : t-code SPRO.
Path: Application server -> IDoc interface / ALE -> Modelling and
implementing business processes -> master data distribution ->
Replication of modified data -> Switch change pointer storage
46
5/27/15
Change Pointers
Application Posting
Batch Program
Master data
(RBDMIDOC)
ALE configuration
ALE relevant Fields
IDOC Module
(Masteridoc_Create_
SMD_<MSGTYPE>)
Change pointers
47
5/27/15
Change Pointers
BD61
48
BD50
5/27/15
BD52
49
BD60
5/27/15
50
BD10
BD12
BD14
5/27/15
51
5/27/15
52
5/27/15
IDoc Reduction
BD53
53
5/27/15
54
5/27/15
55
5/27/15
IDoc Display
56
5/27/15
57
5/27/15
IDoc re-proces
58
5/27/15
IDoc copy
59
5/27/15
Outbound IDoc
Inbound IDoc
Inbound IDoc
60
5/27/15
THANK YOU
61
5/27/15