You are on page 1of 104

ALE IDocs

© 2010 Wipro Ltd – Internal and Restricted


Agenda

1 Introduction to ALE, EDI & IDOC

2 IDOCs

3 Components of ALE

4 ALE Configuration

5 Filters & Conversions

6 Monitoring IDOCs

2
© 2010 Wipro Ltd – Internal and Restricted
1. Introduction to ALE, EDI, IDOC

3
© 2010 Wipro Ltd – Internal and Restricted
Why Distributed Applications?

MM-
GL
PUR
PS

PP
CO
SD-
MM- SHP
INV
SD-
ORD

MM-
INV

 One central system is not always optimal for unifying business


processes with integrated applications
4
© 2010 Wipro Ltd – Internal and Restricted
What is ALE?

 Application Link and Enabling

 ALE is SAP’s proprietary technology for integrating/ distributing


business processes across several SAP systems

 Applications are integrated by messaging, not through a single


common database

5
© 2010 Wipro Ltd – Internal and Restricted
Distributed Business Processes

 Financials
 Central controlling
 Central SOP
 Information Systems:
 Inventory
 Purchasing
 Sales
 Central purchasing  Sales, shipping and
 PP  Reference system for billing
 Inventory management Master Data and Control  Purchasing of
 Internal sales, shipping Data trading goods
and billing  Inventory management
 Local purchasing  Local controlling
 PM
 Local SOP

6
© 2010 Wipro Ltd – Internal and Restricted
Why ALE?

 ALE can integrate business processes between R/3 Systems and


non-R/3 systems as well as between R/3 Systems.

 Data is exchanged asynchronously, whereby the data arrives in the


receiver system, even if the receiver system cannot be connected to
at the time the data is sent.

 ALE uses synchronous communication for reading data only.

 Message distribution is based on IDocs. IDocs are created and


dispatched in distributed systems using message types and SAP
business object methods (BAPIs).

7
© 2010 Wipro Ltd – Internal and Restricted
A Typical Business Scenario

Transaction Data Messages

BLAORD,
HEAD QUARTERS
BLAOCH  Financials
 Centralpurchasing
BLAREL
 Purchasing info.
EKSEKS
system
FIDCMT

FIROLL

BLAOR.. Blanket order/changes


PRODUCTION BLAREL Release statistics
EKSEKS Purchasing information
Local purchasing, invoice verification FIDCMT A/C receivable
FIROLL G/L rollup

8
© 2010 Wipro Ltd – Internal and Restricted
Example

9
© 2010 Wipro Ltd – Internal and Restricted
What is EDI?

 Electronic Data Interchange

 An internationally recognized standard for formatting and


exchanging information

 EDI Standards and Formats


– The main EDI standard is EDIFACT - the UN supported International
Standard

– There are also Industry subsets (EANCOM, EDIFICE etc.) of the


EDIFACT Standard

– Other common Standards include ANSI X.12 (American),


TRADACOMS (British), ODETTE (European Motor Trade), GENCOD
(French) and VDA (German).

10
© 2010 Wipro Ltd – Internal and Restricted
EDI Process

 The EDI enabling software converts the appropriate data into an EDI
format, conforming to the Standard agreed between the two
organizations
 This EDI data is transmitted using a mutually agreed electronic
communications method
 On receipt of the EDI data, the recipient organization, using its own
EDI enabling software, translates the data back into a format which
can be used by its own business application.
 EDI subsystem – A software component that converts in house
formats to standard EDI structures. An EDI subsystem, therefore, is
a link in an EDI communication chain.

11
© 2010 Wipro Ltd – Internal and Restricted
Differences between ALE & EDI

ALE EDI
1. Used from SAP to SAP systems 1. Used from SAP to Non-SAP
systems
2. Uses tRFC ports 2. Uses File ports
3. Data stored in memory buffer 3. Data stored in files
4. Uses R/3 connection 4. Uses TCP/IP Connection
5. Uses IDOC to transfer data 5. Uses EDI subsystems to transfer
data

12
© 2010 Wipro Ltd – Internal and Restricted
IDoc’s

13
© 2010 Wipro Ltd – Internal and Restricted
IDoc

 Intermediate Documents

 An IDoc is a container for exchanging data between R/3, R/2 and


non-SAP systems.

 ALE uses IDocs to exchange data between logical systems. Non


SAP-systems can use IDocs as the standard interface for data
transfer.

 IDocs are created by message types and (object) methods when


data is to be distributed.

 An IDoc is a runtime instance of an IDoc Type

14
© 2010 Wipro Ltd – Internal and Restricted
IDoc (Contd.).

 Master IDoc

