EDIIDOC
EDIIDOC
What is EDI, ALE ? Components of ALE, EDI. IDOCS - Introduction, Applications, Structure ALE Processing Transactions For Testing, Monitoring Interface and Processing IDOCS. ALE in typical Project Scenario. Questions
Slide 1
| 6/3/2013
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
Slide 2
| 6/3/2013
EDI Basics
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 Sometimes a dominant partner will impose its standards on smaller partners
Slide 3
| 6/3/2013
Document
Company A
Company B
R/3 System
R/3 System
IDOC
EDI Subsystem
VAN
EDI Subsystem
Slide 4
| 6/3/2013
EDIFACT
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
Slide 5
| 6/3/2013
EDIFACT Structure
EDIFACT Interchanges consist of messages which are in turn composed of data segments The segments themselves consist of data elements
Interchange
Ichange Header
Message
Data Segment
Data Element
Message
Data Segment
Data Element
Message
Data Segment
Data Element
Ichange Header
Message Header
Message Header
Slide 6
| 6/3/2013
Subsystems
Mercator Gentran
Responsibilities
Partner Profiles Addresses Translator Message Handling Communication Archiving Monitoring
Slide 7
| 6/3/2013
ALE!! What is it ??
It is a set of
Tools, programs and data definitions
that provides the mechanism for distributing functionality and data across multiple system.
Slide 8
| 6/3/2013
Transaction
Data SD, MM, FI, CO, etc. Data Material, Customer, Vendor, etc. Data Organizational Reference Information Plants, Sales Orgs, etc.
Master
Control
Data
required to enable tightly coupled, distributed applications Separate HR, Separate Treasury, etc.
Slide 9
| 6/3/2013
Topics to cover
What is EDI, ALE ? Components of ALE,EDI. IDOCS - Introduction, Applications, Structure. ALE Processing Transactions For Testing, Monitoring Interface and Processing IDOCS. ALE in typical Project Scenario. Questions
Slide 10
| 6/3/2013
Components of ALE
Services: Application Services Distribution Services Communication Services
Development Tools
Slide 11
| 6/3/2013
Application Services
This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents
Development Tools
Slide 12
| 6/3/2013
Distribution Services
Development Tools
Recipients Formats and Filters the data Creates IDocs ( Intermediate Documents
Slide 13
| 6/3/2013
Communication Services
TCP/IP RFC
tRFC
etc
Development Tools
Slide 14
| 6/3/2013
Development Tools
Development Tools
Slide 15
| 6/3/2013
Customizing Tools
Development Tools
Slide 16
| 6/3/2013
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
Slide 17
| 6/3/2013
IDOC Applications
EDI Message
R/3 System
ALE
Workflow
Electronic Form
IDOC
Form Feed Flows ICR/ OCR Document Legacy R/2 System
WWW Message
Slide 18
| 6/3/2013
IDOC Type: An IDOC type represents the structure of the data associated with a message
type. eg: MATMAS03, INVOIC02.
IDOC: An IDOC is an Instance of an IDOC Type, it is an object with the data of a particular
message type in it.
Slide 19
| 6/3/2013
IDOC - Structure
Control record
Data records
Control area Application data
Status records
Slide 20
| 6/3/2013
E1HDDOC
M 1
E1TLSUM
C 2
E1HDADR
C 5
E1ITDOC
M 1
E1ITSCH
Tree of Segments
Slide 21 | 6/3/2013
99
Slide 22
| 6/3/2013
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.
Slide 23
| 6/3/2013
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.
Slide 24
| 6/3/2013
Status Record
Information about the IDoc status like: IDoc identification number Status number - table verified IDoc type Direction Data and time stamp
Slide 25
| 6/3/2013
Customer
850
ORDRSP
855
DESADV
856
824 810
Receive Inv
Update Status
TXTRAW
824
Inv Response
Slide 26
| 6/3/2013
Picking Confirmation
SDPICK
Slide 27
| 6/3/2013
Topics to cover
What is EDI, ALE ? Components of ALE, EDI. IDOCS - Introduction, Applications, Structure . ALE Processing.
i.Outbound Processing ii.Inbound Processing
Transactions For Testing, Monitoring Interface and Processing IDOCS. ALE in typical Project Scenario. Questions
Slide 28
| 6/3/2013
Outbound Processing
Slide 29
| 6/3/2013
Outbound Processing
Slide 30
| 6/3/2013
Message Control
Printed Document
EDI IDOC
ALE IDOC
Fax
Slide 31
| 6/3/2013
SAP Application
document
find
message control
edit
process
NAST record
Slide 32
| 6/3/2013
message control
SAP application
edit
application data
message finding
NAST record
message proposal
Condition elements
SAP application
1:n
procedure
m:n
condition type
n:1
access sequence
m:n
access to table
Slide 34
| 6/3/2013
message processing
Check NAST Record Read Partner Profile Call Selection Module (by Application) Call ALE Services Transfer according to OUTMOD
TNAPR
R S N A S T E D
'3'/ '4'
'1'/ '2'
Single IDoc
Slide 35 | 6/3/2013
SAP Application
Master-IDoc
Temporary Document
Outbound processing
Application posting
Need to create IDOC?
Comm. layer
Links
Slide 37
| 6/3/2013
Application posting
Need to create IDOC?
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
Slide 38
| 6/3/2013
Application posting
Need to create IDOC?
Comm. layer
Segment filter Field value conversion Application document posted simultaneously with IDocs Database Version change Dispatch control
Links
Slide 39
| 6/3/2013
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 to determine distribution model EDI RFC them asynch. Data not relevant or to receiver (according to model) is removed EDI in ALE layer.
Links
Slide 40
| 6/3/2013
Segment filter
Application posting
Need to create IDOC?
Comm. layer
The filter is data-independent or IDOC segments that are not EDI RFC required asynch. can be removed The filter is message and receiveror specific EDI
asynch. RFC
Links
Slide 41
| 6/3/2013
Application posting
Need to create IDOC?
Comm. layer
The contents of individual or fields can be EDI RFC asynch. translated to new values or suppressed EDI The filter is message and receiver-specific
asynch. RFC
Links
Slide 42
| 6/3/2013
Version change
Application posting
Need to create IDOC?
asynch. RFC or EDI RFCto older IDOCs can be changed asynch. versions or Systems with different release EDI
levels can communicate without additional application logic
Links
Slide 43
| 6/3/2013
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
-
Slide 44
| 6/3/2013
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
Slide 45
| 6/3/2013
Inbound Processing
Slide 46
| 6/3/2013
SAP Application
Inbound Processing.
Comm. layer C
ALE layer
Application posting
Version change
A
Process IDOC
Serialization
Database
Slide 48
| 6/3/2013
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
Slide 49
| 6/3/2013
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
Slide 50
| 6/3/2013
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
Slide 51
| 6/3/2013
Slide 52
| 6/3/2013
Logical System
TCODE:
BD54
Slide 53
| 6/3/2013
TCODE:
SCC4
SALE > BASIC SETTINGS > SET UP LOGICAL SYSTEM > ASSIGN LOGICAL SYSTEM TO THE CLIENT
Slide 54 | 6/3/2013
Number Ranges
Maintain number ranges for ports Maintain number ranges for IDocs Maintain number ranges for IDoc types and segment version Maintain number range for change pointers
Slide 55
| 6/3/2013
TCODE:
SM59
Slide 56
| 6/3/2013
TCODE: WE21
A port is a logical representation of a communication channel in SAP with the data communicated being IDocs.
Slide 57
| 6/3/2013
Partner Profiles
TCODE: WE20
Slide 58
| 6/3/2013
Partner Profiles-Outbound
Slide 59
| 6/3/2013
Partner Profiles-Inbound
Slide 60
| 6/3/2013
Distribution Model
TCODE: BD64
Slide 61
| 6/3/2013
Filter Objects
BD95
BD59
Slide 62
| 6/3/2013
Scenario analysis
Slide 63
| 6/3/2013
Idoc Segments
TCODE: WE31
Slide 64
| 6/3/2013
Idoc Types
TCODE: WE30
Slide 65
| 6/3/2013
Message Types
WE81
WE82
Slide 66
| 6/3/2013
TCODE: WE57
Slide 67
| 6/3/2013
Process Codes
WE41
WE42
Slide 68
| 6/3/2013
TCODE: WE64
Slide 69
| 6/3/2013
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
Slide 70
| 6/3/2013
Transaction Data ? Y Ensure transactional Integrity? Y Output Determinat ion available ? y Output determination based Program User-Exit available? N N See Master data
Slide 71
| 6/3/2013
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
Read Change Pointers Fill IDOC Call ALE layer Update Change Pointer
Change pointers
ALE layer
Slide 72
| 6/3/2013
Change Pointers
BD61
BD50
Slide 73
| 6/3/2013
BD52
BD60
Slide 74
| 6/3/2013
Slide 75
| 6/3/2013
TCODE: BD67
Slide 76
| 6/3/2013
Sender type Sender no. Message type Message var. Message func. Fest flag Process code
Message type Message var. Message func. Process code Process type Error events Appl.obj.type Inbound func.
Slide 77
| 6/3/2013
Topics to cover
What is EDI, ALE ? Components of ALE, EDI. IDOCS - Introduction, Applications, Structure. ALE Processing. Transactions For Testing, Monitoring Interface and Processing IDocs. ALE in typical Project Scenario. Questions
Slide 78
| 6/3/2013
Application NAST
WE15
IDOC Interface
WE14, WE19
Application Workflow
WE19
IDoc Interface
WE16
WE12
File System
Slide 80 | 6/3/2013
Application
Workflow
IDoc Interface
WE17
Status report
File System
Slide 81 | 6/3/2013
Application
NAST
WE15
Workflow
WE19
IDoc Interface
WE14, WE19 WE16 WE17
Outbound IDoc-File
WE12
Inbound IDoc-File
Statusreport
File system
Slide 82
| 6/3/2013
: WE16 (Inbound),
WE17 (inbound status report), WE19 (outbound, set Port accordingly)
Read NAST record Transfer from interface to further inbound processing Transfer to IDoc interface Transfer to arbitrary port (outbound)
: WE15 : WE19 (direct function module call) : WE19 (outbound and standard inbound) : WE19
Slide 83
| 6/3/2013
Slide 84
| 6/3/2013
Slide 85
| 6/3/2013
Slide 86
| 6/3/2013
Slide 87
| 6/3/2013
Slide 88
| 6/3/2013
Slide 89
| 6/3/2013
Slide 90
| 6/3/2013
Slide 91
| 6/3/2013
Slide 92
| 6/3/2013
User action
R/3 action
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
Slide 93
| 6/3/2013
Topics to cover
What is EDI, ALE ? Components of ALE, EDI. IDOCS - Introduction, Applications, Structure. ALE Processing. Transactions For Testing, Monitoring Interface and Processing IDOCS. ALE in typical Project Scenario. Questions.
Slide 94
| 6/3/2013
Steps Involved:
1. 2. 3. 4. 5. 6. 7. 8. 9. Define Logical Systems [ SALE ]. Assign Client to Logical System [ SALE ]. Create RFC Destination [ SM59 ]. Create Port [ WE21 ]. Maintain the Distribution Model [ BD64 ]. Create Partner Profiles [ WE20 ] or Generate them from distribution model [ BD82 ]. Distribute the Distribution Model [ BD64 ]. Ensure that Logical Systems, partner profiles are generated in the receiver too. (Configured when you distribute a distribution model) In the outbound parameters for sender partner profiles add the message type SYNCH and IDOC type SYNCHRON along with the material master message type and IDOC types: MATMAS and MATMAS03 respectively. Execute the process [ BD10 ].
10.
Slide 95
| 6/3/2013
Slide 96
| 6/3/2013
Steps Involved:
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Define Logical Systems [ SALE ]. Assign Client to Logical System [ SALE ]. Create RFC Destination [ SM59 ]. Create Port [ WE21 ]. Create Partner Profiles [ WE20 ]. Enable Change Pointers globally [ BD61 ]. Enable Change Pointers for a Message Type [ BD50 ]. Specify the fields for which Change Pointers are to be written [ BD52 ]. Changing the field in Master Data [ MM02 ]. Execute the program RBDMIDOC to process the change pointers [ SE38 ].
Slide 97
| 6/3/2013
Steps Involved:
1. 2. 3. 4. 5. 6. 7. 8. Define Logical Systems [ SALE ]. Assign Client to Logical System [ SALE ]. Create RFC Destination [ SM59 ]. Create Port [ WE21 ]. Maintain the Distribution Model [ BD64 ]. Create Partner Profiles [ WE20 ] or Generate them from distribution model [ BD82 ]. Distribute the Distribution Model [ BD64 ]. Ensure that Logical Systems, partner profiles are generated in the receiver too. (Configured when you distribute a distribution model)
Slide 98
| 6/3/2013
9.
OUTPUT DETERMINATION: a) Maintain condition table for PO: SPRO -> Materials Management -> Purchasing -> Message Determination -> Message Determination -> Condition Table for Messages -> Define condition table for purchase order -> Messages: Display Condition Table: b) Define Access sequence: SPRO -> Materials Management -> Purchasing -> Message Determination -> Message Determination -> Access Sequences -> Define Access sequence for purchase order. c) Configuring the output type: SPRO -> Materials Management -> Purchasing -> Message Determination -> Message Determination -> Message Types -> Define message types for purchase order -> Maintain output types: Purchase order
Slide 99
| 6/3/2013
d)
SPRO -> Materials Management -> Purchasing -> Message Determination -> Message Determination -> Message Types -> Define message types for purchase order -> FineTuned Control: Purchase Order e) link it to an output procedure (message schema): SPRO -> Materials Management -> Purchasing -> Message Determination -> Message Determination -> Message Schemas -> Define message schemas for purchase order -> Maintain output determination procedure: Purchase order f) Create condition records for the tables that are being accessed in certain sequences that we incorporated in the output type. Logistics -> Materials Management -> Purchasing -> Master Data -> Messages -> Purchase Order -> Create
10.
Create the PO [ ME21 ] enter a purchase order document type that was used for creating condition records during the configuration of output determination.
11.
Slide 100
NACE
Slide 101
| 6/3/2013
Slide 102
| 6/3/2013
Slide 103
| 6/3/2013
Slide 104
| 6/3/2013
Slide 105
| 6/3/2013
Slide 106
| 6/3/2013
Slide 107
| 6/3/2013
Slide 108
| 6/3/2013
Slide 109
| 6/3/2013
Transaction Code
Inbound/Outbound
Description
WE20
Partner Profile
WE21
WE30 WE31 WE40 WE41 WE42 WE44 WE57 WE60 WE61 BD67 WE81 WE82 BD60 SWLD SALE VOE4 BD84
Slide 110 | 6/3/2013 PU12_IDOC_PROCESS
Port Definitions
Developing IDOC types Development of Segments Display System Process Codes OUT IN Outbound Process Codes Inbound Process Codes Partner Types IN Allocating Function Module to Message Type Documentation For Idoc Types Documentation For Idoc Record Types To creates link between Process Code and Functional Module Creating Message Types Link between Message type, IDOC type & IDOC extension OUT Link between message type and Function Module Area Menu for Workflow IN OUT IN IN Define Settings for the Inbound Function Module Make entries in EDPAR Reprocessing error Inbound Ready For Process Idocs