Professional Documents
Culture Documents
Ale Idoc Edi 1195039813411322 3
Ale Idoc Edi 1195039813411322 3
Topics to cover
What is ALE?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Questions
ALE Terminology
ALE - Application Linking & Enabling
IDoc - Intermediate Document
EDI - Electronic Data Interchange
ALE Objective
ALE!! What is it ??
It is a set of
Tools,
programs and
data definitions
Transaction
Data
SD, MM, FI, CO, etc.
Master
Data
Material, Customer, Vendor, etc.
Control
Data
Organizational Reference Information
Plants, Sales Orgs, etc.
Data
Reliable communication
ALE Scenario
Document
EDI Subsystem
IDoc
EDI Subsystem
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Trouble Shooting
Questions
Components of ALE
Services:
Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
Application Services
Services:
Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
Distribution Services
Services:
Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
Recipients
Formats and
Filters the data
Creates IDocs
( Intermediate
Documents
Communication Services
Services:
Application Services
Distribution Services
Communication Services
TCP/IP
RFC
Tools:
Customizing Tools
Development Tools
tRFC
etc
Development Tools
Services:
Application Services
Distribution Services
Communication Services
Customization parameters
filtering and
Tools:
Customizing Tools
Development Tools
Customizing Tools
Services:
Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
In a Nut Shell
Application
Layer
Application
Application
Master
IDOC
Distribution/ALE
Layer
Determine
Determine
Receipients
Receipients
Filter/Convert
Filter/Convert
Data,
Data, Create
Create IDOC
IDOC
Communication
Layer
Comm.
IDOC
Carrier
Carrier
Application
Data
Application
Application
Functions
Functions
Filter/Convert
Filter/Convert
Data
Data
Comm.
IDOC
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Trouble Shooting
Questions
IDoc Concept
System 1
SAP
Document
R/3 System
System 2
IDoc
EDI subsystem
R/3 System
R/2 System
3rd party software
IDoc Structure
Control Record
IDoc-ID
Sender-ID
Receiver-ID
IDoc type and logical message
External structure
Data Record
IDoc-ID
Sequence/Hierarchy
Format definition for
Segment
header data
item data
Status Record
IDoc-ID
Status information
Control record
Data Record
Status Record
IDOC
Intermediate
Document
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 package. The control record goes to
table EDIDC
Message Type
Message Type indicates How to Know what the data Means
Data Exchanged by IDOC and EDI is known as Messages
Message of same kind belong to the same message type
Message types are stored in table EDMSG
Data Record
Status Record
Status of IDOC
A two-digit status is assigned to an IDoc to allow the processing to
be monitored.
The statuses for outbound IDocs are between '01' and '49', while the
statuses for inbound IDocs begin with '50'.
Status confirmation when using port type 'File':
The external system writes the status records in a status file, which is
read by the R/3 System. In this case, the confirmation always refers to
outbound IDocs.
Status confirmation using IDoc type SYSTAT01:
The system sending the confirmation writes the status records as data
records of IDoc type SYSTAT01. All port types and both directions can
be entered.
Idoc Segments
TCODE:
WE31
Idoc Types
TCODE:
WE30
Message Types
WE81
WE82
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing.
i.Outbound Processing
ii.Inbound Processing
Outbound Processing
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
asynch. RFC
or
EDI
Receiver determination
Segment filter
Field value conversion
Application document
posted simultaneously
with IDOCs
Database
Version change
Links
Dispatch
control
ALE layer
Need to
create IDOC?
Customer
ALE
supplies APIs (function modules) to
Distribution
Model to query the model
allow applications
-
Create master
IDOC
Comm. layer
Comm. layer
Receiver determination
RFC
EDI RFC
asynch.
or
EDI
Segment filter
Field value conversion
Application document
posted simultaneously
with IDocs
Database
Version change
Links
Dispatch
control
ALE layer
Need to
create IDOC?
Comm. layer
Customer
Distribution
Model creates the IDOC
- The application
Technically it is stored as an
internal table
- Passed
Receiver
determination
to ALE via an API
(function module)
Segment filter
-
Create master
IDOC
asynch. RFC
or
EDI
Version change
Links
Dispatch
control
Receiver determination
Application
posting
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
Receiver determination
Segment filter
Field value conversion
Application document
posted simultaneously
with IDocs
Database
Version change
Links
Dispatch
control
Segment filter
Application
posting
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
-
Receiver determination
Segment filter
asynch. RFC
Version change
Links
Dispatch
control
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
-
Receiver determination
Segment filter
Field value conversion
Application document
posted simultaneously
with IDocs
Database
asynch. RFC
Version change
Links
Dispatch
control
Version change
Application
posting
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Comm. layer
Customer
Distribution Model
Receiver determination
Segment filter
Version change
Links
Dispatch
control
asynch. RFC
or
EDI RFCto older
asynch.
IDOCs can
be changed
versions
or
Systems with different
release
EDI
levels can communicate
without additional application
logic
Make Links
Application
posting
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
asynch. RFC
or
EDI
Receiver determination
Segment filter
Version change
Links
Dispatch control
Application
posting
ALE layer
Need to
create IDOC?
Create master
IDOC
Comm. layer
Customer
Distribution Model
Receiver determination
-
Segment filter
-
Version change
Links
Dispatch
control
asynch. RFC
or
EDI RFC
asynch.
Technical comms parameters are
or
defined
EDI or aRFCEDI
(asynch. remote
function call)
Send immediately or cumulate
and send via batch job
If batch, packet size is
determined
Scenario analysis
Program logic
How is the IDOC being created ?
Triggering
How is the IDOC creation kicked off ?
Program logic
IDOC program
Select data from application tables
Fill data into IDOC
Pass IDOC to ALE layer
(Call function MASTER_IDOC_DISTRIBUTE)
Commit Work
MASTER_IDOC_DISTRIBUTE
Receiver determination
Segment filtering
Version Control
Dispatch Control
ALE layer
MASTER_IDOC_DISTRIBUTE
Exporting
master_idoc_control:
Tables
communication_idoc_control:
returned information
about the distribution
master_idoc_data:
EDIDD
Z1SEG
Header (55bytes)
. SEGNAM .
Field1
Field2
10
ABC
SDATA (1000bytes)
Field3
Field4
currency keys
country keys
unit of measure
shipping instructions
Left-justified Filling
All fields must be left-justified
Character fields:
automatic
Non-character fields:
Code Conversions
Replacing SAP codes with ISO codes
Currency keys:
currency_code_sap_to_iso
Country keys:
country_code_sap_to_iso
Units of measure:
unit_of_measure_sap_to_iso
Shipping instructions: sap_iso_package_type_code
Logical System
TCODE:
BD54; Stored in
table T000
TCODE:
SCC4
Number Ranges
TCODE:
SM59
TCODE:
WE21
Partner Profiles
TCODE:
WE20
Partner Profiles-Outbound
Partner Profiles-Inbound
Distribution Model
TCODE:
BD64
Transfer of data
Transfer master data for material, customer, vendor to different client or
system with BALE
Filter Objects
BD95
BD59
Standalone program
with user-definable
selection criteria
Y
Change
Pointer
available?
Standalone with
custom logic to keep
track of changes
y
Change Pointer
based Program
Transaction
Data ?
Y
Ensure transactional
Integrity?
N
See Master data
Y
Output
Determinat
ion
available ?
y
Output determination
based Program
User-Exit
available?
Y
Hardcoded ALE layer
no Modification
Change Pointers
Application Posting
Post Application document
Batch Program
Master data
(RBDMIDOC)
ALE configuration
ALE relevant Fields
IDOC Module
(Masteridoc_Create_
SMD_<MSGTYPE>)
Change pointers
Change Pointers
BD61
BD50
BD52
BD60
IDOC module
IDOC module has to be implemented as function module
Naming Convention: MASTERIDOC_CREATE_SMD_<msgtype>
Function module reads change pointers information to get data that
needs to go into IDOC
Function module logic:
Commit Work
Activate generally
NACE
Inbound Processing
Inbound Processing.
Comm. layer
ALE layer
Application
posting
C
Version change
asynch. RFC
or
EDI
Segment filter
Field value conversion
Input
control
Serialization
A
Process IDOC
Simultaneously update
IDOC's status
Database
Post application
document
Input Control
Comm. layer
ALE layer
Application
posting
C
Version change
For each message type and sender
one can define
Segment filter
when
asynch.
RFCto process
or(immediate/batch)
whether to call application Field value conversion
EDIdirectly or start customer
workflow
Input
who should get work items in
control
case of error
Incoming IDOC packets are passed to
A
application
Serialization
-
A
Process IDOC
Simultaneously update
IDOC's status
Database
Post application
document
Application Input
Comm. layer
ALE layer
Application
posting
C
Version change
Segment filter
asynch. RFC
or
EDI
Input
Inbound IDOCs are passed
to
control
the application via a
standardized function
A
Serialization
interface
A
Process IDOC
Simultaneously update
IDOC's status
Database
Post application
document
Serialization
Comm. layer
ALE layer
Application
posting
C
Version change
-
Segment filter
asynch. RFC
inbound IDOC, the
or
application
can call an ALE Field value conversion
EDI
API (function module) to
check that the IDOC has not
been overtaken
If change No. 1 arrives
after change No. 2, the
IDOC containing it has
been overtaken (by the
IDOC containing the
later change)
Input
control
Serialization
A
Process IDOC
Simultaneously update
IDOC's status
Database
Post application
document
TCODE:
WE57
Process Codes
WE41
WE42
TCODE:
WE64
TCODE:
BD67
Version change
Segment filter
Field conversion
Call function
Return Variables
ALE configuration
Partner Profiles
Process Code
Function module attribute
Function module registry
IDOC_INPUT_<MSGTYPE>
Read IDOC data
Post Application data
Send Success info back to ALE layer
If ERROR, trigger
Workflow Task
ALE layer
R/3 action
Workitem completed
Necessary Steps:
Data consistency
Serialization
Data Consistency
Problem:
Ensure transactional integrity
Dont process and IDOC twice
Allow for IDOC reprocessing after rollback of
application document posting
Solution:
Application document must be posted in the same
LUW as the IDOC status records
IDOC function module must not use a Commit Work
Data Consistency
ALE Layer
Application
function module
Lock IDoc(s)
Read IDoc(s)
Lock application objects
Optional: Serialization check
Process IDoc data
Write application data to DB
Write IDoc(s) status
Write links
Optional:
Write serialization data
Trigger event(s)
Commit Work
Serialization
Sender
Object X,
changed twice:
Comm. Layer
First IDOC
overtaken
Receiver
2
1
!?
!?
Serialization
Check, if IDOC has been overtaken
Mass Processing
Processing more than one IDOC can improve
throughput:
Call Transaction
Pros:
Easy to program
Cons:
Recommendation:
If you want to use Call transaction, they have been ALEenabled to guarantee data concistency
Copyright IBM Corporation 2006
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Questions
Monitoring IDocs
The IDoc interface offers 2 different approaches for tracking of data
load and data flow:
Reports for monitoring
Workflow for notifications
Questions