– Stored in temporary storage areas

– Only 1 Master IDoc generated for any number of receivers for the same
data

 Communication IDoc

– Stored in the database

– Number depends on the number of receivers for the same data

15
© 2010 Wipro Ltd – Internal and Restricted
Structure of an IDoc

16
© 2010 Wipro Ltd – Internal and Restricted
Structure of an IDoc (Contd.).

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

17
© 2010 Wipro Ltd – Internal and Restricted
Runtime Components of an IDoc

 There are three types of records


– Control Record
– Data Record
– Status Record

 Control Record - contains the key information like RFC destination,


IDoc type, message type, port and sender information.

 Control records are of EDIDC type of structure

18
© 2010 Wipro Ltd – Internal and Restricted
Record types in an IDoc

19
© 2010 Wipro Ltd – Internal and Restricted
Record types in an IDoc (Contd.).

 Data Records - This contains two parts


– Administrative Section and
– Data Section

 Administrative Section consists of Idoc number, Segment Name,


Segment number, Version, Segment Hierarchy etc.

 Data Section contains the data of respective segment

 Data records are of EDIDD type of structure

20
© 2010 Wipro Ltd – Internal and Restricted
Record types in an IDoc (Contd.).

 Status Record - whenever IDoc processing takes place, system will


generate status records.

 We can identify the process with the number of status record.


– 01 - 49 for Outbound Process
– 50 - 75 for Inbound Process

 When IDoc is processed the messages are:


– 01 - IDoc is created
– 30 - IDoc is ready for dispatch
– 03 - IDoc is processed

21
© 2010 Wipro Ltd – Internal and Restricted
3. Components of ALE

22
© 2010 Wipro Ltd – Internal and Restricted
ALE Components

 Logical System
 Message Type
 IDoc Type and IDoc
 Segment Type
 RFC Destination
 Ports
 Partner Profiles
 Process Codes
 Customer Distribution Model

23
© 2010 Wipro Ltd – Internal and Restricted
Logical System

 A logical system ( LS ) is the representation of an R/3 or external


system in SAP R/3 for the distribution of data to and from the R/3
system.

 The systems involved in distributed processing are assigned a


logical name, which uniquely identifies a system in a distributed
environment.

 The name can have up to 10 alphanumeric characters.

 Is configured through transaction SALE.

24
© 2010 Wipro Ltd – Internal and Restricted
Message Type

 A message type represents the application message exchanged


between R/3 systems and R/3 and an external system. A message
type characterizes the data sent across systems and relates to the
structure of the data called an IDOC type.

 Examples
– MATMAS – Material Master
– DEBMAS – Customer Master
– CREMAS – Vendor Master
– GLMAST – General Ledger Master
– ORDERS – Sales Order

25
© 2010 Wipro Ltd – Internal and Restricted
IDoc Type & IDoc

 An IDOC type represents the structure of the data associated with


a message type ( DEBMAS02 for message type DEBMAS ) while
an IDOC is an object containing the data of a particular message
type.

 Every IDoc is identified by a 16 digit unique number

 An IDOC consists of three record types:


– Control Record ( EDIDC ).
– Data Record ( EDIDD )
– Status Record ( EDIDS )

 The IDoc structure consists of several segments, and segments


consist of several data fields.
26
© 2010 Wipro Ltd – Internal and Restricted
Segment

 A Segment defines the format and structure of a data record.


 A segment in SAP system is technically implemented as three
physically separate pieces.
– Segment type
– Segment definition
– Segment documentation
 Collection of data fields filled with alphanumeric characters
 Non character values (ie floating point) have to be converted to
alphanumeric characters
 Fields are aligned left
 Currencies, countries and units of measure have to be named in ISO-
codes
 The complete data in a segment can have a maximum length of 1000
bytes

27
© 2010 Wipro Ltd – Internal and Restricted
Segment (Contd.).

 Segment Type
– Segment Type is the version independent name of the segment.
– SAP segment type starts with E1.
– Custom-defined segment types begin with Z1.

 Segment definition
– Segment definition is the version dependent name.
– SAP segment definition starts with E2.
– Custom-defined segment definitions start with Z2.
– Automatically assigned by the system from Segment Type.
– The last three Characters represent the version of the segment.

28
© 2010 Wipro Ltd – Internal and Restricted
Example of Segment

MONREP04 IDOC type SEGMENTS

E1EMHDR LNAME FNAME SSN DOB


(10) (10) (11) (8)

E1WKDET WEEKNO TOTHOURS HRLYRATE


(1) (3) (3)
E1CLDET CLSITE WORKDESC
(20) (40)

