8/3/2019 ALE Basics
1/117
IBM Global Training Center
Copyright IBM Corporation 2007
Basic ALE Training material May-12
Basic ALE training Material
Application Link Enabling (ALE)
8/3/2019 ALE Basics
2/117
IBM Global Training Center
2007 IBM Corporation2 May-12Basic ALE Training material
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
8/3/2019 ALE Basics
3/117
IBM Global Training Center
2007 IBM Corporation3 May-12Basic ALE Training material
Lets Understand EDI , EDIFACT and ALE
EDI >> Electronic Data Interchange EDI defines the paradigm of exchanging data electronically more than anything else
It is easier to describe the commonly used EDI practices
The collection of these common practices amounts to what is known today as EDI
EDI can be thus described as an information sharing system
utilizing an intermediate message store-and-forward entity and
premeditated message syntax and interaction processes
which are modeled by trading partners around standard templates
8/3/2019 ALE Basics
4/117
IBM Global Training Center
2007 IBM Corporation4 May-12Basic ALE Training material
Partner B
Internal
System
EDI Software EDI Software
Partner A
Internal
SystemVAN
VAN
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 theinternal system as well as communicate with the value added network
The particulars of the message syntax and interaction process are negotiated betweenpartners in advance
Sometimes a dominant partner will impose its standards on smaller partners
8/3/2019 ALE Basics
5/117
IBM Global Training Center
2007 IBM Corporation5 May-12Basic ALE Training material
EDIFACT
EDIFACT stands for EDIFor 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 andODETTE have all migrated to EDIFACT
EDIFACT has furthermore become an international standard as ANSI hasstopped all work on X12 since 1997 and X12 systems are migrating to EDIFACT
8/3/2019 ALE Basics
6/117
IBM Global Training Center
2007 IBM Corporation6 May-12Basic ALE Training material
Interchange
Message MessageMessageInterchange
HeaderInterchange
Header
Data
Segment
Data
Segment
Data
Segment
Message
Header
Message
Header
DataElement
DataElement
DataElement
EDIFACT Structure
EDIFACT Interchanges consist of messages which are in turn composed of datasegments
The segments themselves consist of data elements
8/3/2019 ALE Basics
7/117
IBM Global Training Center
2007 IBM Corporation7 May-12Basic ALE Training material
ALE!! What is it ??
It is a set of
Tools,
programs and
data definitions
that provides the mechanism for
distributing functionality and data acrossmultiple system. Base technology is tRFC.
8/3/2019 ALE Basics
8/117
IBM Global Training Center
2007 IBM Corporation8 May-12Basic ALE Training material
What Data can be Exchanged ?
Transaction Data SD, MM, FI, CO, etc.
Master Data
Material, Customer, Vendor, etc.
Control Data
Organizational Reference Information
Plants, Sales Orgs, etc.
Data required to enable tightly coupled, distributed applications Separate HR, Separate Treasury, etc.
8/3/2019 ALE Basics
9/117
IBM Global Training Center
2007 IBM Corporation9 May-12Basic ALE Training material
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
8/3/2019 ALE Basics
10/117
IBM Global Training Center
2007 IBM Corporation10 May-12Basic ALE Training material
Components of ALE
Services: Application Services
Distribution Services
Communication Services
Tools: Customizing Tools
Development Tools
8/3/2019 ALE Basics
11/117
IBM Global Training Center
2007 IBM Corporation11 May-12Basic ALE Training material
This is where theSAP applications( SD, FI, MM etc. )
generate their dataand documents
Application Services
Services: Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
8/3/2019 ALE Basics
12/117
IBM Global Training Center
2007 IBM Corporation12 May-12Basic ALE Training material
Recipients
Formats and
Filters the data
Creates IDocs
( IntermediateDocuments )
Distribution Services
Services: Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
8/3/2019 ALE Basics
13/117
IBM Global Training Center
2007 IBM Corporation13 May-12Basic ALE Training material
TCP/IP
RFC
tRFC
etc
Communication Services
Services: Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
8/3/2019 ALE Basics
14/117
IBM Global Training Center
2007 IBM Corporation14 May-12Basic ALE Training material
Model Maintenance Tool(for configuring the flow of data
between systems)
Shared Master Data(SMD)tools
(for distributing master data)
Customization parameters(within SAP for IDoc filteringand conversion)
Customizing Tools
Services: Application Services
Distribution Services
Communication Services
Tools: Customizing Tools
Development Tools
8/3/2019 ALE Basics
15/117
IBM Global Training Center
2007 IBM Corporation15 May-12Basic ALE Training material
Services:
Application Services
Distribution Services
Communication Services
Tools:
Customizing Tools
Development Tools
Tools for creating andmodifying IDocs
Development Tools
8/3/2019 ALE Basics
16/117
IBM Global Training Center
2007 IBM Corporation16 May-12Basic ALE Training material
ApplicationData
MasterIDOC
DetermineReceipients
Filter/ConvertData, Create IDOC
Comm.IDOC
ApplicationFunctions
Filter/ConvertData Comm.IDOC
Carrier
Application Layer Distribution/ ALELayer CommunicationLayer
Application
In a Nut Shell
8/3/2019 ALE Basics
17/117
IBM Global Training Center
2007 IBM Corporation17 May-12Basic ALE Training material
How does the IDOC look like ? How is data being sent ?
How is the data being received ?
Who is sending?
To whom is it being sent?
What has been done with the idoc?
Scenario analysis
8/3/2019 ALE Basics
18/117
IBM Global Training Center
2007 IBM Corporation18 May-12Basic ALE Training material
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
Topics to cover
B G C
8/3/2019 ALE Basics
19/117
IBM Global Training Center
2007 IBM Corporation19 May-12Basic ALE Training material
Message Type:A message typerepresents the application message being exchangedbetween 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 typerepresents the structure of the data associated with amessage type. eg: MATMAS03, INVOIC02.
It gives the actual hierarchy in which business data should be arranged.
IDOC:An IDOCis an Instance of an IDOC Type, it is an object with the data of aparticular message type in it. In simpler terms, each idoc (represented by an idocnumber) contains the data sent by the Sender partner to the Receiver partner.
Message Type, IDOC Type, IDOC Definitions
IBM Gl b l T i i C
8/3/2019 ALE Basics
20/117
IBM Global Training Center
2007 IBM Corporation20 May-12Basic ALE Training material
WE60
Idoc Documentation
IBM Gl b l T i i C t
8/3/2019 ALE Basics
21/117
IBM Global Training Center
2007 IBM Corporation21 May-12Basic ALE Training material
Idoc definition
WE30
IBM Gl b l T i i C t
8/3/2019 ALE Basics
22/117
IBM Global Training Center
2007 IBM Corporation22 May-12Basic ALE Training material
1 Idoc contains1 Control recordN Data Records
N Status Records
IDOC
Intermediate
Document
IBM Global Training Center
8/3/2019 ALE Basics
23/117
IBM Global Training Center
2007 IBM Corporation23 May-12Basic ALE Training material
The very first record of an IDoc package is
always a control record. Thestructure of this control record of thestructure EDIDC and describes the
contents of the data contained in the idoc.
Control Recordcontains informationabout:
IDOC type (what
data is in the IDOC)
Message type
(how is the IDOCbeing processed)
Sender information(who is the sender
of that IDOC)
Receiverinformation (who is
the receiver of thatIDOC)
Latest status of EDIprocessing.
EDI standard andversion.
Control Record
IBM Global Training Center
8/3/2019 ALE Basics
24/117
IBM Global Training Center
2007 IBM Corporation24 May-12Basic ALE Training material
All records in the IDoc, which come after thecontrol record, are the IDoc data. They are all
structured alike, with a segment information partand a data part, which is 1000 character in length,filling the rest of the line.
Hierarchical
structure (internalrepresentation as flatstructure)
Contains the actualbusiness data
Data Record
IBM Global Training Center
8/3/2019 ALE Basics
25/117
IBM Global Training Center
2007 IBM Corporation25 May-12Basic ALE Training material
Information about the IDoc statuslike:IDoc identification numberStatus number - table verified
IDoc typeDirectionData and time stamp
Idoc has been processedyes/no?
Processingsuccessful/erroneous
What type of error?
Status Record
IBM Global Training Center
8/3/2019 ALE Basics
26/117
IBM Global Training Center
2007 IBM Corporation26 May-12Basic ALE Training material
TCODE:
WE31
IBM Global Training Center
8/3/2019 ALE Basics
27/117
IBM Global Training Center
2007 IBM Corporation27 May-12Basic ALE Training material
TCODE:
WE30
Idoc Types
IBM Global Training Center
8/3/2019 ALE Basics
28/117
IBM Global Training Center
2007 IBM Corporation28 May-12Basic ALE Training material
How to Attach Segments
IBM Global Training Center
8/3/2019 ALE Basics
29/117
IBM Global Training Center
2007 IBM Corporation29 May-12Basic ALE Training material
WE81WE82
Message Types
IBM Global Training Center
8/3/2019 ALE Basics
30/117
IBM Global Training Center
2007 IBM Corporation30 May-12Basic ALE Training material
Create and allocate Logical System BD54, SCC4
Define Ranges (Idocs, Ports, IDoc types, segment version, change pointers )
Define RFC Destinations SM59
Define Ports WE21
Maintain Customer Distribution Model BD64
Create Partner Profiles WE20
Basic Configuration Elements
IBM Global Training Center
8/3/2019 ALE Basics
31/117
IBM Global Training Center
2007 IBM Corporation31 May-12Basic ALE Training material
TCODE:
BD54
Logical System
IBM Global Training Center
8/3/2019 ALE Basics
32/117
IBM Global Training Center
2007 IBM Corporation32 May-12Basic ALE Training material
SALE > BASIC SETTINGS > SET UP
LOGICAL SYSTEM > ASSIGN LOGICAL
SYSTEM TO THE CLIENT
TCODE:
SCC4
Allocate Logical System to the client
IBM Global Training Center
8/3/2019 ALE Basics
33/117
IBM Global Training Center
2007 IBM Corporation33 May-12Basic ALE Training material
TCODE:
SM59
Maintaining RFC Destinations
IBM Global Training Center
8/3/2019 ALE Basics
34/117
IBM Global Training Center
2007 IBM Corporation34 May-12Basic ALE Training material
A port is a logical representation of acommunication channel in SAP withthe data communicated being IDocs.
TCODE:
WE21
Displaying and Maintaining Ports
IBM Global Training Center
8/3/2019 ALE Basics
35/117
g
2007 IBM Corporation35 May-12Basic ALE Training material
TCODE:
WE20
Partner Profiles
IBM Global Training Center
8/3/2019 ALE Basics
36/117
g
2007 IBM Corporation36 May-12Basic ALE Training material
What is ALE ? Components of ALE.
Anatomy of an IDoc.
ALE Processing.
i.Outbound Processing
ii.Inbound Processing
Transactions For Monitoring and Processing IDocs.
Trouble Shooting
ALE in typical Project Scenario.
Questions
Topics to cover
IBM Global Training Center
8/3/2019 ALE Basics
37/117
g
2007 IBM Corporation37 May-12Basic ALE Training material
Outbound Processing
IBM Global Training Center
8/3/2019 ALE Basics
38/117
g
2007 IBM Corporation38 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDOCs
Comm. layer
asynch. RFCor
EDI
CLinks C
Comm. layer
Outbound processing
IBM Global Training Center
8/3/2019 ALE Basics
39/117
2007 IBM Corporation39 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
Comm. layer
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
Comm. layer
C
- ALE supplies APIs (function modules) toallow applications to query the model Is anybody interested in my message type?
Optional: what filter objects are theyinterested in?
Querying the Model
IBM Global Training Center
8/3/2019 ALE Basics
40/117
2007 IBM Corporation40 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
- The application creates the IDOC
- Technically it is stored as an
internal table- Passed to ALE via an API
(function module)
LinksC
asynch. RFCor
EDI
C
Comm. layer
Handover IDoc to ALE
IBM Global Training Center
8/3/2019 ALE Basics
41/117
2007 IBM Corporation41 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
- If the application has no specifiedrecipients
ALE refers to the customerdistribution model to determinethem
Data not relevant to receiver(according to model) is removed inALE layer.
Receiver determination
IBM Global Training Center
8/3/2019 ALE Basics
42/117
2007 IBM Corporation42 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
- The filter is data-independent- IDOC segments that are not
required can be removed
- The filter is message and receiver-specific
Segment filter
IBM Global Training Center
8/3/2019 ALE Basics
43/117
2007 IBM Corporation43 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
- The contents of individualfields can be
translated to new values
suppressed
- The filter is message and
receiver-specific
Field value conversion
IBM Global Training Center
8/3/2019 ALE Basics
44/117
2007 IBM Corporation44 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
Comm. layer
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
- IDOCs can be changed to olderversions
- Systems with different releaselevels can communicatewithout additional applicationlogic
Version change
IBM Global Training Center
8/3/2019 ALE Basics
45/117
2007 IBM Corporation45 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
CCLinks
asynch. RFCor
EDI
C
Comm. layer
- Links are written between IDOC
and
Application object containedin IDOC
Communication-Layer's
"Transaction-ID"
Make Links
IBM Global Training Center
8/3/2019 ALE Basics
46/117
2007 IBM Corporation46 May-12Basic ALE Training material
Applicationposting
Need tocreate IDOC?
Create masterIDOC
CustomerDistribution Model
Receiver determination
Segment filter
Field value conversion
Version change
ALE layer
Dispatchcontrol
Database
M
Application document
posted simultaneouslywith IDocs
C
asynch. RFCor
EDI
LinksC
asynch. RFCor
EDI
C
Comm. layer
- Technical comms parameters are
defined
- EDI or aRFC (asynch. remote
function call)
- Send immediately or cumulate
and send via batch job If batch, packet size is
determined
Dispatch control
IBM Global Training Center
8/3/2019 ALE Basics
47/117
2007 IBM Corporation47 May-12Basic ALE Training material
Partner Profiles-Outbound
IBM Global Training Center
8/3/2019 ALE Basics
48/117
2007 IBM Corporation48 May-12Basic ALE Training material
TCODE:
BD64
Required mainly formaster data
Filter values set up formaster data outbound
Distribution Model
IBM Global Training Center
8/3/2019 ALE Basics
49/117
2007 IBM Corporation49 May-12Basic ALE Training material
TCODE:
BDM5
Required mainly forchecking if ALEconfiguration has beencorrectly set up
Choose the relevantMessage Type under LogicalSystem you want and doubleclick. The system will showall relevant details pointingout errors if any in theconfiguration
ALE Configuration Technical Consistency Check
IBM Global Training Center
8/3/2019 ALE Basics
50/117
2007 IBM Corporation50 May-12Basic ALE Training material
Filtration
Only the idocs having values maintained in the Distribution model for each filtergroup will be allowed to pass
Maintain filter for Sender, Receiver, Message type combination
Segment level filtration
Idoc level filtration
Logics for filtration :
AND logic among different filter groupOR logic within the filter group
IBM Global Training Center
8/3/2019 ALE Basics
51/117
2007 IBM Corporation51 May-12Basic ALE Training material
BD95BD59
Filter Objects
IBM Global Training Center
8/3/2019 ALE Basics
52/117
2007 IBM Corporation52 May-12Basic ALE Training material
Application Posting
Post Application document
Create Change Document
Are changes ALE relevant ?
Write Change Pointers
Commit Work
ALE configuration
ALE relevant Fields
Batch Program(RBDMIDOC)
IDOC Module(Masteridoc_Create_SMD_)
Read Change Pointers
Fill IDOC Call ALE layer Update Change Pointer
Master data
Change pointers
ALE layerMaster_IDOC_DISTRIBUTE
Determine IDOC module Call IDOC module
Change Pointers
IBM Global Training Center
8/3/2019 ALE Basics
53/117
2007 IBM Corporation53 May-12Basic ALE Training material
BD61BD50
Change Pointers
IBM Global Training Center
8/3/2019 ALE Basics
54/117
2007 IBM Corporation54 May-12Basic ALE Training material
BD52BD60
Change Pointers Continued
IBM Global Training Center
8/3/2019 ALE Basics
55/117
2007 IBM Corporation55 May-12Basic ALE Training material
BD21
BD22
Create IDOC from Change
pointers based on MessageType
Organize and Delete ChangePointers on a date basis
Change Pointers Continued
IBM Global Training Center
8/3/2019 ALE Basics
56/117
2007 IBM Corporation56 May-12Basic ALE Training material
Only send
objects that havechanged ?
ChangePointer
available?
Masterdata ?
Standalone withcustom logic to keep
track of changes
Change Pointerbased Program
y
N
Y
Standalone program
with user-definableselection criteria
N
Y
Sending Master Data Idocs
8/3/2019 ALE Basics
57/117
IBM Global Training Center
8/3/2019 ALE Basics
58/117
2007 IBM Corporation58 May-12Basic ALE Training material
Define change pointer creation Define which change document fields are to be logged
Change pointer activation
Activate generally
Activate per message type
Publish new function module
Link message type to function module
ALE Configuration For Change Pointers
IBM Global Training Center
8/3/2019 ALE Basics
59/117
2007 IBM Corporation59 May-12Basic ALE Training material
Ensure trans-
actionalIntegrity?
OutputDeterminat
ionavailable ?
TransactionData ?
hard coded ALElayerModification
Output determinationbased Program
y
N
Y
N
Y
User-Exitavailable?
N
Hardcoded ALE layerno Modification
Y
See Master data
Sending Transactional Data Idocs
IBM Global Training Center
8/3/2019 ALE Basics
60/117
2007 IBM Corporation60 May-12Basic ALE Training material
NACE
ALE For Transactional data ---- Output Determination
IBM Global Training Center
8/3/2019 ALE Basics
61/117
2007 IBM Corporation61 May-12Basic ALE Training material
Output Determination -- Access Sequence
IBM Global Training Center
8/3/2019 ALE Basics
62/117
2007 IBM Corporation62 May-12Basic ALE Training material
Output Determination -- Output Types
IBM Global Training Center
8/3/2019 ALE Basics
63/117
2007 IBM Corporation63 May-12Basic ALE Training material
Output Types -- Details
IBM Global Training Center
8/3/2019 ALE Basics
64/117
2007 IBM Corporation64 May-12Basic ALE Training material
Output Types -- Partner Functions
IBM Global Training Center
8/3/2019 ALE Basics
65/117
2007 IBM Corporation65 May-12Basic ALE Training material
Output Types -- Processing Routines
IBM Global Training Center
8/3/2019 ALE Basics
66/117
2007 IBM Corporation66 May-12Basic ALE Training material
Output Types -- Procedures
IBM Global Training Center
8/3/2019 ALE Basics
67/117
2007 IBM Corporation67 May-12Basic ALE Training material
Output Types -- Procedures Control
IBM Global Training Center
8/3/2019 ALE Basics
68/117
2007 IBM Corporation68 May-12Basic ALE Training material
Output Types -- Condition records
IBM Global Training Center
8/3/2019 ALE Basics
69/117
2007 IBM Corporation69 May-12Basic ALE Training material
Outbound program development
Program logic How is the IDOC being IDOC created ?
Triggering
How is the IDOC creation kicked off ?
IBM Global Training Center
8/3/2019 ALE Basics
70/117
2007 IBM Corporation70 May-12Basic ALE Training material
Select data from application tables Fill data into IDOC Pass IDOC to ALE layer (Call function MASTER_IDOC_DISTRIBUTE)
Commit Work
Receiver determination Segment filtering Version Control Dispatch Control
IDOC program
ALE layer
MASTER_IDOC_DISTRIBUTE
Program logic
IBM Global Training Center
8/3/2019 ALE Basics
71/117
2007 IBM Corporation71 May-12Basic ALE Training material
Call function MASTER_IDOC_DISTRIBUTE
Exporting
master_idoc_control: IDOC control record
Tables
communication_idoc_control: returned informationabout the distribution
master_idoc_data: IDOC data segments
MASTER_IDOC_DISTRIBUTE
IBM Global Training Center
8/3/2019 ALE Basics
72/117
2007 IBM Corporation72 May-12Basic ALE Training material
Header (55bytes) SDATA (1000bytes)
. SEGNAM .EDIDD
Z1SEGField1 Field2 Field3 Field4
10 ABC
MOVE Z1SEG to EDIDD-SEGNAMMOVE 10 to Z1SEG-FIELD1MOVE ABC to Z1SEG-FIELD2MOVE Z1SEG to EDIDD-SDATA
Filling an EDIDD structure
IBM Global Training Center
8/3/2019 ALE Basics
73/117
2007 IBM Corporation73 May-12Basic ALE Training material
Design Guidelines for creating IDOC data records:
Left-justified filing of IDOC Fields
Replacing SAP codes with ISO codes
currency keys
country keys
unit of measure
shipping instructions
Converting Currency Amounts
General Programming rules
IBM Global Training Center
8/3/2019 ALE Basics
74/117
2007 IBM Corporation74 May-12Basic ALE Training material
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 acondense
All types unequal to char, cuky, clnt, accp, numc, dats, timsor unit require a condense
Left-justified Filling
IBM Global Training Center
8/3/2019 ALE Basics
75/117
2007 IBM Corporation75 May-12Basic ALE Training material
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
Conversion of currency amounts
currency_amount_sap_to_iso
Code Conversions
IBM Global Training Center
8/3/2019 ALE Basics
76/117
2007 IBM Corporation76 May-12Basic ALE Training material
Inbound Processing
8/3/2019 ALE Basics
77/117
IBM Global Training Center
8/3/2019 ALE Basics
78/117
2007 IBM Corporation78 May-12Basic ALE Training material
Applicationposting
Field value conversion
ALE layer
Inputcontrol
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFC
orEDI
Version change
Segment filter
C
A
Post applicationdocument
Process IDOCSerialization
- For each message type and sender
one can define
when to process
(immediate/batch) whether to call application
directly or start customer
workflow
who should get work items in
case of error
- Incoming IDOC packets are passed to
application
Input Control
IBM Global Training Center
8/3/2019 ALE Basics
79/117
2007 IBM Corporation79 May-12Basic ALE Training material
Applicationposting
Field value conversion
ALE layer
Inputcontrol
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFC
orEDI
Version change
Segment filter
C
A
Post applicationdocument
Process IDOCSerialization
- Inbound IDOCs are passed to
the application via a
standardized function
interface
Application Input
IBM Global Training Center
8/3/2019 ALE Basics
80/117
2007 IBM Corporation80 May-12Basic ALE Training material
Applicationposting
Field value conversion
ALE layer
Inputcontrol
Database
A
Simultaneously updateIDOC's status
Comm. layer
asynch. RFC
orEDI
Version change
Segment filter
C
A
Post applicationdocument
Process IDOCSerialization
- When processing the
inbound IDOC, theapplication can call an ALE
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)
Serialization
IBM Global Training Center
8/3/2019 ALE Basics
81/117
2007 IBM Corporation81 May-12Basic ALE Training material
Partner Profiles-Inbound
IBM Global Training Center
8/3/2019 ALE Basics
82/117
2007 IBM Corporation82 May-12Basic ALE Training material
TCODE:
WE57
FM Assignment to Message Type and IDoc type
IBM Global Training Center
8/3/2019 ALE Basics
83/117
2007 IBM Corporation83 May-12Basic ALE Training material
WE41WE42
Process Codes
IBM Global Training Center
8/3/2019 ALE Basics
84/117
2007 IBM Corporation84 May-12Basic ALE Training material
TCODE:
WE64
Process Codes in Inbound and Outbound
IBM Global Training Center
8/3/2019 ALE Basics
85/117
2007 IBM Corporation85 May-12Basic ALE Training material
INBOUND_IDOC_PROCESS
IDOC
ALE layer
IDOC_INPUT_
Read IDOC data Post Application data Send Success info back to ALE layer
ALE configuration Partner Profiles Process Code Function module attribute Function module registry
Workflow Task
Call function
Return Variables
If ERROR, trigger
Version change Segment filter Field conversion
Inbound Program Development
IBM Global Training Center
8/3/2019 ALE Basics
86/117
2007 IBM Corporation86 May-12Basic ALE Training material
FM For Inbound EDI
TCODE:
BD67
IBM Global Training Center
8/3/2019 ALE Basics
87/117
2007 IBM Corporation87 May-12Basic ALE Training material
IDoc control
record
IDoc type
Send. partnr typeSender partner no.
Message type
Message variant
Message function
Test flag
Sender typeSender no.
Me ss age type
Me ss age var.
Me ss age func.
Fest flag
Processcode
Process typeError events
Appl.obj.type
Inbound func. Inbound func.Input type
Dialog?
Appl. obj. type
Inbound func.
Me ss age type
Me ss age var.
Me ss age func.
IDoc type
Partner
Profile
inbound
Process code
tables
(inbound)
Function
module's
attributes
ALE function
module
registry
Process code
ALE Inbound configuration
IBM Global Training Center
8/3/2019 ALE Basics
88/117
2007 IBM Corporation88 May-12Basic ALE Training material
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
IBM Global Training Center
8/3/2019 ALE Basics
89/117
2007 IBM Corporation89 May-12Basic ALE Training material
ALE Monitoring Transactions
List Of All IDocs Created - WE02/WE05
Search using idoc data content - WE09
Selection Program For Issuing Output -- WE15
Process All Selected IDocs - WE14
Process/monitor idoc BD87
IBM Global Training Center
8/3/2019 ALE Basics
90/117
2007 IBM Corporation90 May-12Basic ALE Training material
Select IDocs BD87
Select forRe-processing error/unprocessed
idocs
Status-wise number if idocs
Display Idocs
Trace Idocs
IBM Global Training Center
8/3/2019 ALE Basics
91/117
2007 IBM Corporation91 May-12Basic ALE Training material
BD87 Processing
IBM Global Training Center
8/3/2019 ALE Basics
92/117
2007 IBM Corporation92 May-12Basic ALE Training material
BD73 Start Error handling for non-posted IDocs
From BD73 we can even process failed IDocs in status51 in the foreground (Switch off the import checkbox!)
Deletion Flag can also be set in the IDoc from BD73 ifyou want the failed IDOC not to be used by anyone
IBM Global Training Center
S id
8/3/2019 ALE Basics
93/117
2007 IBM Corporation93 May-12Basic ALE Training material
Some common idoc status
Inbound :
Success 53
Errors 51
Outbound
Successfully created 30
Successfully sent out 03
Errors - 26
IBM Global Training Center
ALE h dli
8/3/2019 ALE Basics
94/117
2007 IBM Corporation94 May-12Basic ALE Training material
User action R/3 action
Execute Workitem
Fix error and reprocess IDocorFlag IDoc for deletion
Error in inbound function module
ALE triggers error ev ent
Workitem appears in user's Inbox
Display IDoc for user processing
(IDoc method "InputForeground")
ALE triggers end event
Workitem completed
input Error Occurred
input Finished
ALE error handling
IBM Global Training Center
ALE h dli
8/3/2019 ALE Basics
95/117
2007 IBM Corporation95 May-12Basic ALE Training material
Necessary Steps:
Create new object type in Business Object Repository for IDOC; object is childof IDOCAPPL
Create new customer task
Create event-couplings linking Event inputErrorOccured linked to standard task
Event inputFinished to function module
To support mass processing:
Create new object type as child of IDOCPACKET
Maintain process code to refer the above objects and events
ALE error handling
IBM Global Training Center
E h dli
8/3/2019 ALE Basics
96/117
2007 IBM Corporation96 May-12Basic ALE Training material
Analyzing inbound idoc errors
Master data idocs
Transactional data idocs
ALE Configuration missing
Other Config missing
Others
Analyzing outbound idoc errors
Error handling
IBM Global Training Center
W kfl t h dl
8/3/2019 ALE Basics
97/117
2007 IBM Corporation97 May-12Basic ALE Training material
Workflow to handle errors
Maintain organisation structure for workflow
Agent determination based on rules
Intimation sent out to the user in case of error as per settings
User clicks on the work item received in his inbox and takes action
Idoc can be edited and reprocessed (possible without workflow also)
IBM Global Training Center
Id T t T ti WE19 i ti
8/3/2019 ALE Basics
98/117
2007 IBM Corporation98 May-12Basic ALE Training material
Idoc Test Transaction WE19 various options
IBM Global Training Center
Id P i th h t t t ti WE19
8/3/2019 ALE Basics
99/117
2007 IBM Corporation99 May-12Basic ALE Training material
Idoc Processing through test transaction WE19
Processing Options
Standard Inbound
Inbound Function Module
Inbound File
Standard Outbound Processing
New idoc gets created at end
IBM Global Training Center
List Of All IDocs Created (Default Additional EDI) WE02
8/3/2019 ALE Basics
100/117
2007 IBM Corporation100 May-12Basic ALE Training material
List Of All IDocs Created. (Default, Additional, EDI)-- WE02
IBM Global Training Center
Selection Program For Issuing Output WE15
8/3/2019 ALE Basics
101/117
2007 IBM Corporation101 May-12Basic ALE Training material
Selection Program For Issuing Output -- WE15
IBM Global Training Center
Process All Selected IDocs WE14
8/3/2019 ALE Basics
102/117
2007 IBM Corporation102 May-12Basic ALE Training material
Process All Selected IDocs. WE14
IBM Global Training Center
Idoc Search For Business Contents (Database) WE09
8/3/2019 ALE Basics
103/117
2007 IBM Corporation103 May-12Basic ALE Training material
Idoc Search For Business Contents (Database). WE09
IBM Global Training Center
Status Conversion With Trfc Execution BD75
8/3/2019 ALE Basics
104/117
2007 IBM Corporation104 May-12Basic ALE Training material
Status Conversion With Trfc Execution. BD75
IBM Global Training Center
Execute Failed RFC Calls BDA1
8/3/2019 ALE Basics
105/117
2007 IBM Corporation105 May-12Basic ALE Training material
Execute Failed RFC Calls BDA1
IBM Global Training Center
Advanced Inbound Topics
8/3/2019 ALE Basics
106/117
2007 IBM Corporation106 May-12Basic ALE Training material
Advanced Inbound Topics
Data consistency
Serialization
Individual vs. mass processing
Call transaction function modules
IBM Global Training Center
Data Consistency
8/3/2019 ALE Basics
107/117
2007 IBM Corporation107 May-12Basic ALE Training material
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
IBM Global Training Center
Data Consistency
8/3/2019 ALE Basics
108/117
2007 IBM Corporation108 May-12Basic ALE Training material
Data Consistency
ALE Layer Applicationfunction module
Read IDoc(s)
Commit Work
Unlock IDoc(s) andapplication objects
Lock IDoc(s)
Write IDoc(s) statusWrite linksOptional:
Write serialization dataTrigger event(s)
Lock application objectsOptional: Serialization checkProcess IDoc data
Write application data to DB
IBM Global Training Center
Serialization
8/3/2019 ALE Basics
109/117
2007 IBM Corporation109 May-12Basic ALE Training material
Receiver
1
2
1
2
Object X,changed twice:
First IDOCovertaken
Comm. LayerSender
!?
Input from IDOC 1must be preventedin order not to lose
information fromIDOC 2
Serialization
IBM Global Training Center
Serialization
8/3/2019 ALE Basics
110/117
2007 IBM Corporation110 May-12Basic ALE Training material
Serialization
Check, if IDOC has been overtaken
Use function module IDOC_SERIALIZATION_CHECK
react to overtaken IDOCs according to your needs
Prerequisite is the definition of a serialization object
IBM Global Training Center
Mass Processing
8/3/2019 ALE Basics
111/117
2007 IBM Corporation111 May-12Basic ALE Training material
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 ornot
IBM Global Training Center
Call Transaction
8/3/2019 ALE Basics
112/117
2007 IBM Corporation112 May-12Basic ALE Training material
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 guaranteedata concistency
IBM Global Training Center
Topics to cover
8/3/2019 ALE Basics
113/117
2007 IBM Corporation113 May-12Basic ALE Training material
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
IBM Global Training Center
Some typical Scenarios
8/3/2019 ALE Basics
114/117
2007 IBM Corporation114 May-12Basic ALE Training material
Some typical Scenarios
SAP R3
Customer
MATMAS
INVOIC
ORDERS
ORDRSP
LegacySystem
M
I
D
DL
E
W
A
RE
IBM Global Training Center
Typical Business Scenario
8/3/2019 ALE Basics
115/117
2007 IBM Corporation115 May-12Basic ALE Training material
CustomerOrganization
Create SO 850
Order Resp
Create PO
855
Create Del /Goods issue
856 Receive Del
Del Resp824Del Bill Block
Receive Inv810
Inv Response824Update Status
ORDRSP
DESADV
INVOIC
ORDERS
TXTRAW
TXTRAW
Typical Business Scenario
IBM Global Training Center
Another Business Scenario Interface with WarehouseM t S t
8/3/2019 ALE Basics
116/117
2007 IBM Corporation116 May-12Basic ALE Training material
SAPR/3
Application
ExternalWarehouseManagement
SystemInventory Status Change
Production Receipts
Inventory Reconciliation
Picking Request
PICKSD
Picking Confirmation
SDPICK
WMMBXY
Management System
IBM Global Training Center
8/3/2019 ALE Basics
117/117
Questions
Top Related