Beruflich Dokumente
Kultur Dokumente
May-12
Copyright IBM Corporation 2007
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs.
May-12
May-12
EDI
The Basic EDI structure is given below
Each partner has their own internal software systems
Special EDI adapters have to be implemented which will be able to interface with the internal system as well as communicate with the value added network The particulars of the message syntax and interaction process are negotiated between partners in advance
VAN VAN
May-12
EDIFACT
EDIFACT stands for EDI For Administration, Commerce and Transportation
It has been introduced by the UN center for the facilitation of administration, commerce and transportation (UN/CEFACT) in the mid 1980s
Older European EDI standards such as TRADACOM, GENCOD, SEDAS and ODETTE have all migrated to EDIFACT EDIFACT has furthermore become an international standard as ANSI has stopped all work on X12 since 1997 and X12 systems are migrating to EDIFACT
May-12
EDIFACT Structure
EDIFACT Interchanges consist of messages which are in turn composed of data segments The segments themselves consist of data elements
Interchange
Interchange Header
Message
Message
Message
Interchange Header
Message Header
Message Header
May-12
ALE!! What is it ??
It is a set of
Tools,
May-12
Master Data
Material, Customer, Vendor, etc.
Control Data
Organizational Reference Information
Plants, Sales Orgs, etc.
May-12
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs.
May-12
Components of ALE
Services:
Application Services
Distribution Services Communication Services
Tools:
Customizing Tools Development Tools
10
May-12
Application Services
Services:
Application Services
Distribution Services Communication Services
This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents
Tools:
Customizing Tools Development Tools
11
May-12
Distribution Services
Services:
Application Services
Distribution Services Communication Services
Tools:
Customizing Tools Development Tools
Recipients Formats and Filters the data Creates IDocs ( Intermediate Documents )
12
May-12
Communication Services
Services:
Application Services
Distribution Services Communication Services
Tools:
Customizing Tools Development Tools
13
May-12
Customizing Tools
Services:
Application Services
Distribution Services Communication Services
Tools:
Customizing Tools Development Tools
Customization parameters
(within SAP for IDoc filtering and conversion)
14
May-12
Development Tools
Services:
Application Services Distribution Services Communication Services
Tools:
Customizing Tools
Development Tools
15
May-12
In a Nut Shell
Application Layer Distribution/ ALE Layer Communication Layer
Application
Master IDOC
Determine Receipients
Comm. IDOC
Carrier
Application Data
Application Functions
Filter/Convert Data
Comm. IDOC
16
May-12
Scenario analysis
How does the IDOC look like ?
17
May-12
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs.
Trouble Shooting
ALE in typical Project Scenario. Questions
18
May-12
Message Type: A message type represents the application message being exchanged
between R/3 systems and another R3/non-R3 external system. e.g.: MATMAS, INVOIC It is the representation of the data from a business perspective.
IDOC Type: An IDOC type represents the structure of the data associated with a
message type. eg: MATMAS03, INVOIC02. It gives the actual hierarchy in which business data should be arranged.
IDOC: An IDOC is an Instance of an IDOC Type, it is an object with the data of a particular message type in it. In simpler terms, each idoc (represented by an idoc number) contains the data sent by the Sender partner to the Receiver partner.
19
May-12
Idoc Documentation
WE60
20
May-12
Idoc definition
WE30
21
May-12
22
May-12
IBM Global Training Center 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)
Control Record
23
May-12
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
24
May-12
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?
25
May-12
TCODE: WE31
26
May-12
Idoc Types
TCODE: WE30
27
May-12
28
May-12
Message Types
WE81
WE82
29
May-12
30
May-12
Logical System
TCODE:
BD54
31
May-12
TCODE:
SCC4
SALE > BASIC SETTINGS > SET UP LOGICAL SYSTEM > ASSIGN LOGICAL SYSTEM TO THE CLIENT
32 Basic ALE Training material May-12
TCODE:
SM59
33
May-12
TCODE: WE21
A port is a logical representation of a communication channel in SAP with the data communicated being IDocs.
34
May-12
Partner Profiles
TCODE: WE20
35
May-12
Topics to cover
What is ALE ?
Components of ALE. Anatomy of an IDoc.
ALE Processing.
i.Outbound Processing ii.Inbound Processing
Trouble Shooting
ALE in typical Project Scenario. Questions
36
May-12
Outbound Processing
37
May-12
Outbound processing
Application posting
Need to create IDOC?
Comm. layer
Links
38
May-12
ALE layer
Customer ALE supplies APIs (function modules) to allow applications Distribution Model to query the model
-
Is anybody interested in my message type? asynch. Optional: what filter objects are they interested in? or
RFC
Links
39
May-12
Comm. layer
Segment filter Field value conversion Application document posted simultaneously with IDocs Database Version change Dispatch control
Links
40
May-12
Receiver determination
Application posting
Need to create IDOC?
Comm. layer
If the application has no specified recipients asynch. RFC ALE refers to the customer or distribution model to determine EDI them asynch. RFC Data not relevant to receiver or (according to EDI model) is removed in ALE layer.
Links
41
May-12
Segment filter
Application posting
Need to create IDOC?
Comm. layer
The filter is data-independent or IDOC segments that are not EDI required asynch. RFC can be removed The filter is message and receiveror specific EDI
asynch. RFC
Links
42
May-12
Comm. layer
The contents of individual or fields can be EDI asynch. RFC translated to new values or suppressed EDI The filter is message and receiver-specific
asynch. RFC
Links
43
May-12
Version change
Application posting
Need to create IDOC?
asynch. RFC or EDI IDOCs can be changed to older asynch. RFC versions or Systems with different release EDI
levels can communicate without additional application logic
Links
44
May-12
Make Links
Application posting
Need to create IDOC?
Comm. layer
Version change
Links
Links are written between IDOC and Application object contained in IDOC Communication-Layer's Dispatch "Transaction-ID" control C
-
45
May-12
Dispatch control
Application posting
Need to create IDOC?
Comm. layer
Receiver determination
-
Segment filter
-
asynch. RFC or EDI asynch. RFC 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
46
May-12
Partner Profiles-Outbound
47
May-12
Distribution Model
TCODE:
BD64
Required mainly for master data Filter values set up for master data outbound
48
May-12
49
May-12
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 Idoc level filtration Logics for filtration :
50
May-12
Filter Objects
BD95
BD59
51
May-12
Change Pointers
Application Posting
Post Application document Master data
Batch Program
(RBDMIDOC) Determine IDOC module Call IDOC module
Create Change Document Are changes ALE relevant ? Write Change Pointers Commit Work
ALE configuration
ALE relevant Fields
IDOC Module
(Masteridoc_Create_ SMD_<MSGTYPE>) Read Change Pointers Fill IDOC Call ALE layer Update Change Pointer
Change pointers
52
May-12
Change Pointers
BD61
BD50
53
May-12
BD52
BD60
54
May-12
BD22
BD21
Create IDOC from Change pointers based on Message Type Organize and Delete Change Pointers on a date basis
55
May-12
Master data ? Y Only send objects that have changed ? Y Change Pointer available? y Change Pointer based Program Standalone with custom logic to keep track of changes N Standalone program with user-definable selection criteria
56
May-12
IDOC module
57
May-12
58
May-12
59
May-12
NACE
60
May-12
61
May-12
62
May-12
63
May-12
64
May-12
65
May-12
66
May-12
67
May-12
68
May-12
Triggering
How is the IDOC creation kicked off ?
69
May-12
Program logic
IDOC program
ALE layer
2007 IBM Corporation
70
May-12
MASTER_IDOC_DISTRIBUTE
71
May-12
EDIDD
SDATA (1000bytes)
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
72
May-12
73
May-12
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
74
May-12
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
75
May-12
Inbound Processing
76
May-12
Inbound Processing.
Comm. layer C
ALE layer
Application posting
Version change
A
Process IDOC
Serialization
Database
77
May-12
Input Control
Comm. layer C
Version change For each message type and sender one can define Segment filter asynch.when to process 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
78
May-12
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
79
May-12
Serialization
Comm. layer 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
-
ALE layer
Application posting
A
Process IDOC
Serialization
Database
80
May-12
Partner Profiles-Inbound
81
May-12
TCODE: WE57
82
May-12
Process Codes
WE41
WE42
83
May-12
TCODE: WE64
84
May-12
85
May-12
TCODE: BD67
86
May-12
Se nde r type Se nde r no. M es s age type M es s age var. M es s age func. Fes t flag Process code
M es s age type M es s age var. M es s age func. Proce s s code Process type Error events Appl.obj.type Inbound func.
87
May-12
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc. ALE Processing Transactions For Monitoring and Processing IDocs. ALE in typical Project Scenario. Questions
88
May-12
89
May-12
idocs
90
May-12
BD87 Processing
91
May-12
From BD73 we can even process failed IDocs in status 51 in the foreground (Switch off the import checkbox!) Deletion Flag can also be set in the IDoc from BD73 if you want the failed IDOC not to be used by anyone
92 Basic ALE Training material May-12
Success 53
Errors 51 Outbound
Successfully created 30
Successfully sent out 03 Errors - 26
93
May-12
Workitem appears in user's Inbox Execute Workitem Display IDoc for user processing (IDoc method "InputForeground") Fix error and reprocess IDoc or Flag IDoc for deletion ALE triggers end ev ent
i nput Fi ni shed
Workitem completed
94
May-12
Necessary Steps:
Create new object type in Business Object Repository for IDOC; object is child of IDOCAPPL Create new customer task Create event-couplings linking Event inputErrorOccured linked to standard task
95
May-12
Error handling
Analyzing inbound idoc errors
Master data idocs
Transactional data idocs
ALE Configuration missing Other Config missing Others
96
May-12
97
May-12
98
May-12
99
May-12
100
May-12
101
May-12
102
May-12
103
May-12
104
May-12
105
May-12
106
May-12
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
107
May-12
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
108
May-12
Serialization
Sender Comm. Layer Receiver
Input from IDOC 1 must be prevented in order not to lose information from IDOC 2
2 1 !?
109
May-12
Serialization
Check, if IDOC has been overtaken
Use function module IDOC_SERIALIZATION_CHECK
react to overtaken IDOCs according to your needs
110
May-12
Mass Processing
Processing more than one IDOC can improve throughput:
more than one IDOC is processed per Commit Work
the function can be coded to add multiple entries to a table with one update command (array insert)
Function module has to be coded in a way that it supports mass processing Attribute of delivered function module specifies if mass processing is supported or not
111
May-12
Call Transaction
Pros:
Error reprocessing in foreground
Easy to program
Cons:
Call Transaction has significant performance overhead Automatic Commit work, no data consistency
Recommendation:
Try to use function modules that update database directly
If you want to use Call transaction, they have been ALE-enabled to guarantee data concistency
112
May-12
Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc. ALE Processing. Transactions For Monitoring and Processing IDocs.
113
May-12
114
May-12
Customer
850
ORDRSP
855
DESADV
856
824 810
Receive Inv
Update Status
TXTRAW
824
Inv Response
115
May-12
Picking Confirmation
SDPICK
116
May-12
Questions
117
May-12