IBM Global Services Overview of ALE IDOCs March
IBM Global Services Overview of ALE / IDOCs March, 2006 © Copyright IBM Corporation 2006
IBM Global Services Topics to cover q What is ALE? q Components of ALE. q Anatomy of an IDoc. q ALE Processing q Transactions For Monitoring and Processing IDocs. q Questions 2 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services ALE Terminology • ALE - Application Linking & Enabling • IDoc - Intermediate Document • EDI - Electronic Data Interchange 3 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services ALE Objective 4 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services ALE!! What is it ? ? It is a set of n Tools, programs and n data definitions n that provides the mechanism for distributing functionality and data across multiple system. 5 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services What Data can be Exchanged ? u. Transaction Data –SD, MM, FI, CO, etc. u. Master Data –Material, Customer, Vendor, etc. u. Control Data –Organizational Reference Information • Plants, Sales Orgs, etc. u. Data required to enable tightly coupled, distributed applications –Separate HR, Separate Treasury, etc. 6 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Features –ALE / IDocs u Distributed System yet integrated with SAP R/3 u Based on ‘Application-to-Application integration using ‘Message Architecture’ u Reliable communication u Data is exchanged using “IDocs” u Support both R/2, R/3 and External system u If network problem, message is buffered u ALE support backward compatibility u ALE ensure that , data is transferred only once 7 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ALE Scenario Document SAP System R/3 IDoc EDI Subsystem 8 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 SAP System R/3 IDoc EDI Subsystem © Copyright IBM Corporation 2006
IBM Global Services Topics to cover q What is ALE ? q Components of ALE. q Anatomy of an IDoc. q ALE Processing q Transactions For Monitoring and Processing IDocs. q Trouble Shooting q Questions 9 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services Components of ALE Services: Application Services Distribution Services Communication Services Tools: Customizing Tools Development Tools 10 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Application Services: Application Services Distribution Services Communication Services Tools: This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents Customizing Tools Development Tools 11 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Distribution Services: Application Services Distribution Services Communication Services Tools: Customizing Tools Development Tools 12 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Recipients n Formats and Filters the data n Creates IDocs ( Intermediate Documents n © Copyright IBM Corporation 2006
IBM Global Services Communication Services: Application Services Distribution Services Communication Services • TCP/IP • RFC Tools: Customizing Tools Development Tools 13 ABAP | Confidential | ALE For ABAPers. ppt • t. RFC • etc © Copyright IBM Corporation 2006
IBM Global Services Development Tools n Model Maintenance Tool. (for configuring the flow of data between systems ) §Shared Master Data(SMD)tools Services: Application Services Distribution Services Communication Services (for distributing master data ) n Customization parameters (within SAP for IDoc filtering and conversion. ) Tools: Customizing Tools Development Tools 14 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Customizing Tools Services: Application Services Distribution Services Communication Services Tools: Customizing Tools Development Tools 15 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Tools for creating and modifying IDocs © Copyright IBM Corporation 2006
IBM Global Services In a Nut Shell Application Layer Application Master IDOC Distribution/ ALE Layer Determine Receipients Filter/Convert Data, Create IDOC Communication Layer Comm. IDOC Carrier Application Data 16 Application Functions ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Filter/Convert Data Comm. IDOC © Copyright IBM Corporation 2006
IBM Global Services Topics to cover q What is ALE ? q Components of ALE. q Anatomy of an IDoc. q ALE Processing q Transactions For Monitoring and Processing IDocs. q Trouble Shooting q Questions 17 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services IDoc Concept System 1 SAP Document < R/3 System 18 ABAP | Confidential | ALE For ABAPers. ppt System 2 IDoc < EDI subsystem < R/3 System < R/2 System < 3 rd party software © Copyright IBM Corporation 2006
IBM Global Services 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 19 ABAP | Confidential | ALE For ABAPers. ppt IDoc-ID Status information © Copyright IBM Corporation 2006
IBM Global Services Control record Data Record Status Record IDOC “Intermediate Document” 20 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services 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 21 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Message Type indicates How to Know what the data Means Data Exchanged by IDOC and EDI is known as Message of same kind belong to the same message type Message types are stored in table EDMSG 22 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Data Record 23 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 EDID 4 for release 4. x and EDID 3 for release 2. x and 3. x. ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Status Record 24 Information about the IDoc status like: IDoc identification number Status number - table verified IDoc type Direction Data and time stamp; Structure: EDIDS ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Status of IDOC q A two-digit status is assigned to an IDoc to allow the processing to be monitored. q The statuses for outbound IDocs are between '01' and '49', while the statuses for inbound IDocs begin with '50'. q 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. q Status confirmation using IDoc type SYSTAT 01: The system sending the confirmation writes the status records as data records of IDoc type SYSTAT 01. All port types and both directions can be entered. 25 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Idoc Segments TCODE: WE 31 26 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Idoc Types TCODE: WE 30 27 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services How to Attach Segments 28 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Message Types WE 81 29 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 WE 82 © Copyright IBM Corporation 2006
IBM Global Services IDOC Type/ Message Type/ Processing Function Module Valid combination of Message type and IDOC type are stored in table EDIMSG Combination of message type and IDOC type determine the processing algorithm. This is usually a function module and is set up in table EDIFCT. 30 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Topics to cover q What is ALE ? q Components of ALE. q Anatomy of an IDoc. q ALE Processing. i. Outbound Processing ii. Inbound Processing q Transactions For Monitoring and Processing IDocs. q Trouble Shooting q Questions 31 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services Outbound Processing 32 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Outbound processing: direct Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model M asynch. RFC or EDI Receiver determination Segment filter Field value conversion Application document posted simultaneously with IDOCs Database 33 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Querying the Model Application posting 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 M Is anybody interested in my message type? Optional: what filter objects are theyasynch. interested in? or Receiver determination RFC EDI RFC asynch. or EDI Segment filter Field value conversion Application document posted simultaneously with IDocs Database 34 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Handover IDoc to ALE Application posting ALE layer Need to create IDOC? Comm. layer Customer Distribution Modelcreates the IDOC - The application Technically it is stored as an internal table - Passed to ALE via an API Receiver determination (function module) - Create master IDOC M asynch. RFC or EDI Segment filter Field value conversion Application document posted simultaneously with IDocs Database 35 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Receiver determination Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model M - Receiver determination Segment filter Field value conversion Application document posted simultaneously with IDocs Database 36 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. EDI model) is removed in ALE layer. Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Segment filter Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model - M Receiver determination - Segment filter - asynch. RFC 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 Field value conversion Application document posted simultaneously with IDocs Database 37 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Field value conversion Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model - M Receiver determination Segment filter Field value conversion Application document posted simultaneously with IDocs Database 38 - asynch. RFC 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 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Version change Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model M Receiver determination Segment filter - Field value conversion Application document posted simultaneously with IDocs Database 39 - 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 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control C © Copyright IBM Corporation 2006
IBM Global Services Make Links Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model M Receiver determination asynch. RFC or EDI Segment filter Links are written between IDOC and § Application object contained in IDOC § Communication-Layer's Dispatch "Transaction-ID" control C Field value conversion Application document posted simultaneously with IDocs Database 40 Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Dispatch control Application posting ALE layer Need to create IDOC? Create master IDOC Comm. layer Customer Distribution Model M Receiver determination - Segment filter - Field value conversion Application document posted simultaneously with IDocs Database 41 - Version change Links C ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Dispatch control asynch. RFC or EDI RFC asynch. Technical comms parameters are or defined EDI or a. RFCEDI (asynch. . remote function call) Send immediately or cumulate and send via batch job § If batch, packet size is determined C © Copyright IBM Corporation 2006
IBM Global Services Scenario analysis • How does the IDOC look like ? • How is data being sent ? • How is the data being received ? 42 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Outbound program development • Program logic – “How is the IDOC being created ? ” • Triggering – “How is the IDOC creation kicked off ? ” 43 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services 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 44 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 ALE layer © Copyright IBM Corporation 2006
IBM Global Services MASTER_IDOC_DISTRIBUTE Call function ‘MASTER_IDOC_DISTRIBUTE’ n Exporting w n 45 master_idoc_control: IDOC control record Tables w communication_idoc_control: returned information about the distribution w master_idoc_data: IDOC data segments ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Filling an EDIDD structure EDIDD Z 1 SEG Header (55 bytes) …. SEGNAM …. Field 1 Field 2 “ 10” “ABC” SDATA (1000 bytes) Field 3 Field 4 MOVE “Z 1 SEG” to EDIDD-SEGNAM MOVE “ 10” to Z 1 SEG-FIELD 1 MOVE “ABC” to Z 1 SEG-FIELD 2 MOVE Z 1 SEG to EDIDD-SDATA 46 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services General Programming rules l Design Guidelines for creating IDOC data records: • Left-justified filing of IDOC Fields • Replacing SAP codes with ISO codes w w currency keys country keys unit of measure shipping instructions • Converting Currency Amounts 47 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Left-justified Filling l All fields must be left-justified n Character fields: w n 48 automatic Non-character fields: w w ‘Condense’ statement must be used w All types unequal to ‘char’, ‘cuky’, ‘clnt’, ‘accp’, ‘numc’, ‘dats’, ‘tims’ or ‘unit’ require a condense Check IDOC documentation to find out which fields require a ‘condense’ ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Code Conversions l 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’ 49 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Basic Configuration Elements § § § 50 Create and allocate Logical System Define Ranges (Idocs, Ports, etc ) Define RFC Destinations Define Ports Maintain Customer Model Create Partner Profiles ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Logical System TCODE: BD 54; Stored in table T 000 51 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Allocate Logical System to the client TCODE: SCC 4 SALE > BASIC SETTINGS > SET UP LOGICAL SYSTEM > ASSIGN LOGICAL SYSTEM TO THE CLIENT 52 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Number Ranges § § 53 Maintain number ranges for ports Maintain number ranges for IDoc types and segment version Maintain number range for change pointers ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Maintaining RFC Destinations TCODE: SM 59 54 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Displaying and Maintaining Ports TCODE: WE 21 A port is a logical representation of a communication channel in SAP with the data communicated being IDocs 55 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Partner Profiles TCODE: WE 20 56 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Partner Profiles-Outbound 57 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Partner Profiles-Inbound 58 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Distribution Model TCODE: BD 64 59 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Transfer of data Transfer master data for material, customer, vendor to different client or system with BALE 60 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Filter Objects BD 95 61 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 BD 59 © Copyright IBM Corporation 2006
IBM Global Services Sending Master Data Idocs Master data ? Y Only send objects that have changed ? N Standalone program with user-definable selection criteria Y Change Pointer available? N Standalone with custom logic to keep track of changes y Change Pointer based Program 62 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Sending Transactional Data Idocs Transaction Data ? Y Ensure trans actional Integrity? N See Master data Y Output Determinat ion available ? N User-Exit available? y Output determination based Program 63 N hard coded ALE layer Modification Y Hardcoded ALE layer no Modification ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Change Pointers Application Posting • Post Application document Batch Program Master data • Determine IDOC module • Call IDOC module • Create Change Document • Are changes ALE relevant ? • Write Change Pointers • Commit Work (RBDMIDOC) ALE configuration • ALE relevant Fields Change pointers IDOC Module (Masteridoc_Create_ SMD_<MSGTYPE>) • Read Change Pointers • Fill IDOC • Call ALE layer • Update Change Pointer ALE layer Master_IDOC_DISTRIBUTE 64 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ü Change Pointers BD 61 65 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 BD 50 © Copyright IBM Corporation 2006
IBM Global Services ü Change Pointers… Continued BD 52 66 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 BD 60 © Copyright IBM Corporation 2006
IBM Global Services IDOC module 67 l IDOC module has to be implemented as function module l Naming Convention: MASTERIDOC_CREATE_SMD_<msgtype> l Function module reads change pointers information to get data that needs to go into IDOC l Function module logic: n Read change pointers n Fill IDOC structure n Call ALE layer n Update Change Pointer status n Commit Work ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ALE Configuration For Change Pointers • 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 68 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ALE For Transactional data ---- Output Determination NACE 69 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Determination -- Access Sequence 70 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Determination -- Output Types 71 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Details 72 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Partner Functions 73 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Processing Routines 74 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Procedures 75 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Procedures Control 76 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Output Types -- Condition records 77 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Inbound Processing 78 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Inbound Processing. Comm. layer ALE layer Application posting C Version change asynch. RFC or EDI Segment filter Field value conversion Input control A Serialization A Process IDOC Simultaneously update IDOC's status Database 79 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Post application document © Copyright IBM Corporation 2006
IBM Global Services 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 80 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Post application document © Copyright IBM Corporation 2006
IBM Global Services Application Input Comm. layer ALE layer Application posting C Version change Segment filter asynch. RFC or EDI Field value conversion - 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 81 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Post application document © Copyright IBM Corporation 2006
IBM Global Services Serialization Comm. layer ALE layer Application posting C Version change When processing the Segment filter asynch. RFC inbound IDOC, the or application 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) 82 Input control A Serialization A Process IDOC Simultaneously update IDOC's status Database ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 Post application document © Copyright IBM Corporation 2006
IBM Global Services FM Assignment to Message Type and IDoc type TCODE: WE 57 83 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Process Codes WE 41 84 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 WE 42 © Copyright IBM Corporation 2006
IBM Global Services Process Codes in Inbound and Outbound TCODE: WE 64 85 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services FM For Inbound EDI TCODE: BD 67 86 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Inbound Program Development INBOUND_IDOC_PROCESS IDOC • 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 87 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ALE error handling 88 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services ALE error handling l Necessary Steps: n Create new object type in Business Object Repository for IDOC; object is child of IDOCAPPL n Create new customer task n Create event-couplings linking w w n 89 Event ‘input. Finished’ to function module To support mass processing: w n Event ‘input. Error. Occured’ linked to standard task Create new object type as child of IDOCPACKET Maintain process code to refer the above objects and events ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Advanced Inbound Topics 90 • Data consistency • Serialization • Individual vs. mass processing • Call transaction function modules ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Data Consistency • Problem: – Ensure transactional integrity • Don’t process and IDOC twice • Allow for IDOC reprocessing after rollback of application document posting • 91 Solution: – Application document must be posted in the same LUW as the IDOC status records – IDOC function module must not use a ‘Commit Work’ ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Data Consistency 92 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Serialization Sender Comm. Layer Receiver 1 Input from IDOC 1 must be prevented in order not to lose information from IDOC 2 2 2 Object X, changed twice: First IDOC overtaken 1 93 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 !? © Copyright IBM Corporation 2006
IBM Global Services Serialization l Check, if IDOC has been overtaken n Use function module ‘IDOC_SERIALIZATION_CHECK’ n react to overtaken IDOCs according to your needs l Prerequisite is the definition of a serialization object 94 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Mass Processing l Processing more than one IDOC can improve throughput: n more than one IDOC is processed per Commit Work n the function can be coded to add multiple entries to a table with one update command (‘array insert’) l Function module has to be coded in a way that it supports mass processing l Attribute of delivered function module specifies if mass processing is supported or not 95 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Call Transaction l Pros: n Error reprocessing in foreground n Easy to program l Cons: n Call Transaction has significant performance overhead n Automatic Commit work, no data consistency l Recommendation: 96 n Try to use function modules that update database directly n If you want to use ‘Call transaction’, they have been ‘ALEenabled’ to guarantee data concistency ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Topics to cover q What is ALE ? q Components of ALE. q Anatomy of an IDoc. q ALE Processing q Transactions For Monitoring and Processing IDocs. q Questions 97 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services Monitoring IDocs • The IDoc interface offers 2 different approaches for tracking of data load and data flow: Reports for monitoring Workflow for notifications • Both approaches are based on the concept of status transitions, i. e. an IDoc changes its status from a given value to another value. 98 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services List Of All IDocs Created. (Default, Additional, EDI)-- WE 02/ WE 05 99 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Selection Program For Issuing Output -- WE 15 100 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Process All Selected IDocs. WE 14 101 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Test Tool For Idoc Processing (WE 19) 102 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Select IDocs BD 87 103 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Idoc Search For Business Contents (Database). WE 09 104 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Status Conversion With Trfc Execution. BD 75 105 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
IBM Global Services Questions 106 ABAP | Confidential | ALE For ABAPers. ppt © Copyright IBM Corporation 2006
IBM Global Services 107 ABAP | Confidential | ALE For ABAPers. ppt | 10/30/2020 © Copyright IBM Corporation 2006
- Slides: 107