TOTHOURS TOTAMOUNT
EISUMRY (3) (10)

29
© 2010 Wipro Ltd – Internal and Restricted
RFC Destination

 Remote Function Call (RFC) is the standard SAP interface for


communication between SAP systems.

 The RFC(Remote Function Call) destination is a logical name used


to define the characteristic of a communication link to a remote
system on which a function needs to be executed.

 The parameters of the connection are mentioned in the form of a


Destination

 Destination defines the type of Connection, the partner program,


the target system

 Transaction SM59 can be used for its configuration.

30
© 2010 Wipro Ltd – Internal and Restricted
Ports

 A port is a logical representation of a communication channel in SAP


with the data communicated being IDOCs.

 A port defines the medium in which data is exchanged between the


two systems.

 Transaction WE21 is used for configuration.

 Types of Ports:
– tRFC ports used for ALE communication
– File ports used by EDI
– R/2 system ports - communicate with R/2 systems
– Internet ports - connect with Internet applications.

31
© 2010 Wipro Ltd – Internal and Restricted
Partner Profiles

 A partner profile specifies :


– Characteristics of data that you exchange with a business partner.
– Mode of operation.
– Person responsible for handling errors for that business partner

 In ALE, a partner is a remote SAP system or legacy system with


which you exchange data.

 Transaction WE20 can be used for its configuration.

 In EDI, a partner can be a customer, vendor, bank, or any entity with


which your company does business.

 Partner profile of type LS (Logical System) is used for ALE


communications.
32
© 2010 Wipro Ltd – Internal and Restricted
Process Codes

 Process Codes are used in ALE and EDI to identify the function
modules to be invoked for subsequent processing

 Inbound interface uses a process code to determine the application


module that will process the inbound IDOC. Stored in table TEDE1.

33
© 2010 Wipro Ltd – Internal and Restricted
Customer Distribution Model

 Models a distributed environment in which one specifies various


messages exchanged between sending & receiving systems.

 A customer model is maintained on only one system. It is distributed


to other systems for use.

 Two models cannot distribute the same message between the same
set of senders & receivers.

 The client on which you create a model becomes the owner of the
model.

34
© 2010 Wipro Ltd – Internal and Restricted
4. ALE Configuration

35
© 2010 Wipro Ltd – Internal and Restricted
ALE Process Flow

Application Layer Distribution / ALE Layer Communication


Layer

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

Carrier

Application Application
Filter/Convert
Data Comm.
Functions
Data IDOC

36
© 2010 Wipro Ltd – Internal and Restricted
ALE Configuration

 Inbound Configuration

 Outbound Configuration

37
© 2010 Wipro Ltd – Internal and Restricted
Configuration Steps

 Define Logical Systems (SALE or BD54)

 Assign Logical Systems to Clients (SALE or SCC4)

 Create RFC Destination (SM59)

 Define Port Definition (WE21)

 Generate Partner Profile (WE20)

 Maintain Distribution Model (BD64)

38
© 2010 Wipro Ltd – Internal and Restricted
Defining Logical System - Outbound

 Go to TCode SALE OR Tcode BD54

39
© 2010 Wipro Ltd – Internal and Restricted
Allocate Logical System to Client - Outbound

 Go to TCode SALE OR TCode SCC4

40
© 2010 Wipro Ltd – Internal and Restricted
Create RFC Destination - Outbound

 T Code SM59
 Select ABAP Connections and click on Create

41
© 2010 Wipro Ltd – Internal and Restricted
Create RFC Destination (Contd.).

42
© 2010 Wipro Ltd – Internal and Restricted
Define Port Definition - Outbound

 T Code WE21
 Select Transactional RFC and click on Create

43
© 2010 Wipro Ltd – Internal and Restricted
Define Port Definition (Contd.).
 Ports can be created in two ways:

 Generate port name – System generates a port name


 Own port name – User has the provision to enter their own name

44
© 2010 Wipro Ltd – Internal and Restricted
Define Partner Profiles - Outbound

 T Code - WE20
 Select Partner type LS and Create

 Enter the partner number and configure the outbound parameter

45
© 2010 Wipro Ltd – Internal and Restricted
Define Partner Profiles (Contd.).

 Enter the Message Type, Receiver port name, Output Mode & Basic
Type

46
© 2010 Wipro Ltd – Internal and Restricted
Defining Logical System - Inbound

 Go to TCode SALE OR Tcode BD54

47
© 2010 Wipro Ltd – Internal and Restricted
Assign Logical System to Client -
Inbound
 T Code SALE OR SCC4

48
© 2010 Wipro Ltd – Internal and Restricted
Define Partner Profile - Inbound

 T Code WE20
 Configure the inbound parameters
 Enter the Message Type and Process Code

