0% found this document useful (0 votes)
235 views

IDoc's

idocs....exp

Uploaded by

shiva kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
235 views

IDoc's

idocs....exp

Uploaded by

shiva kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 61

IBM Global Training Center

Intermediate Document (IDoc)

Basic ALE Training material

5/27/15
Copyright IBM Corporation 2007

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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.

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

Filter/Convert
Filter/Convert
Data
Data

5/27/15

Comm.
IDOC

2007 IBM Corporation

IBM Global Training Center

What Data can be Exchanged ?

Transaction Data
SD, MM, FI, CO, etc.
Master Data
Material, Customer, Vendor, etc.

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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.

When the data is coming in, the process is called Inbound


Process and the IDoc is known as Inbound IDoc.

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Logical System

TCODE:
BD54

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Allocate Logical System to the client

TCODE:
SCC4

SALE > BASIC SETTINGS > SET UP


LOGICAL SYSTEM > ASSIGN LOGICAL
SYSTEM TO THE CLIENT
9

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Message Types

WE81

11

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

BASIC TYPE

An IDOC type represents the structure of the data associated with a


message type ( DEBMAS06 for message type DEBMAS ) while an IDOC
is an object containing the data of a particular message type.
It gives the actual hierarchy in which business data should be
arranged.
Tcode WE30

12

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Basic type of IDoc

WE30

13

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Types (cont)


Sample IDoc types:
Orders (ORDERS01)
Material (MATMAS05)
Customer (DEBMAS06)
Vendor (CREMAS04)
Invoice (INVOIC01)
Bill of materials (LOIBOM01)

14

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Structure of Segments
IDoc Segments
Header segments
(E1EDK . . .)

Line item segments


(E1EDP . . .)

Summary segments
(E1EDS . . .)

16

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Create Segment

TCODE:
WE31

17

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Segment, contd..

18

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Idoc Types

TCODE:
WE30

19

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

How to Attach Segments

20

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Assign Message Type with Basic type

WE82

21

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Idoc Documentation

WE60

22

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Run time IDoc Component


Intermediate Documents (IDocs) consist of three record types:
Control Record
One per IDoc
Data Record
Many per IDoc
Status Record
Several per Idoc

23

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

1 Idoc contains
1 Control record
N Data Records
N Status Records
IDOC
Intermediate
Document

25

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Control Record

The very first record of an IDoc package is


always a control record. The
structure of this control record of the
structure EDIDC and describes the
contents of the data contained in the idoc.
Control Record
contains information
about:
IDOC type (what
data is in the IDOC)
Message type (how
is the IDOC being
processed)
Sender information
(who is the sender
of that IDOC)
Receiver information
(who is the receiver
of that IDOC)
Latest status of EDI
processing.
EDI standard and
version.

27

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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)

Contains the actual


business data

29

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

IDoc identification number


Status number - table verified
IDoc type
Direction
Data and time stamp

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Status Record

Information about the IDoc status


like:
IDoc identification number
Status number - table verified
IDoc type
Direction
Data and time stamp

Idoc has been processed


yes/no?
Processing
successful/erroneous
What type of error?

31

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Maintaining RFC Destinations

TCODE:
SM59

32

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

ALE can use all port types to distribute IDOC


EDI typically uses a File-based port
TCODE -------> WE21

33

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Displaying and Maintaining Ports

TCODE:
WE21

A port is a logical representation of a


communication channel in SAP with
the data communicated being IDocs.

34

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Partner Profiles

TCODE:
WE20

35

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Partner Profiles-Outbound

36

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Partner Profiles-Inbound

37

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

CUSTOMER DISTRIBUTION MODEL


It is a tool that stores information about the flow of messages across various
systems
The model stores data that dictates which messages flow to which logical
systems
TCODE-----> BD64

38

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Distribution Model

TCODE:
BD64

Required mainly for


master data
Filter values set up for
master data outbound

39

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Filter Objects

BD95

42

Basic ALE Training material

BD59

5/27/15

2007 IBM Corporation

IBM Global Training Center

Segment level filtration

43

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Process code FM

45

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

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

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Change Pointers

Application Posting

Post Application document

Batch Program
Master data

(RBDMIDOC)

Create Change Document


Are changes ALE relevant ?
Write Change Pointers
Commit Work

Determine IDOC module


Call IDOC module

ALE configuration
ALE relevant Fields

IDOC Module
(Masteridoc_Create_
SMD_<MSGTYPE>)

Change pointers

Read Change Pointers


Fill IDOC
Call ALE layer
Update Change Pointer
ALE layer
Master_IDOC_DISTRIBUTE

47

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Change Pointers

BD61

48

Basic ALE Training material

BD50

5/27/15

2007 IBM Corporation

IBM Global Training Center

Change Pointers Continued

BD52

49

Basic ALE Training material

BD60

5/27/15

2007 IBM Corporation

IBM Global Training Center

Change Pointer, Contd

Send Material / Article :


Send Customer :
Send Vendor :

50

Basic ALE Training material

BD10
BD12
BD14

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Reduction and Extension


Maximal IDoc types for master data are supplied by SAP.
You can create your own reduced IDoc type, by selecting only those
segments and fields which are relevant to your project. ( T-code :
BD53 )
You can also create an extended IDoc type, by appending one or more
segments to an existing IDoc type. (e.g. /GLB/XGTX_YDEBMAS06)
An SAP IDoc structure can be extended by appending new subsegments with additional data.
Adding fields to original SAP segments is not allowed.
Transaction: WE30.

51

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Extensions in INBOUND and OUTBOUND transactions


To post and extract data to and from an IDoc extension, find a user exit in the
application code.
User exits are found in the function modules, which are tied to the process codes
used by ALE. (e.g. EXIT_SAPLVEDA_001/002)
The ABAP code to process an IDoc extension is added within an include
statement in the user exit (e.g. Include - ZXVEDU03, ZXVEDU04, ZXMGVU03,
Code - /AMS/OCA_CREDIT_ORDER_01/02)

52

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Reduction

BD53

53

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

ALE Configuration Technical Consistency Check


TCODE:
BDM5
Required mainly for
checking if ALE
configuration has been
correctly set up
Choose the relevant
Message Type under
Logical System you want
and double click. The
system will show all
relevant details pointing
out errors if any in the
configuration

54

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Important Transaction codes

55

Create Segment - WE31)


Create Idoc Type , Extension
- WE30)
Create Message Type - WE81
Assign Idoc Type to Message Type - WE82
Create and allocate Logical System BD54, SCC4
Define RFC Destinations SM59
Define Ports WE21
Create Partner Profiles WE20
Maintain Customer Distribution Model BD64, BD59
Change Pointer BD61, BD50, BD52, BD60
Process code WE41, WE42
IDoc display WE02, WE09
IDoc re-process BD87
IDoc Reduction BD53
IDoc copy
WE19

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Display

56

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc Display, Contd.

57

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc re-proces

58

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

IDoc copy

59

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

Document for creating IDoc


Outbound IDoc

Outbound IDoc

Inbound IDoc

Inbound IDoc

60

Basic ALE Training material

5/27/15

2007 IBM Corporation

IBM Global Training Center

THANK YOU

61

Basic ALE Training material

5/27/15

2007 IBM Corporation

You might also like