0% found this document useful (0 votes)
34 views76 pages

2aleidoc 1208881203393456 9

This document provides an overview of ALE (Application Linking and Enabling), EDI (Electronic Data Interchange), and IDocs (Intermediate Documents). It discusses what EDI is, the types of EDI processes including outbound and inbound processes. It describes ALE and its objective to provide a distribution model and technology to interconnect programs across systems. It covers the components of ALE including application services, distribution services, and communication services. It also discusses IDocs including their structure, status records, segments, and how they are used to exchange data between different systems.

Uploaded by

GKREDDY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views76 pages

2aleidoc 1208881203393456 9

This document provides an overview of ALE (Application Linking and Enabling), EDI (Electronic Data Interchange), and IDocs (Intermediate Documents). It discusses what EDI is, the types of EDI processes including outbound and inbound processes. It describes ALE and its objective to provide a distribution model and technology to interconnect programs across systems. It covers the components of ALE including application services, distribution services, and communication services. It also discusses IDocs including their structure, status records, segments, and how they are used to exchange data between different systems.

Uploaded by

GKREDDY
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 76

Overview of ALE /

EDI / IDOCs

03/22/17 Overview of ALE/IDOCs 1


EDI
What is EDI?
Type of EDI process
Outbound EDI Process
Inbound EDI Process

03/22/17 Overview of ALE/ID 2


What is EDI?
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.

03/22/17 Overview of ALE/ID 3


Typical EDI/IDOC Scenario

03/22/17 Overview of ALE/ID 4


Outbound Process
With Message Control
Directly -With out Message Control

03/22/17 Overview of ALE/ID 5


Inbound Process
With Function Module

03/22/17 Overview of ALE/ID 6


EDI Configuration
How to Set Up an RFC Destination in SAP
The Port Definitions
Configure Partner Profile
Configure Message Control

03/22/17 Overview of ALE/ID 7


Complete EDI/ ALE scenario

03/22/17 Overview of ALE/ID 8


ALE
What is ALE?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Questions

03/22/17 Overview of ALE/ID 9


ALE Terminology
ALE - Application Linking & Enabling

IDoc - Intermediate Document

EDI - Electronic Data Interchange

03/22/17 Overview of ALE/ID 10


ALE Objective

03/22/17 Overview of ALE/ID 11


ALE!! What is it ??

It is a set of
Tools,
programs and

data definitions

Provides distribution model and technology


that enables SAP Customer to interconnect
programs across various platforms and
systems.
03/22/17 Overview of ALE/ID 12
Features ALE / IDocs
Distributed System yet integrated with SAP R/3

Based on Application-to-Application integration using Message


Architecture

Reliable communication

Data is exchanged using IDocs

Support both R/2, R/3 and External system

If network problem, message is buffered

ALE support backward compatibility

ALE ensure that , data is transferred only once


03/22/17 Overview of ALE/ID 13
ALE Scenario

Document

IDoc
SAP System R/3 SAP System R/3

IDoc IDoc

EDI Subsystem EDI Subsystem

03/22/17 Overview of ALE/ID 14


Topics to cover

What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Trouble Shooting
Questions

03/22/17 Overview of ALE/ID 15


Components of ALE

Services:
Application Services
Distribution Services
Communication Services

03/22/17 Overview of ALE/ID 16


Application Services
Services:
Application Services
This is where the SAP
Distribution Services
applications ( SD, FI,
Communication Services
MM etc. ) generate
their data and
documents

03/22/17 Overview of ALE/ID 17


Distribution Services
Services:
Application Services Recipients
Distribution Services Formats and
Communication Services
Filters the data
Creates IDocs

