Documente Academic
Documente Profesional
Documente Cultură
ALE - IDOC
1 2
Introduction Procedure
3
Demonstration
Exercises HelpMe
5
India SAP CoE, Slide 2
Introduction
Pre-requisites:AB0001 - ABAP overview, R / 3 OVERVIEW & ARCHITECTURE. Course Objectives To get an overview of ALE, IDOC & EDI. After this Course, you will be able to : Get familiarized with the jargons used in ALE, IDOC & EDI. Know the concept of ALE and Idocs. Know more about IDoc structure and its role in Data communication Learn basic Outbound Processing of IDoc. Learn basic Inbound Processing of IDoc. Have a Quick Introduction to EDI. Get your hands dirty on Demo Scenario
Q & A section
ALE - IDOC
1 2
Introduction Procedure
3
Demonstration
Exercises HelpMe
5
India SAP CoE, Slide 4
Procedure - contents
Business Utilization
IDoc
ALE
Business Utilization
A normal business structure comprises of an organization with multiple offices spread across different countries. They do business with customers and vendors spread across different locations. The organization sends business data to its different offices as well as to its customers and vendors.
Business data
Customer
Sales Office
Business data
Production
Production (SAP)
Idoc
Idoc
Customer
Idoc
IDoc Type defines the structure and format in which the data is exchanged. It is similar to a structure in SAP IDoc data is an instance of IDoc Type
IDoc acts as a standard SAP interface to exchange business data through ALE. From an SAP system, an IDoc can be sent to and received from An SAP R/3 system An SAP R/2 system An EDI subsystem Any third-party application software
Segments . Idoc data is arranged in Rows, The rows make up segments of an idoc. Each segment consists of fields/segments. Fields can contain data.
Message
Message type is a name given , that tells us what type of business data is being exchanged. Eg: MATMAS (material master data) , DESADV (delivery Data) Message type is always linked to an IDoc type . Where the IDoc Type represents the data format. While the message tells us the purpose of data being sent Ex: In an organization. Employee details are needed for different purposes. Like Payroll as well as Security department may need different details about the same employee. A standard format for employee details is created (Idoc type :EMPINFO01). Different messages , 1 for payroll (EMPSAL) and 1 for security (EMPSEC) so that same employee details can be sent for different purposes.
An idoc Type defines the syntax of the data permitted segments and their arrangements mandatory/optional segments.
IDoc Components
Control Record
IDoc# Sending business system Receiving business system IDoc type and logical message Creation date and time IDoc# Sequence/Hierarchy Segment Format definition for header data item data IDoc# .Status information like success/failure
Data Record
Status Record
IDoc
Data Records constitute of segments with a sequential segment number, a segment type description and field containing the actual data of the segment (to a max of 1000 bytes)
**Control and Status records are filled by the ALE services and is discussed later in the presentation
OutboundDetermine IDoc
Head Quarters
Payroll Department
Purchasing
Sales
Receiving
Shipping
The business process shown above depicts an SAP cycle that involves ALE model to exchange business data like
Advantages of ALE
ALE business process is used for following distribution of tasks: 1. Synchronizing customizing data between systems. 2. Master data distribution 3. R/2 Connection 4. External system connection ALE Model is independent of the participating application systems. Technology supports guaranteed delivery. Ensures backward compatibility of messages exchanged between systems. E.g. Version Compatibility. Reduced Processing Cycle time Reduced Paperwork Reduced Cost Standard means of communication
Logical Systems
R/3 Clients involved in data exchange RFC Connections Distribution Model IDoc + Message Type Partner Type / Partner Profiles Ports
( TCode SALE )
( TCode SALE ) ( TCode SM59 ) ( TCode BD64 ) ( TCode WE82 ) ( TCode WE20 ) ( TCode WE21 )
Partner Type - Partner type are used to classify the business system. Ex: Logical System (LS) for other SAP clients, Customer (KU), Vendor (LI) etc..
Ports
Ports are a logical representation of the communication channels in SAP R/3 defines four types of ports viz. tRFC (transactional Remote Function Calls), File, R/2, and Internet. tRFC ports once created are assigned to RFC destination. ALE can use all port types to distribute IDocs.
Distribution Model
Distribution Model A model that describes the ALE message flow between logical systems. Applications and the ALE distribution service layer use the model to determine receivers and to control the data distribution. The relationships between logical systems, message types, BAPIs and filters are defined in the distribution model. Ex: The screen shot depicts customer distribution mode ALE_TRNG_Mar07.
Sender Logical System EC1CLNT800 Receiver Logical System SALES Message Type CREMAS No filter conditions defined.
Process Codes
Process Codes are used to identify the function module or API (Application Programming Interface) to be invoked for subsequent processing (Outbound or Inbound) of the business application. Outbound process code - Outbound process code under Message Control, generated the IDoc in the IDoc Interface. The process code determines the relevant function module. (TCode WE41) Inbound process Code - names the function module or workflow which reads the IDoc data and transfers the data to the application document. (TCode WE42) Outbound process codes are stored in table TEDE1, while inbound process codes are stored in TEDE2.
IDoc Processing
The IDoc Interface supports three types of data flow with the external system. Outbound processing - IDocs are transferred to a receiving system from the SAP System. Inbound processing - IDocs are transferred to the SAP System from a sender system. Status processing - The follow-on system confirms the processing status of outbound IDocs to the SAP System.
Outbound Processing
Inbound Processing
Communication Layer - The formatted IDoc is passed to the communication layer from where it is sent to the system (server) that was called via a tRFC (for SAP systems) or file interfaces (for example, EDI).
India SAP CoE, Slide 24
Distribution service layer and Communication service layer add these statuses on the status record, describing various phases of processing.
Status record in screen shot shows the status of IDoc through its journey from IDoc generation (status -42) -> IDoc Passing through ALE layer (status - 30) -> IDoc Sent out of R/3 system (Status - 03).
To configure the partner profiles Master data must be available in the system for partners. A port is created to assign in the outbound partner profiles. This port must be configured already.
Inbound processing
List of process are carried on inbound IDocs in the ALE layer. Segment filtering Field conversion Transfer control Serialization Inbound Process uses: IDoc Structure Service Programs Partner Profile (derives from control record) Posting Programs Configuration Tables Process Flow Function Module Workflow (used mainly in EDI)
Communication Layer This layer receives the communication IDoc structure from the remote system to post the application data.
ALE service Layer This layer can perform Segment Filtering, Field Conversion, Serialization and Transfer Control on the communication IDoc structure. Application Layer The posting program or process code calls the FM to finally post the document to the database.
IDoc
EDI Subsystem
Translate IDoc to EDI Standard. Translated EDI standard to vendor format
In SAP communicating partners are not defined as logical systems for EDI. They have partner types like KU-Customer, LI-Vendor etc...which uses a file port.
To use EDI -IDoc (intermediate document) a standard data structure is generated by an application program / transaction in SAP system, it uses file port (to hold application data in file format) as a technical channel for communication and sends the data to EDI (Electronic Data Interchange) subsystem.
India SAP CoE, Slide 34
QUOTES
PRICAT ORDERS/ORDCHG ORDRSP IMPINV TXTRAW DESADV STPPOD INVOIC
Vendor
The diagram depicts the business process flow between a customer and a vendor in common manufacturing industries.
TXTRAW
EXPINV
To automate the process in exchanging the business data between these partners we can configure the ALE model with standard messages defined by SAP as shown like
Ex: QUOTES Quotation ORDERS Purchase Order ORDRSP Order Confirmation
REMADV
Supplier
The diagram depicts the business process flow between a manufacturer and a supplier in an automotive industry. To automate the process in exchanging the business data between the manufacturer and supplier standard message type provided by SAP can be used in message exchange such as: Ex: DELINS Delivery / JIT schedule DELORD Delivery request ORDRSP Order Confirmation
Bank
PAYEXT DEBADV CREADV
CP Manufacturer
PROACT
Bank
PAYEXT DEBADV CREADV
ALE - IDOC
1 2
Introduction Procedure
3
Demonstration
Exercises HelpMe
5
India SAP CoE, Slide 38
Demo Scenario
Demo showing distribution of master data. E.g. Synchronization of master data like customer / vendor / material between 2 SAP systems. Configuration Steps: 1. Creation of logical systems 2. Assign client to logical systems 3. Creating RFC destinations 4. Creating Distribution model & distributing the view. 5. Generating partner profiles. 6. Check partner profiles & ports generated. 7. Trigger master data and check the status of Idoc in sender and receiver systems.
ALE - IDOC
1 2
Introduction Procedure
3
Demonstration
Exercises HelpMe
5
India SAP CoE, Slide 40
Exercise
Trigger distribution of master data. E.g. Synchronization of master data like customer / vendor / material between 2 SAP systems (Tcode BD10/ BD12/ BD14) Assumptions: All ALE configurations are already in place. (ALE course 2 covers configurations in greater details)
Trigger master data and check the status of IDoc in sender and receiver systems.
ALE - IDOC
1 2
Introduction Procedure
3
Demonstration
Exercises HelpMe
5
India SAP CoE, Slide 42