IDOC , ALE ,EDI

36,265 views
35,862 views

Published on

Published in: Business, Technology
2 Comments
26 Likes
Statistics
Notes
No Downloads
Views
Total views
36,265
On SlideShare
0
From Embeds
0
Number of Embeds
2,174
Actions
Shares
0
Downloads
3,926
Comments
2
Likes
26
Embeds 0
No embeds

No notes for slide
  • IDOC , ALE ,EDI

    1. 1. Overview of ALE / EDI / IDOCs
    2. 2. EDI <ul><li>What is EDI? </li></ul><ul><li>Type of EDI process </li></ul><ul><li>Outbound EDI Process </li></ul><ul><li>Inbound EDI Process </li></ul>
    3. 3. What is EDI? <ul><li>EDI is electronic exchange of business documents between the computer systems of business partner using a standard format over a communication network EDI is also called a paperless exchange. </li></ul>
    4. 4. Typical EDI/IDOC Scenario
    5. 5. Outbound Process <ul><li>With Message Control </li></ul><ul><li>Directly -With out Message Control </li></ul>
    6. 6. Inbound Process <ul><li>With Function Module </li></ul>
    7. 7. EDI Configuration <ul><li>How to Set Up an RFC Destination in SAP </li></ul><ul><li>The Port Definitions </li></ul><ul><li>Configure Partner Profile </li></ul><ul><li>Configure Message Control </li></ul>
    8. 8. Complete EDI/ ALE scenario
    9. 9. ALE <ul><li>What is ALE? </li></ul><ul><li>Components of ALE. </li></ul><ul><li>Anatomy of an IDoc. </li></ul><ul><li>ALE Processing </li></ul><ul><li>Transactions For Monitoring and Processing IDocs. </li></ul><ul><li>Questions </li></ul>
    10. 10. ALE Terminology <ul><li>ALE - Application Linking & Enabling </li></ul><ul><li>IDoc - Intermediate Document </li></ul><ul><li>EDI - Electronic Data Interchange </li></ul>
    11. 11. ALE Objective
    12. 12. ALE!! What is it ?? It is a set of <ul><li>Tools, </li></ul><ul><li>programs and </li></ul><ul><li>data definitions </li></ul>Provides distribution model and technology that enables SAP Customer to interconnect programs across various platforms and systems .
    13. 13. Features –ALE / IDocs <ul><li>Distributed System yet integrated with SAP R/3 </li></ul><ul><li>Based on ‘Application-to-Application integration using ‘Message Architecture’ </li></ul><ul><li>Reliable communication </li></ul><ul><li>Data is exchanged using “IDocs” </li></ul><ul><li>Support both R/2, R/3 and External system </li></ul><ul><li>If network problem, message is buffered </li></ul><ul><li>ALE support backward compatibility </li></ul><ul><li>ALE ensure that , data is transferred only once </li></ul>
    14. 14. ALE Scenario Document SAP System R/3 SAP System R/3 IDoc EDI Subsystem EDI Subsystem IDoc IDoc
    15. 15. <ul><li>What is ALE ? </li></ul><ul><li>Components of ALE. </li></ul><ul><li>Anatomy of an IDoc. </li></ul><ul><li>ALE Processing </li></ul><ul><li>Transactions For Monitoring and Processing IDocs. </li></ul><ul><li>Trouble Shooting </li></ul><ul><li>Questions </li></ul>Topics to cover
    16. 16. Components of ALE Services: Application Services Distribution Services Communication Services
    17. 17. Application Services Services: Application Services Distribution Services Communication Services This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents
    18. 18. Distribution Services Services: Application Services Distribution Services Communication Services <ul><li>Recipients </li></ul><ul><li>Formats and </li></ul><ul><li>Filters the data </li></ul><ul><li>Creates IDocs </li></ul><ul><li>( Intermediate </li></ul><ul><li>Documents </li></ul>
    19. 19. Communication Services Services: Application Services Distribution Services Communication Services <ul><li>TCP/IP </li></ul><ul><li>RFC </li></ul><ul><li>tRFC </li></ul><ul><li>etc </li></ul>
    20. 20. Determine Receipients Filter/Convert Data, Create IDOC Application Functions Filter/Convert Data Carrier Application Layer Distribution/ ALE Layer Communication Layer Application In a Nut Shell Application Data Master IDOC Comm. IDOC Comm. IDOC
    21. 21. Topics to cover <ul><li>What is ALE ? </li></ul><ul><li>Components of ALE . </li></ul><ul><li>Anatomy of an IDoc. </li></ul><ul><li>ALE Processing </li></ul><ul><li>Transactions For Monitoring and Processing IDocs. </li></ul><ul><li>Trouble Shooting </li></ul><ul><li>Questions </li></ul>
    22. 22. IDoc Concept <ul><li>R/3 System </li></ul>System 1 SAP Document <ul><li>EDI subsystem </li></ul><ul><li>R/3 System </li></ul><ul><li>R/2 System </li></ul><ul><li>3rd party software </li></ul>System 2 IDoc
    23. 23. IDoc Structure Status Record IDoc-ID Status information Data Record IDoc-ID Sequence/Hierarchy Segment <ul><li>Format definition for </li></ul><ul><li>header data </li></ul><ul><li>item data </li></ul>Control Record IDoc-ID Sender-ID Receiver-ID IDoc type and logical message External structure
    24. 24. Control record Data Record Status Record IDOC “ Intermediate Document”
    25. 25. 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
    26. 26. Message Type Message Type indicates How to Know what the data Means Data Exchanged by IDOC and EDI is known as Messages Message of same kind belong to the same message type. Message types are stored in table EDMSG
    27. 27. Data Record All records in the IDoc, which come after the control record, are the IDoc data. They are all structured alike, with a segment information part and a data part, which is 1000 character in length, filling the rest of the line. Data & Segment info is stored in EDID4 for release 4.x and EDID3 for release 2.x and 3.x.
    28. 28. Status Record Information about the IDoc status like: IDoc identification number Status number - table verified IDoc type Direction Data and time stamp; Structure: EDIDS
    29. 29. Status of IDOC <ul><li>A two-digit status is assigned to an IDoc to allow the processing to be monitored. </li></ul><ul><li>The statuses for outbound IDocs are between '01' and '49', while the statuses for inbound IDocs begin with '50'. </li></ul>
    30. 30. Idoc Segments TCODE: WE31
    31. 31. Idoc Types TCODE: WE30
    32. 32. How to Attach Segments
    33. 33. Message Types WE81 WE82
    34. 34. 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.
    35. 35. Topics to cover <ul><li>What is ALE ? </li></ul><ul><li>Components of ALE . </li></ul><ul><li>Anatomy of an IDoc. </li></ul><ul><li>ALE Processing. </li></ul><ul><li>i.Outbound Processing </li></ul><ul><li>ii.Inbound Processing </li></ul><ul><li>Transactions For Monitoring and Processing IDocs. </li></ul><ul><li>Trouble Shooting </li></ul><ul><li>Questions </li></ul>
    36. 36. Outbound Processing
    37. 37. Outbound processing: direct Application posting ALE layer Database Application document posted simultaneously with IDOCs Comm. layer asynch. RFC or EDI System call FM ( INBOUND_ IDOC_ PROCESS ) On destination Comm. layer Need to create IDOC? Create master IDOC Customer Distribution Model Receiver determination Segment filter Field value conversion Version change Dispatch control M C Links C
    38. 38. Dispatch control Application posting ALE layer Database Application document posted simultaneously with IDocs asynch. RFC or EDI asynch. RFC or EDI Comm. layer <ul><ul><li>Technical comms parameters are defined </li></ul></ul><ul><ul><li>EDI or aRFC (asynch. remote function call) </li></ul></ul><ul><ul><li>Send immediately or cumulate and send via batch job </li></ul></ul><ul><ul><ul><li>If batch, packet size is determined </li></ul></ul></ul>Need to create IDOC? Create master IDOC Customer Distribution Model Receiver determination Segment filter Field value conversion Version change Dispatch control M C Links C C
    39. 39. Scenario analysis <ul><li>How does the IDOC look like ? </li></ul><ul><li>How is data being sent ? </li></ul><ul><li>How is the data being received ? </li></ul>
    40. 40. Outbound program development <ul><li>Program logic </li></ul><ul><ul><li>“ How is the IDOC being created ?” </li></ul></ul><ul><li>Triggering </li></ul><ul><ul><li>“ How is the IDOC creation kicked off ?” </li></ul></ul>
    41. 41. Program logic <ul><li>Select data from application tables </li></ul><ul><li>Fill data into IDOC </li></ul><ul><li>Pass IDOC to ALE layer </li></ul><ul><li>(Call function MASTER_IDOC_DISTRIBUTE) </li></ul><ul><li>Commit Work </li></ul><ul><li>Receiver determination </li></ul><ul><li>Segment filtering </li></ul><ul><li>Version Control </li></ul><ul><li>Dispatch Control </li></ul>IDOC program ALE layer MASTER_IDOC_DISTRIBUTE
    42. 42. MASTER_IDOC_DISTRIBUTE <ul><li>Call function ‘MASTER_IDOC_DISTRIBUTE’ </li></ul><ul><ul><li>Exporting </li></ul></ul><ul><ul><ul><li>master_idoc_control: IDOC control record </li></ul></ul></ul><ul><ul><li>Tables </li></ul></ul><ul><ul><ul><li>communication_idoc_control: returned information about the distribution </li></ul></ul></ul><ul><ul><ul><li>master_idoc_data: IDOC data segments </li></ul></ul></ul>
    43. 43. Filling an EDIDD structure MOVE “Z1SEG” to EDIDD-SEGNAM MOVE “10” to Z1SEG-FIELD1 MOVE “ABC” to Z1SEG-FIELD2 MOVE Z1SEG to EDIDD-SDATA Header (55bytes) SDATA (1000bytes) … . SEGNAM …. EDIDD Z1SEG Field1 Field2 Field3 Field4 “ 10” “ ABC”
    44. 44. General Programming rules <ul><li>Design Guidelines for creating IDOC data records: </li></ul><ul><ul><li>Left-justified filing of IDOC Fields </li></ul></ul><ul><ul><li>Replacing SAP codes with ISO codes </li></ul></ul><ul><ul><ul><li>currency keys </li></ul></ul></ul><ul><ul><ul><li>country keys </li></ul></ul></ul><ul><ul><ul><li>unit of measure </li></ul></ul></ul><ul><ul><ul><li>shipping instructions </li></ul></ul></ul><ul><ul><li>Converting Currency Amounts </li></ul></ul>
    45. 45. Left-justified Filling <ul><li>All fields must be left-justified </li></ul><ul><ul><li>Character fields: </li></ul></ul><ul><ul><ul><li>automatic </li></ul></ul></ul><ul><ul><li>Non-character fields: </li></ul></ul><ul><ul><ul><li>‘ Condense’ statement must be used </li></ul></ul></ul><ul><ul><ul><li>Check IDOC documentation to find out which fields require a ‘condense’ </li></ul></ul></ul><ul><ul><ul><li>All types unequal to ‘char’, ‘cuky’, ‘clnt’, ‘accp’, ‘numc’, ‘dats’, ‘tims’ or ‘unit’ require a condense </li></ul></ul></ul>
    46. 46. Code Conversions <ul><li>Replacing SAP codes with ISO codes </li></ul><ul><ul><li>Currency keys: ‘currency_code_sap_to_iso’ </li></ul></ul><ul><ul><li>Country keys: ‘country_code_sap_to_iso’ </li></ul></ul><ul><ul><li>Units of measure: ‘unit_of_measure_sap_to_iso’ </li></ul></ul><ul><ul><li>Shipping instructions: sap_iso_package_type_code’ </li></ul></ul><ul><li>Conversion of currency amounts </li></ul><ul><ul><li>‘ currency_amount_sap_to_iso’ </li></ul></ul>
    47. 47. Basic Configuration Elements <ul><li>Define RFC Destinations </li></ul><ul><li>Define Ports </li></ul><ul><li>Maintain Customer Model </li></ul><ul><li>Create Partner Profiles </li></ul>
    48. 48. Maintaining RFC Destinations TCODE: SM59
    49. 49. Displaying and Maintaining Ports A port is a logical representation of a communication channel in SAP with the data communicated being IDocs .   TCODE: WE21
    50. 50. Partner Profiles TCODE: WE20
    51. 51. Partner Profiles-Inbound
    52. 52. Partner Profiles-Outbound
    53. 53. ALE For Transactional data ---- Output Determination NACE
    54. 54. Output Determination -- Output Types
    55. 55. Output Types -- Details
    56. 56. Inbound Processing
    57. 57. Inbound Processing. Application posting ALE layer Input control Database Simultaneously update IDOC's status Field value conversion A Comm. layer asynch. RFC or EDI Version change Segment filter C A Post application document Process IDOC Serialization
    58. 58. Input Control Application posting ALE layer Input control Database Simultaneously update IDOC's status <ul><ul><li>For each message type and sender one can define </li></ul></ul><ul><ul><ul><li>when to process (immediate/batch) </li></ul></ul></ul><ul><ul><ul><li>whether to call application directly or start customer workflow </li></ul></ul></ul><ul><ul><ul><li>who should get work items in case of error </li></ul></ul></ul><ul><ul><li>Incoming IDOC packets are passed to application </li></ul></ul>Field value conversion A Comm. layer asynch. RFC or EDI Version change Segment filter C A Post application document Process IDOC Serialization
    59. 59. Application Input Application posting ALE layer Input control Database Simultaneously update IDOC's status <ul><ul><li>Inbound IDOCs are passed to the application via a standardized function interface </li></ul></ul>Field value conversion A Comm. layer asynch. RFC or EDI Version change Segment filter C A Post application document Process IDOC Serialization
    60. 60. Serialization Application posting ALE layer Input control Database Simultaneously update IDOC's status <ul><ul><li>When processing the inbound IDOC, the application can call an ALE API (function module) to check that the IDOC has not been overtaken </li></ul></ul><ul><ul><ul><li>If change No. 1 arrives after change No. 2, the IDOC containing it has been overtaken (by the IDOC containing the later change) </li></ul></ul></ul>Field value conversion A Comm. layer asynch. RFC or EDI Version change Segment filter C A Post application document Process IDOC Serialization
    61. 61. FM Assignment to Message Type and IDoc type TCODE: WE57
    62. 62. Process Codes WE41 WE42
    63. 63. Process Codes in Inbound and Outbound TCODE: WE64
    64. 64. FM For Inbound EDI TCODE: BD67
    65. 65. Inbound Program Development INBOUND_IDOC_PROCESS ALE layer <ul><li>IDOC_INPUT_<MSGTYPE> </li></ul><ul><li>Read IDOC data </li></ul><ul><li>Post Application data </li></ul><ul><li>Send Success info back to ALE layer </li></ul><ul><li>ALE configuration </li></ul><ul><li>Partner Profiles </li></ul><ul><li>Process Code </li></ul><ul><li>Function module attribute </li></ul><ul><li>Function module registry </li></ul>Call function Return Variables If ERROR, trigger <ul><li>Version change </li></ul><ul><li>Segment filter </li></ul><ul><li>Field conversion </li></ul>IDOC Workflow Task
    66. 66. Basic Scenario <ul><li>Direct Method </li></ul><ul><li>Call Transaction Method </li></ul>
    67. 67. Advanced Scenario <ul><li>Mass processing </li></ul><ul><li>Serialization </li></ul><ul><li>Advanced Workflow </li></ul>
    68. 68. Flow Of Program <ul><li>Read IDOC-Lock IDOC-Call Inbound Program-Write Status-Commit Work-Unlock IDOC </li></ul>
    69. 69. Interface of Inbound FM <ul><li>Importing Parameter </li></ul><ul><li>-Input Method </li></ul><ul><li>-Mass_processing </li></ul><ul><li>EXPORT parameter . </li></ul><ul><li>-Workflow_result </li></ul><ul><li>-Application_variable </li></ul><ul><li>-In_Update_task </li></ul><ul><li>-Call_transaction_done </li></ul><ul><li>Tables parameter : </li></ul><ul><li>IDOC_Control </li></ul><ul><li>IDOC_DATA </li></ul><ul><li>IDOC_STATUS </li></ul><ul><li>Return_variable </li></ul>
    70. 70. Topics to cover <ul><li>What is ALE ? </li></ul><ul><li>Components of ALE . </li></ul><ul><li>Anatomy of an IDoc. </li></ul><ul><li>ALE Processing </li></ul><ul><li>Transactions For Monitoring and Processing IDocs. </li></ul><ul><li>Questions </li></ul>
    71. 71. Monitoring IDocs <ul><li>The IDoc interface offers 2 different approaches for tracking of data load and data flow: </li></ul><ul><li>Reports for monitoring </li></ul><ul><li>Workflow for notifications </li></ul><ul><li>Both approaches are based on the concept of status transitions, i.e. an IDoc changes its status from a given value to another value. </li></ul>
    72. 72. List Of All IDocs Created. (Default, Additional, EDI)-- WE02/ WE05
    73. 73. Selection Program For Issuing Output -- WE15
    74. 74. Test Tool For Idoc Processing (WE19)
    75. 75. Idoc Search For Business Contents (Database). WE09
    76. 76. Questions

    ×