76
06/07/22 Overview of ALE/IDOCs 1 Overview of ALE / EDI / IDOCs

IDOC , ALE ,EDI

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: IDOC , ALE ,EDI

04/10/23 Overview of ALE/IDOCs 1

Overview of ALE / EDI / IDOCs

Page 2: IDOC , ALE ,EDI

Overview of ALE/IDOCs 204/10/23

EDI

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

Page 3: IDOC , ALE ,EDI

Overview of ALE/IDOCs 304/10/23

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.

Page 4: IDOC , ALE ,EDI

Overview of ALE/IDOCs 404/10/23

Typical EDI/IDOC Scenario

Page 5: IDOC , ALE ,EDI

Overview of ALE/IDOCs 504/10/23

Outbound Process

With Message Control Directly -With out Message Control

Page 6: IDOC , ALE ,EDI

Overview of ALE/IDOCs 604/10/23

Inbound Process

With Function Module

Page 7: IDOC , ALE ,EDI

Overview of ALE/IDOCs 704/10/23

EDI Configuration

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

Page 8: IDOC , ALE ,EDI

Overview of ALE/IDOCs 804/10/23

Complete EDI/ ALE scenario

Page 9: IDOC , ALE ,EDI

Overview of ALE/IDOCs 904/10/23

ALEALE

What is ALE?

Components of ALE.

Anatomy of an IDoc.

ALE Processing

Transactions For Monitoring and Processing IDocs.

Questions

Page 10: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1004/10/23

ALE TerminologyALE Terminology

•ALE - Application Linking & Enabling

•IDoc - Intermediate Document

•EDI - Electronic Data Interchange

Page 11: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1104/10/23

ALE Objective ALE Objective

Page 12: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1204/10/23

ALE!! What is it ??

It is a set ofIt 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..

Page 13: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1304/10/23

Features –ALE / IDocsFeatures –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

Page 14: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1404/10/23

ALE Scenario ALE Scenario

Document

SAP System R/3 SAP System R/3IDoc

EDI SubsystemEDI Subsystem

IDocIDoc

Page 15: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1504/10/23

What is ALE ?

Components of ALE.

Anatomy of an IDoc.

ALE Processing

Transactions For Monitoring and Processing IDocs.

Trouble Shooting

Questions

Topics to coverTopics to cover

Page 16: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1604/10/23

Components of ALE Components of ALE

Services:Services:

Application ServicesApplication Services

Distribution ServicesDistribution Services

Communication ServicesCommunication Services

Page 17: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1704/10/23

Application ServicesApplication Services

Services:Services:

Application ServicesApplication Services

Distribution ServicesDistribution Services

Communication ServicesCommunication Services

This is where the SAP applications ( SD, FI, MM etc. ) generate their data and documents

Page 18: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1804/10/23

Distribution ServicesDistribution ServicesServices:Services:

Application ServicesApplication Services

Distribution ServicesDistribution Services

Communication ServicesCommunication Services

Recipients Formats and

Filters the data Creates IDocs