( Intermediate
Documents

03/22/17 Overview of ALE/ID 18


Communication Services
Services:
Application Services
Distribution Services
Communication Services TCP/IP
RFC
tRFC
etc

03/22/17 Overview of ALE/ID 19


In a Nut Shell

Application Distribution/ALE Communication


Layer Layer Layer

Master
Application
Application IDOC Determine
Determine Filter/Convert
Filter/Convert Comm.
Receipients
Receipients Data,
Data, Create
Create IDOC
IDOC IDOC

Carrier
Carrier

Application
Data Application
Application Filter/Convert
Filter/Convert Comm.
Functions
Functions Data
Data IDOC

03/22/17 Overview of ALE/ID 20


Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Trouble Shooting
Questions

03/22/17 Overview of ALE/ID 21


IDoc Concept

System 1 System 2

SAP
Document
IDoc

R/3 System EDI subsystem


R/3 System
R/2 System
3rd party software

03/22/17 Overview of ALE/ID 22


IDoc Structure
Control Record IDoc-ID
Sender-ID
Receiver-ID
IDoc type and logical message
External structure

Data Record IDoc-ID


Sequence/Hierarchy
Segment Format definition for
header data
item data

Status Record IDoc-ID


Status information

03/22/17 Overview of ALE/ID 23


Control record
Data Record
Status Record

IDOC
Intermediate
Document

03/22/17 Overview of ALE/ID 24


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

03/22/17 Overview of ALE/ID 25


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

03/22/17 Overview of ALE/ID 26


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.

03/22/17 Overview of ALE/ID 27


Status Record Information about the IDoc status like:
IDoc identification number
Status number - table verified
IDoc type
Direction
Data and time stamp; Structure:
EDIDS

03/22/17 Overview of ALE/ID 28


Status of IDOC
A two-digit status is assigned to an IDoc to allow the processing to
be monitored.
The statuses for outbound IDocs are between '01' and '49', while the
statuses for inbound IDocs begin with '50'.

03/22/17 Overview of ALE/ID 29


Idoc Segments

TCODE:
WE31

03/22/17 Overview of ALE/ID 30


Idoc Types

TCODE:
WE30

03/22/17 Overview of ALE/ID 31


How to Attach Segments

03/22/17 Overview of ALE/ID 32


Message Types

WE81
WE82

03/22/17 Overview of ALE/ID 33


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.

03/22/17 Overview of ALE/ID 34


Topics to cover
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
Questions

03/22/17 Overview of ALE/ID 35


Outbound Processing

03/22/17 Overview of ALE/ID 36


Outbound processing: direct
Application ALE layer Comm. layer
posting

Need to Customer
create IDOC? Distribution Model
asynch. RFC
Create master or
M Receiver determination
IDOC EDI
System call FM
Segment filter
( INBOUND_
IDOC_
Field value conversion PROCESS )
Application document On destination
posted simultaneously Version change
with IDOCs
Dispatch
Links
C control C
Database

03/22/17 Overview of ALE/ID 37


Dispatch control
Application ALE layer Comm. layer
posting

Need to Customer
create IDOC? Distribution Model
asynch. RFC
Create master or
M Receiver determination
IDOC EDI RFC
asynch.
- Technical comms parameters are
Segment filter defined or
- EDI or aRFCEDI
(asynch. remote
Field value conversion function call)
- Send immediately or cumulate
Application document
Version change and send via batch job
posted simultaneously
If batch, packet size is
with IDocs
determined
Dispatch
Links
C control C
Database

03/22/17 Overview of ALE/ID 38


Scenario analysis

How does the IDOC look like ?

How is data being sent ?

How is the data being received ?

03/22/17 Overview of ALE/ID 39


Outbound program development

Program logic
How is the IDOC being created ?

Triggering
How is the IDOC creation kicked off ?

03/22/17 Overview of ALE/ID 40


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
ALE layer

03/22/17 Overview of ALE/ID 41


MASTER_IDOC_DISTRIBUTE

Call function MASTER_IDOC_DISTRIBUTE


Exporting
master_idoc_control: IDOC control record
Tables
communication_idoc_control: returned information
about the distribution
master_idoc_data: IDOC data segments

03/22/17 Overview of ALE/ID 42


Filling an EDIDD structure
Header (55bytes) SDATA (1000bytes)
EDIDD . SEGNAM .

Field1 Field2 Field3 Field4


Z1SEG
10 ABC

MOVE Z1SEG to EDIDD-SEGNAM


MOVE 10 to Z1SEG-FIELD1
MOVE ABC to Z1SEG-FIELD2
MOVE Z1SEG to EDIDD-SDATA

03/22/17 Overview of ALE/ID 43


General Programming rules
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

03/22/17 Overview of ALE/ID 44


Left-justified Filling
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 a condense
All types unequal to char, cuky, clnt, accp, numc,
dats, tims or unit require a condense

03/22/17 Overview of ALE/ID 45


Code Conversions
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

03/22/17 Overview of ALE/ID 46


Basic Configuration Elements
Define RFC Destinations
Define Ports
Maintain Customer Model
Create Partner Profiles

03/22/17 Overview of ALE/ID 47


Maintaining RFC Destinations

TCODE:
SM59

03/22/17 Overview of ALE/ID 48


Displaying and Maintaining Ports

TCODE:
WE21

A port is a logical representation of a


communication channel in SAP with
the data communicated being IDocs.
IDocs

03/22/17 Overview of ALE/ID 49


Partner Profiles

TCODE:
WE20

03/22/17 Overview of ALE/ID 50


Partner Profiles-Inbound

03/22/17 Overview of ALE/ID 51


Partner Profiles-Outbound

03/22/17 Overview of ALE/ID 52


ALE For Transactional data ---- Output
Determination

NACE

03/22/17 Overview of ALE/ID 53


Output Determination -- Output Types

03/22/17 Overview of ALE/ID 54


Output Types -- Details

03/22/17 Overview of ALE/ID 55


Inbound Processing

03/22/17 Overview of ALE/ID 56


Inbound Processing.
Comm. layer ALE layer Application
posting
C
Version change

asynch. RFC Segment filter


or
EDI Field value conversion

Input
control A
A Serialization Process IDOC

Simultaneously update
IDOC's status
Post application
Database document

03/22/17 Overview of ALE/ID 57


Input Control
Comm. layer ALE layer Application
posting
C

- For each message type and senderVersion change


one can define
asynch. RFCto process
when Segment filter
or(immediate/batch)
whether to call application Field value conversion
EDIdirectly or start customer
workflow
who should get work items in Input
case of error control A
- Incoming IDOC packets are passed to
application A Serialization Process IDOC

Simultaneously update
IDOC's status
Post application
Database document

03/22/17 Overview of ALE/ID 58


Application Input
Comm. layer ALE layer Application
posting
C
Version change

asynch. RFC Segment filter


or
EDI Field value conversion

- Input
Inbound IDOCs are passed to
the application via a control A
standardized function
A Serialization Process IDOC
interface

Simultaneously update
IDOC's status
Post application
Database document

03/22/17 Overview of ALE/ID 59


Serialization
Comm. layer ALE layer Application
posting
C
Version change

- When processing the Segment filter


asynch. RFC
inbound IDOC, the
or
application can call an ALE Field value conversion
EDI
API (function module) to
check that the IDOC has not
been overtaken Input
control A
If change No. 1 arrives
after change No. 2, the A Serialization Process IDOC
IDOC containing it has
been overtaken (by the
Simultaneously update
IDOC containing the IDOC's status
later change) Post application
Database document

03/22/17 Overview of ALE/ID 60


FM Assignment to Message Type and
IDoc type

TCODE:
WE57

03/22/17 Overview of ALE/ID 61


Process Codes

WE41
WE42

03/22/17 Overview of ALE/ID 62


Process Codes in Inbound and Outbound

TCODE:
WE64

03/22/17 Overview of ALE/ID 63


FM For Inbound EDI

TCODE:
BD67

03/22/17 Overview of ALE/ID 64


Inbound Program Development
ALE configuration
INBOUND_IDOC_PROCESS Partner Profiles
IDOC Version change Process Code
Function module attribute
Segment filter Function module registry
Field conversion
Call function
IDOC_INPUT_<MSGTYPE>

Read IDOC data


Return Variables Post Application data
Send Success info back to ALE layer

If ERROR, trigger
Workflow Task
ALE layer

03/22/17 Overview of ALE/ID 65


Basic Scenario
Direct Method
Call Transaction Method

03/22/17 Overview of ALE/ID 66


Advanced Scenario
Mass processing
Serialization
Advanced Workflow

03/22/17 Overview of ALE/ID 67


Flow Of Program
Read IDOC-Lock IDOC-Call Inbound Program-
Write Status-Commit Work-Unlock IDOC

03/22/17 Overview of ALE/ID 68


Interface of Inbound FM
Importing Parameter
-Input Method
-Mass_processing
EXPORT parameter .
-Workflow_result
-Application_variable
-In_Update_task
-Call_transaction_done

Tables parameter :
IDOC_Control
IDOC_DATA
IDOC_STATUS
Return_variable

03/22/17 Overview of ALE/ID 69


Topics to cover
What is ALE ?
Components of ALE.
Anatomy of an IDoc.
ALE Processing
Transactions For Monitoring and Processing IDocs.
Questions

03/22/17 Overview of ALE/ID 70


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.

03/22/17 Overview of ALE/ID 71


List Of All IDocs Created. (Default, Additional, EDI)-- WE02/
WE05

03/22/17 Overview of ALE/ID 72


Selection Program For Issuing Output --
WE15

03/22/17 Overview of ALE/ID 73


Test Tool For Idoc Processing (WE19)

03/22/17 Overview of ALE/ID 74


Idoc Search For Business Contents
(Database). WE09

03/22/17 Overview of ALE/ID 75


Questions

03/22/17 Overview of ALE/ID 76

You might also like