Ale Idoc
Ale Idoc
Ale Idoc
10/30/2013
Overview of ALE/IDOCs
EDI
10/30/2013
Overview of ALE/IDOCs
What is EDI?
EDI is electronic exchange of business documents between the computer systems of business partner using a standard format over a communication network EDI is also called a paperless exchange.
10/30/2013
Overview of ALE/IDOCs
10/30/2013
Overview of ALE/IDOCs
Outbound Process
10/30/2013
Overview of ALE/IDOCs
Inbound Process
10/30/2013
Overview of ALE/IDOCs
EDI Configuration
How to Set Up an RFC Destination in SAP The Port Definitions Configure Partner Profile Configure Message Control
10/30/2013
Overview of ALE/IDOCs
10/30/2013
Overview of ALE/IDOCs
ALE
What is ALE? Components of ALE. Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs. Questions
10/30/2013
Overview of ALE/IDOCs
ALE Terminology
ALE - Application Linking & Enabling IDoc - Intermediate Document EDI - Electronic Data Interchange
10/30/2013
Overview of ALE/IDOCs
10
ALE Objective
10/30/2013
Overview of ALE/IDOCs
11
ALE!! What is it ??
It is a set of
Tools, programs and data definitions
Provides distribution model and technology that enables SAP Customer to interconnect programs across various platforms and systems.
10/30/2013
Overview of ALE/IDOCs
12
Reliable communication Data is exchanged using IDocs Support both R/2, R/3 and External system If network problem, message is buffered
ALE
ALE
10/30/2013
ALE Scenario
Document
IDoc
EDI Subsystem
EDI Subsystem
14
10/30/2013
Overview of ALE/IDOCs
Topics to cover
What is ALE ? Components of ALE. Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs. Trouble Shooting Questions
10/30/2013
Overview of ALE/IDOCs
15
Components of ALE
Services:
Application Services Distribution Services Communication Services
10/30/2013
Overview of ALE/IDOCs
16
Application Services
Services: Application Services Distribution Services Communication Services
This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents
10/30/2013
Overview of ALE/IDOCs
17
Distribution Services
Services: Application Services Distribution Services Communication Services
Recipients Formats and Filters the data Creates IDocs ( Intermediate Documents
10/30/2013
Overview of ALE/IDOCs
18
Communication Services
Services: Application Services Distribution Services Communication Services
TCP/IP RFC
tRFC
etc
10/30/2013
Overview of ALE/IDOCs
19
In a Nut Shell
Application Layer
Master IDOC
Communication Layer
Application
Determine Receipients
Comm. IDOC
Carrier
Application Data
Application Functions
Filter/Convert Data
Comm. IDOC
10/30/2013
Overview of ALE/IDOCs
20
Topics to cover
What is ALE ? Components of ALE. Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs. Trouble Shooting Questions
10/30/2013
Overview of ALE/IDOCs
21
IDoc Concept
System 1
SAP Document
System 2 IDoc
R/3 System
10/30/2013
Overview of ALE/IDOCs
IDoc Structure
Control Record
IDoc-ID Sender-ID Receiver-ID IDoc type and logical message External structure
Data Record
Status Record
10/30/2013
Overview of ALE/IDOCs
23
10/30/2013
Overview of ALE/IDOCs
24
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
10/30/2013
Overview of ALE/IDOCs
25
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
10/30/2013
Overview of ALE/IDOCs
26
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. Data & Segment info is stored in EDID4 for release 4.x and EDID3 for release 2.x and 3.x.
10/30/2013
Overview of ALE/IDOCs
27
Status Record
Information about the IDoc status like: IDoc identification number Status number - table verified IDoc type Direction Data and time stamp; Structure: EDIDS
10/30/2013
Overview of ALE/IDOCs
28
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'.
10/30/2013
Overview of ALE/IDOCs
29
Idoc Segments
TCODE: WE31
10/30/2013
Overview of ALE/IDOCs
30
Idoc Types
TCODE: WE30
10/30/2013
Overview of ALE/IDOCs
31
10/30/2013
Overview of ALE/IDOCs
32
Message Types
WE81
WE82
10/30/2013
Overview of ALE/IDOCs
33
10/30/2013
Overview of ALE/IDOCs
34
Topics to cover
What is ALE ? Components of ALE. Anatomy of an IDoc. ALE Processing.
i.Outbound Processing ii.Inbound Processing
10/30/2013
Overview of ALE/IDOCs
35
Outbound Processing
10/30/2013
Overview of ALE/IDOCs
36
Comm. layer
Links
10/30/2013
Overview of ALE/IDOCs
37
Dispatch control
Application posting
Need to create IDOC?
Comm. layer
Receiver determination
-
Segment filter
-
asynch. RFC or EDI RFC asynch. Technical comms parameters are or defined EDI EDI or aRFC (asynch. remote
function call) Send immediately or cumulate and send via batch job If batch, packet size is determined
Field value conversion Application document posted simultaneously with IDocs Database
-
Links
10/30/2013
Overview of ALE/IDOCs
38
Scenario analysis
How does the IDOC look like ?
How is data being sent ? How is the data being received ?
10/30/2013
Overview of ALE/IDOCs
39
10/30/2013
Overview of ALE/IDOCs
40
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
10/30/2013
Overview of ALE/IDOCs
41
MASTER_IDOC_DISTRIBUTE
Call function MASTER_IDOC_DISTRIBUTE
Exporting
master_idoc_control:
Tables
communication_idoc_control:
master_idoc_data:
10/30/2013
Overview of ALE/IDOCs
42
Z1SEG
Field1 10
Field2 ABC
Field3
Field4
MOVE Z1SEG to EDIDD-SEGNAM MOVE 10 to Z1SEG-FIELD1 MOVE ABC to Z1SEG-FIELD2 MOVE Z1SEG to EDIDD-SDATA
10/30/2013
Overview of ALE/IDOCs
43
currency keys
country keys unit of measure shipping instructions
10/30/2013
Overview of ALE/IDOCs
44
Left-justified Filling
All fields must be left-justified
Character fields:
automatic
Non-character fields:
Condense statement must be used Check IDOC documentation to find out which fields require a condense All types unequal to char, cuky, clnt, accp, numc, dats, tims or unit require a condense
10/30/2013
Overview of ALE/IDOCs
45
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
10/30/2013
Overview of ALE/IDOCs
46
10/30/2013
Overview of ALE/IDOCs
47
SM59
10/30/2013
Overview of ALE/IDOCs
48
TCODE: WE21
A port is a logical representation of a communication channel in SAP with the data communicated being IDocs.
10/30/2013
Overview of ALE/IDOCs
49
Partner Profiles
TCODE: WE20
10/30/2013
Overview of ALE/IDOCs
50
Partner Profiles-Inbound
10/30/2013
Overview of ALE/IDOCs
51
Partner Profiles-Outbound
10/30/2013
Overview of ALE/IDOCs
52
NACE
10/30/2013
Overview of ALE/IDOCs
53
10/30/2013
Overview of ALE/IDOCs
54
10/30/2013
Overview of ALE/IDOCs
55
Inbound Processing
10/30/2013
Overview of ALE/IDOCs
56
Inbound Processing.
Comm. layer C
Version change
ALE layer
Application posting
A
Process IDOC
Serialization
Database
10/30/2013
Overview of ALE/IDOCs
57
Input Control
Comm. layer C
Version change For each message type and sender one can define Segment filter when to process asynch. RFC (immediate/batch) or whether to call application Field value conversion EDI directly or start customer workflow Input who should get work items in control case of error Incoming IDOC packets are passed to A application Serialization
-
ALE layer
Application posting
A
Process IDOC
Database
10/30/2013
Overview of ALE/IDOCs
58
Application Input
Comm. layer C
Version change
ALE layer
Application posting
Segment filter Field value conversion Input Inbound IDOCs are passed to control the application via a standardized function A Serialization interface
A
Process IDOC
Database
10/30/2013
Overview of ALE/IDOCs
59
Serialization
Comm. layer C
Version change Segment filter asynch. RFC inbound IDOC, the or application can call an ALE Field value conversion EDI(function module) to API 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
-
ALE layer
Application posting
A
Process IDOC
Serialization
Database
10/30/2013
Overview of ALE/IDOCs
60
TCODE: WE57
10/30/2013
Overview of ALE/IDOCs
61
Process Codes
WE41
WE42
10/30/2013
Overview of ALE/IDOCs
62
TCODE: WE64
10/30/2013
Overview of ALE/IDOCs
63
TCODE: BD67
10/30/2013
Overview of ALE/IDOCs
64
10/30/2013
Overview of ALE/IDOCs
65
Basic Scenario
10/30/2013
Overview of ALE/IDOCs
66
Advanced Scenario
10/30/2013
Overview of ALE/IDOCs
67
Flow Of Program
10/30/2013
Overview of ALE/IDOCs
68
Interface of Inbound FM
Overview of ALE/IDOCs
69
Topics to cover
What is ALE ? Components of ALE. Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs. Questions
10/30/2013
Overview of ALE/IDOCs
70
Monitoring IDocs
The IDoc interface offers 2 different approaches for tracking of data
load and data flow: Reports for monitoring
10/30/2013
Overview of ALE/IDOCs
71
10/30/2013
Overview of ALE/IDOCs
72
10/30/2013
Overview of ALE/IDOCs
73
10/30/2013
Overview of ALE/IDOCs
74
10/30/2013
Overview of ALE/IDOCs
75
Questions
10/30/2013
Overview of ALE/IDOCs
76