( Intermediate

Documents

Page 19: IDOC , ALE ,EDI

Overview of ALE/IDOCs 1904/10/23

Communication ServicesCommunication Services

Services:Services:

Application ServicesApplication Services

Distribution ServicesDistribution Services

Communication ServicesCommunication Services •TCP/IP

•RFC

•tRFC

• etc

Page 20: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2004/10/23

Application Data

MasterIDOC Determine

Receipients

DetermineReceipients

Filter/ConvertData, Create IDOC

Filter/ConvertData, Create IDOC

Comm.IDOC

Application Functions

Application Functions

Filter/ConvertData

Filter/ConvertData

Comm.IDOC

CarrierCarrier

Application Layer

Application Layer

Distribution/ ALE Layer

Distribution/ ALE Layer

Communication Layer

Communication Layer

ApplicationApplication

In a Nut ShellIn a Nut Shell

Page 21: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2104/10/23

Topics to coverTopics to cover

What is ALE ?

Components of ALE.

Anatomy of an IDoc.

ALE Processing

Transactions For Monitoring and Processing IDocs.

Trouble Shooting

Questions

Page 22: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2204/10/23

IDoc ConceptIDoc Concept

R/3 System

System 1

SAPDocument

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

System 2

IDoc

Page 23: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2304/10/23

IDoc StructureIDoc Structure

Status Record IDoc-IDStatus information

Data Record IDoc-IDSequence/HierarchySegment Format definition for

• header data• item data

Control Record IDoc-IDSender-IDReceiver-IDIDoc type and logical messageExternal structure

Page 24: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2404/10/23

Control recordData RecordStatus Record

IDOC

“Intermediate Document”

Page 25: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2504/10/23

The very first record of an IDoc package is always a control record. Thestructure 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

Control RecordControl Record

Page 26: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2604/10/23

Message TypeMessage 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

Page 27: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2704/10/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 EDID4 for release 4.x and EDID3 for release 2.x and 3.x.

Data RecordData Record

Page 28: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2804/10/23

Status RecordStatus Record Information about the IDoc status like:IDoc identification numberStatus number - table verifiedIDoc typeDirectionData and time stamp; Structure: EDIDS

Page 29: IDOC , ALE ,EDI

Overview of ALE/IDOCs 2904/10/23

Status of IDOCStatus 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'.

Page 30: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3004/10/23

Idoc SegmentsIdoc Segments

TCODE:

WE31

Page 31: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3104/10/23

Idoc TypesIdoc Types

TCODE:

WE30

Page 32: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3204/10/23

How to Attach SegmentsHow to Attach Segments

Page 33: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3304/10/23

Message TypesMessage Types

WE81WE82

Page 34: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3404/10/23

IDOC Type/ Message Type/ Processing Function IDOC Type/ Message Type/ Processing Function ModuleModule

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.

Page 35: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3504/10/23

Topics to coverTopics 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

Page 36: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3604/10/23

Outbound Processing

Page 37: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3704/10/23

Outbound processing: directOutbound processing: directApplication posting

Need to create IDOC?

Create master IDOC

Customer Distribution Model

Receiver determination

Segment filter

Field value conversion

Version change

ALE layer

Dispatch controlDatabase

M

Application document posted simultaneously with IDOCs

Comm. layer

asynch. RFCor

EDISystem call FM

( INBOUND_IDOC_

PROCESS )On destination

CLinks C

Comm. layer

Page 38: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3804/10/23

Dispatch controlDispatch control

Application posting

Need to create IDOC?

Create master IDOC

Customer Distribution Model

Receiver determination

Segment filter

Field value conversion

Version change

ALE layer

Dispatch controlDatabase

M

Application document posted simultaneously with IDocs

C

asynch. RFCor

EDI

Links C

asynch. RFCor

EDI

C

Comm. layer

- Technical comms parameters are Technical comms parameters are defineddefined

- EDI or aRFC (asynch. remote EDI or aRFC (asynch. remote function call)function call)

- Send immediately or cumulate Send immediately or cumulate and send via batch joband send via batch job If batch, packet size is If batch, packet size is

determineddetermined

Page 39: IDOC , ALE ,EDI

Overview of ALE/IDOCs 3904/10/23

Scenario analysisScenario analysis

• How does the IDOC look like ?

• How is data being sent ?

• How is the data being received ?

Page 40: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4004/10/23

Outbound program development

• Program logic

– “How is the IDOC being created ?”

• Triggering

– “How is the IDOC creation kicked off ?”

Page 41: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4104/10/23

Program logicProgram logic

• Select data from application tables• Fill data into IDOC • Pass IDOC to ALE layer (Call function MASTER_IDOC_DISTRIBUTE)• Commit Work

• Receiver determination• Segment filtering• Version Control• Dispatch Control

IDOC program

ALE layer

MASTER_IDOC_DISTRIBUTE

Page 42: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4204/10/23

MASTER_IDOC_DISTRIBUTEMASTER_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

Page 43: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4304/10/23

Filling an EDIDD structureFilling an EDIDD structure

Header (55bytes) SDATA (1000bytes)…. SEGNAM ….EDIDD

Z1SEGField1 Field2 Field3 Field4

“10” “ABC”

MOVE “Z1SEG” to EDIDD-SEGNAMMOVE “10” to Z1SEG-FIELD1MOVE “ABC” to Z1SEG-FIELD2MOVE Z1SEG to EDIDD-SDATA

Page 44: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4404/10/23

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

Page 45: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4504/10/23

Left-justified FillingLeft-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

Page 46: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4604/10/23

Code ConversionsCode 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’

Page 47: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4704/10/23

Basic Configuration ElementsBasic Configuration Elements

Define RFC Destinations Define Ports Maintain Customer Model Create Partner Profiles

Page 48: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4804/10/23

Maintaining RFC DestinationsMaintaining RFC Destinations

TCODE:

SM59

Page 49: IDOC , ALE ,EDI

Overview of ALE/IDOCs 4904/10/23

Displaying and Maintaining PortsDisplaying and Maintaining Ports

A port is a logical representation of a A port is a logical representation of a communication channel in SAP with communication channel in SAP with the data communicated being IDocsthe data communicated being IDocs.

 

TCODE:

WE21

Page 50: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5004/10/23

Partner ProfilesPartner Profiles

TCODE:

WE20

Page 51: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5104/10/23

Partner Profiles-InboundPartner Profiles-Inbound

Page 52: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5204/10/23

Partner Profiles-OutboundPartner Profiles-Outbound

Page 53: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5304/10/23

ALE For Transactional data ---- Output ALE For Transactional data ---- Output DeterminationDetermination

NACE

Page 54: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5404/10/23

Output Determination -- Output TypesOutput Determination -- Output Types

Page 55: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5504/10/23

Output Types -- DetailsOutput Types -- Details

Page 56: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5604/10/23

Inbound Processing

Page 57: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5704/10/23

Inbound Processing.Inbound Processing.Application posting

Field value conversion

ALE layer

Input control

Database

A

Simultaneously update IDOC's status

Comm. layer

asynch. RFCor

EDI

Version change

Segment filter

C

A

Post application document

Process IDOCSerialization

Page 58: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5804/10/23

Input ControlInput ControlApplication posting

Field value conversion

ALE layer

Input control

Database

A

Simultaneously update IDOC's status

Comm. layer

asynch. RFCor

EDI

Version change

Segment filter

C

A

Post application document

Process IDOCSerialization

- For each message type and sender For each message type and sender one can defineone can define when to process when to process

(immediate/batch)(immediate/batch) whether to call application whether to call application

directly or start customer directly or start customer workflowworkflow

who should get work items in who should get work items in case of errorcase of error

- Incoming IDOC packets are passed to Incoming IDOC packets are passed to applicationapplication

Page 59: IDOC , ALE ,EDI

Overview of ALE/IDOCs 5904/10/23

Application InputApplication InputApplication posting

Field value conversion

ALE layer

Input control

Database

A

Simultaneously update IDOC's status

Comm. layer

asynch. RFCor

EDI

Version change

Segment filter

C

A

Post application document

Process IDOCSerialization

- Inbound IDOCs are passed to Inbound IDOCs are passed to the application via a the application via a standardized function standardized function interfaceinterface

Page 60: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6004/10/23

SerializationSerializationApplication posting

Field value conversion

ALE layer

Input control

Database

A

Simultaneously update IDOC's status

Comm. layer

asynch. RFCor

EDI

Version change

Segment filter

C

A

Post application document

Process IDOCSerialization

- When processing the When processing the inbound IDOC, the inbound IDOC, the application can call an ALE application can call an ALE API (function module) to API (function module) to check that the IDOC has not check that the IDOC has not been overtakenbeen overtaken If change No. 1 arrives If change No. 1 arrives

after change No. 2, the after change No. 2, the IDOC containing it has IDOC containing it has been overtaken (by the been overtaken (by the IDOC containing the IDOC containing the later change)later change)

Page 61: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6104/10/23

FM Assignment to Message Type and FM Assignment to Message Type and IDoc typeIDoc type

TCODE:

WE57

Page 62: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6204/10/23

Process CodesProcess Codes

WE41WE42

Page 63: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6304/10/23

Process Codes in Inbound and OutboundProcess Codes in Inbound and Outbound

TCODE:

WE64

Page 64: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6404/10/23

FM For Inbound EDI FM For Inbound EDI

TCODE:

BD67

Page 65: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6504/10/23

Inbound Program DevelopmentInbound Program Development

INBOUND_IDOC_PROCESSIDOC

ALE layer

IDOC_INPUT_<MSGTYPE>

• Read IDOC data• Post Application data• Send Success info back to ALE layer

ALE configuration• Partner Profiles• Process Code• Function module attribute• Function module registry

Workflow Task

Call function

Return Variables

If ERROR, trigger

• Version change• Segment filter• Field conversion

Page 66: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6604/10/23

Basic Scenario

Direct Method Call Transaction Method

Page 67: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6704/10/23

Advanced Scenario

Mass processing Serialization Advanced Workflow

Page 68: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6804/10/23

Flow Of Program

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

Page 69: IDOC , ALE ,EDI

Overview of ALE/IDOCs 6904/10/23

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_ControlIDOC_DATAIDOC_STATUSReturn_variable

Page 70: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7004/10/23

Topics to coverTopics to cover

What is ALE ?

Components of ALE.

Anatomy of an IDoc.

ALE Processing

Transactions For Monitoring and Processing IDocs.

Questions

Page 71: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7104/10/23

Monitoring IDocsMonitoring 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.

Page 72: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7204/10/23

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

Page 73: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7304/10/23

Selection Program For Issuing Output -- Selection Program For Issuing Output -- WE15WE15

Page 74: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7404/10/23

Test Tool For Idoc Processing (WE19)Test Tool For Idoc Processing (WE19)

Page 75: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7504/10/23

Idoc Search For Business Contents Idoc Search For Business Contents (Database). WE09(Database). WE09

Page 76: IDOC , ALE ,EDI

Overview of ALE/IDOCs 7604/10/23

QuestionsQuestions