49
© 2010 Wipro Ltd – Internal and Restricted
Maintain Distribution Model

 Transaction BD64
 Create Model View
 Add Message Type
 Generate Partner Profiles
 Distribute Model View

50
© 2010 Wipro Ltd – Internal and Restricted
Maintain Distribution Model (Contd.).

 Save Model View

 Goto Environment -> Generate Partner Profiles

 Execute

51
© 2010 Wipro Ltd – Internal and Restricted
Maintain Distribution Model (Contd.).

 Go to EDIT -> Model View -> Distribute

52
© 2010 Wipro Ltd – Internal and Restricted
Standard Transactions – BD10, BD12,
BD14

53
© 2010 Wipro Ltd – Internal and Restricted
Check Idoc Status

 Go to T Code WE05
 Check for your IDOC
 If the Output Mode
has been specified as
Transfer immediately,
the status will be 03.
If Collect IDOC’s has
been selected, the
status will be 30.
In that case the program
RSEOUT00 needs to
be executed to change
the status to 03

54
© 2010 Wipro Ltd – Internal and Restricted
IDoc Status Numbers

55
© 2010 Wipro Ltd – Internal and Restricted
Change Pointers

 Change Pointers are R/3 objects that mark changes to SAP Master
data.

 CD objects record the changes in table CDHDR & CDPOS.

 Internal mechanisms update table BDCP & BDCPS which host the
change pointer.

 Activate change pointers for message type or generally.

56
© 2010 Wipro Ltd – Internal and Restricted
Change Pointers - Configuration

 Enable Change Pointers globally


 Transaction – BD61

57
© 2010 Wipro Ltd – Internal and Restricted
Change Pointers – Configuration
(Contd.).
 Enable Change Pointer for a Message Type
 Transaction BD50

 Change pointer Configuration has to be done in Receiver system


also

58
© 2010 Wipro Ltd – Internal and Restricted
IDoc Processing – Change Pointers

 Execute program RBDMIDOC to generate idocs by processing


change pointers. Check the idoc status and take appropriate action.

 Go to T Code SE38
 Execute the program RBDMIDOC
 Specify the Message Type

 All the Changes associated with the message type are converted to
IDocs.

59
© 2010 Wipro Ltd – Internal and Restricted
Output Types / Message Control

 This type of Configuration is used for sending Transactional data


 Go to Transaction NACE

60
© 2010 Wipro Ltd – Internal and Restricted
Output Types / Message Control
(Contd.).
 Select the row “EF Purchase Order” and click on “Procedures”

61
© 2010 Wipro Ltd – Internal and Restricted
Output Types / Message Control
(Contd.).

62
© 2010 Wipro Ltd – Internal and Restricted
Output Types / Message Control
(Contd.).
 Now click on “Processing Routines” on the left hand side
 Ensure that there is an entry for Medium ‘A’ (Distribution ALE).

63
© 2010 Wipro Ltd – Internal and Restricted
Partner Profiles – Message Control

 In addition to configuring the Partner profiles, you need to configure


the Message Control.

64
© 2010 Wipro Ltd – Internal and Restricted
Customized Approach

 When the standard components provided SAP do not our


requirements we go in for a Customized Approach by creating the
Message Type, Segments, IDoc Type.

 Based on the requirements you may have to:


– Create a Message Type
– Create Segments
– Create an IDoc Type
– Assign IDoc Type to Message Type

65
© 2010 Wipro Ltd – Internal and Restricted
Create Message Type - Outbound

 Transaction WE81

66
© 2010 Wipro Ltd – Internal and Restricted
Create a Segment - Outbound

 Transaction WE31

67
© 2010 Wipro Ltd – Internal and Restricted
Create a Segment – Outbound (Contd.).

68
© 2010 Wipro Ltd – Internal and Restricted
Create a Segment – Outbound (Contd.).

69
© 2010 Wipro Ltd – Internal and Restricted
Create an IDoc Type - Outbound

 Transaction WE30

70
© 2010 Wipro Ltd – Internal and Restricted
Create an IDoc Type – Outbound
(Contd.).

71
© 2010 Wipro Ltd – Internal and Restricted
Create an IDoc Type – Outbound
(Contd.).

72
© 2010 Wipro Ltd – Internal and Restricted
Create an IDoc Type – Outbound
(Contd.).

73
© 2010 Wipro Ltd – Internal and Restricted
Assign IDoc Type to Message Type -
Outbound

 Transaction WE82

74
© 2010 Wipro Ltd – Internal and Restricted
Other Configuration Steps - Outbound

 Create RFC Destination - SM59

 Create Port – WE21

 Create Partner Profile – WE20

75
© 2010 Wipro Ltd – Internal and Restricted
Standalone Program

 A standalone executable program needs to be created

 The application program takes care of distributing the data

 Uses the function module ‘MASTER_IDOC_DISTRIBUTE’ to


distribute the data

76
© 2010 Wipro Ltd – Internal and Restricted
Inbound Configuration

 Create Message Type

 Create Segment

 Release Segment

 Create IDoc Type

 Release IDoc Type

 Assign IDoc Type to Message Type

 Creation of Partner Profiles

77
© 2010 Wipro Ltd – Internal and Restricted
Create Function Module

 Remote-enabled function module to upload the data into the


database

 Takes care of reading the data from the IDOC generated in the
receiver system

 Function module assigned to a Process code

 Assign Characteristics of Function Module – BD51

 Assign Function Module to Message Type & IDoc Type – WE57

78
© 2010 Wipro Ltd – Internal and Restricted
Create Process Code

79
© 2010 Wipro Ltd – Internal and Restricted
IDoc Extension

 An SAP IDoc structure can be extended by appending new sub-


segments with additional data.
 Adding fields to original SAP segments is not allowed.

 Transaction: WE30.

 Dynamic menu: Transaction SALE; Extensions; IDoc types; Maintain


IDoc type.

 Menu path: Tools -> Administration; Administration -> Process


Technology; IDoc -> IDoc Basis; Development -> IDoc types.

80
© 2010 Wipro Ltd – Internal and Restricted
IDoc Extension (Contd.).

81
© 2010 Wipro Ltd – Internal and Restricted
IDoc Extension (Contd.).

82
© 2010 Wipro Ltd – Internal and Restricted
IDoc Extension (Contd.).

83
© 2010 Wipro Ltd – Internal and Restricted
IDoc Extension (Contd.).

IDOC EXTENSIONS IN INBOUND AND OUTBOUND


TRANSACTIONS
 To post and extract data to and from an IDoc extension, find a user
exit in the application code.
 User exits are found in the function modules, which are tied to the
process codes used by ALE.
 The ABAP code to process an IDoc extension is added within an
include statement in the user exit.

84
© 2010 Wipro Ltd – Internal and Restricted
IDoc Reduction

 Transaction: BD53.
 Dynamic menu: transaction SALE; Distribution scenarios; Master
data distribution; Reduce IDoc types for master data.

 Creating a New Message Type

85
© 2010 Wipro Ltd – Internal and Restricted
IDoc Reduction (Contd.).

86
© 2010 Wipro Ltd – Internal and Restricted
IDoc Reduction (Contd.).

87
© 2010 Wipro Ltd – Internal and Restricted
IDoc Reduction (Contd.).

88
© 2010 Wipro Ltd – Internal and Restricted
IDoc Reduction (Contd.).

89
© 2010 Wipro Ltd – Internal and Restricted
5. Filters & Conversion

90
© 2010 Wipro Ltd – Internal and Restricted
Conversions

 Conversions are defined in ALE configuration in 3 steps

– Define Conversion Rule

– Create the Conversion Rule

– Assign the Conversion Rule to a Sender Receiver Combination

91
© 2010 Wipro Ltd – Internal and Restricted
Define Conversion Rule

92
© 2010 Wipro Ltd – Internal and Restricted
Maintain Conversion Rule

93
© 2010 Wipro Ltd – Internal and Restricted
Maintain Conversion Rule (Contd.).

94
© 2010 Wipro Ltd – Internal and Restricted
Assign Conversion Rule

95
© 2010 Wipro Ltd – Internal and Restricted
Filters

 Filters can be set in the ALE configuration in the many ways:


 Segment Level Filtering
 Field Level Filtering
 Filters in the Distribution Model

96
© 2010 Wipro Ltd – Internal and Restricted
Filters in Distribution Model

97
© 2010 Wipro Ltd – Internal and Restricted
Filters in Distribution Model (Contd.).

98
© 2010 Wipro Ltd – Internal and Restricted
6. Monitoring IDoc’s

99
© 2010 Wipro Ltd – Internal and Restricted
Status Monitor of IDoc

 Transaction BD87

100
© 2010 Wipro Ltd – Internal and Restricted
Transaction WE14

101
© 2010 Wipro Ltd – Internal and Restricted
Transaction WE19

102
© 2010 Wipro Ltd – Internal and Restricted
IDoc Status – WE47

103
© 2010 Wipro Ltd – Internal and Restricted
Thank You

© 2010 Wipro Ltd – Internal and Restricted

You might also like