Upload
nayak4u
View
69
Download
13
Embed Size (px)
DESCRIPTION
ALE IDOC
Citation preview
© Copyright IBM Corporation 2002
IBM Confidential
ALE - IDoc
April, 2005
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 2 © Copyright IBM Corporation 2002
Course Objectives
Basic Knowledge of ALE Basic Knowledge of IDoc Useful Transactions
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 3 © Copyright IBM Corporation 2002
Introduction
ALE (Application Link Enabling) is SAP proprietary technology that enables data communications between two or more SAP systems and or R/3 and external systems.
ALE technology facilitates rapid application prototyping and application interface development, thus reducing implementation time.
No difference between EDI & ALE processing from application point of view- Applications using the EDI option in message control can also transmit via ALE.- IDOCs passed to ALE can be transmitted directly or via an EDI-subsystem
(assuming EDI message exists)
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 4 © Copyright IBM Corporation 2002
Topics of Discussion
ALE architecture ALE Scenarios ALE building blocks and concepts ALE Configuration
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 5 © Copyright IBM Corporation 2002
ALE ARCHITECTURE
Application layer- This layer provides ALE with an Interface to R/3 to originate or receive messages containing data
to or from external or other R/3 systems
Communication Layer- This layer filters and converts messages containing data based on predefined or custom defined
rule sets.
Distribution Layer- ALE communications are carried out both synchronously and asynchronously.
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 6 © Copyright IBM Corporation 2002
ALE SCENARIOS
Master Data distribution
Transactional Data distribution
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 7 © Copyright IBM Corporation 2002
ALE BUILDING BLOCKS & CONCEPTS
Logical system Message Type Idoc Type and Idoc Customer Distribution Model Filter object type and Filter objects Change Pointers Ports Process Codes Message Control and Output Type Partner Profile
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 8 © Copyright IBM Corporation 2002
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
Tcode – WE20.
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 9 © Copyright IBM Corporation 2002
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.
Tcode – WE81
Example: MATMAS is message type for Material Master
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 10 © Copyright IBM Corporation 2002
IDOC TYPE & IDOC
An IDOC type represents the structure of the data associated with a message type ( DEBMAS06 for message type DEBMAS ) while an IDOC is an object containing the data of a particular message type.
Tcode – WE30
An IDOC consists of three record types:- Control Record ( EDIDC ).- Data Record ( EDIDD )- Status Record ( EDIDS )
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 11 © Copyright IBM Corporation 2002
CUSTOMER DISTRIBUTION MODEL
It is a tool that stores information about the flow of messages across various systems
The model stores data that dictates which messages flow to which logical systems
TCODE-----> BD64
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 12 © Copyright IBM Corporation 2002
FILTER OBJECT
A filter object type is used in the Customer Distribution Model to impose a selection criterion on the message type flowing to a logical system
A filter object type with a value associated with it is called a filter object. Tcode – BD59
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 13 © Copyright IBM Corporation 2002
CHANGE POINTER
Change Pointers are R/3 objects that mark changes to SAP Master data. - Tcode – BD52
Change Pointers are managed by mechanisms in a SMD (Shared Master Data) tool and are based on Change Document Objects. Tcode – BD60
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 (Tcode – BD50) or generally (Tcode –
BD61).
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 14 © Copyright IBM Corporation 2002
PORTS
A port is a logical representation of a communication channel in SAP with the data communicated being IDOCs.
Types of Ports:- tRFC- File- R/2- Internet
ALE can use all port types to distribute IDOC EDI typically uses a File-based port TCODE -------> WE21
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 15 © Copyright IBM Corporation 2002
PROCESS CODES
Process Codes are used in ALE and EDI to identify the function modules to be invoked for subsequent processing
Tcode – BD67
Inbound interface uses a process code to determine the application module that will process the inbound IDOC. Stored in table TEDE1.
Tcode – WE42
Outbound interface uses process codes only in the case of applications that use message control. Stored in table TEDE2.
Tcode – WE41.
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 16 © Copyright IBM Corporation 2002
ALE CONFIGURATION
Define Logical systems Assign logical system to client Maintain the customer Distribution Model Creating new filter object types Maintaining the RFC destination Distribute the customer Model Generate partner profile in sending system Generate partner profile in Receiving system
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 17 © Copyright IBM Corporation 2002
IDoc (Intermediate Documents)- Overview
Messages must have a structure that is- easy to manage technically (a simple 'data container')
no problems with binary representations easy to connect to non-SAP systems
- able to contain complex data structures- extendible without reprogramming interfaces- well documented- based on EDI standards where possible
Solution: Intermediate Documents (IDocs)
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 18 © Copyright IBM Corporation 2002
Structure of an IDoc
Sender Receiver MsgType IDoc-type StatusHEADER
M 1
ITEM
M 9999
SUBITEM
M 99
ACCUM
M 1
IDoc IDoc structure
TEXT
O 9999
HEADER xxxxxxxxITEMSUBITEMSUBITEMTEXTITEMSUBITEMSUBITEM
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ACCUM xxxxxxxx
"Ready for processing" 16:22:34
"Successfully processed" 16:22:42
Control record
Data records
Status records
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 19 © Copyright IBM Corporation 2002
IDoc Structure
Intermediate Documents (IDocs) consist of three record types:
Control Record- One per IDoc
Data Record- Many per IDoc
Status Record- Several per Idoc
- E.g. 1280120, 1278575
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 20 © Copyright IBM Corporation 2002
Control Record
Control Record - table EDIDC
IDoc number Direction - inbound or outbound IDoc type IDoc structure type Receiver port/partner type/partner number Sender port/sender type/sender number
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 21 © Copyright IBM Corporation 2002
Data Records
Data Record - table EDIDD
Application header information Application line item information Application sub-line information (schedule lines, partners, tax information, text,
etc.) Summary data
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 22 © Copyright IBM Corporation 2002
Status Records
Status Records - table EDIDS
IDoc identification number Status number - table verified IDoc type Direction Data and time stamp
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 23 © Copyright IBM Corporation 2002
IDoc Types
Main component of the IDoc interface SAP standard that determines the structure and format of data for
transmission Represents a series of related business documents Various kinds in SAP (ie ORDERS01, etc)
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 24 © Copyright IBM Corporation 2002
IDoc Characteristics
An IDoc type has the following characteristics: It is partner-independent It is identical for inbound and outbound processing It is dependent only on message types It is independent of EDI standards It is independent of subsets
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 25 © Copyright IBM Corporation 2002
IDoc Types (cont)
Sample IDoc types:
Orders (ORDERS01) Material (MATMAS05) Customer (DEBMAS06) Vendor (CREMAS04) Invoice (INVOIC01) Bill of materials (LOIBOM01)
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 26 © Copyright IBM Corporation 2002
IDoc Segments
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
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 27 © Copyright IBM Corporation 2002
Structure of Segments
IDoc Segments
Header segments - (E1EDK . . .)
Line item segments- (E1EDP . . .)
Summary segments- (E1EDS . . .)
- E.g. 1280120, 1278575
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 28 © Copyright IBM Corporation 2002
IDoc Reduction and Extension
Maximal IDoc types for master data are supplied by SAP. You can create your own reduced IDoc type, by selecting only those segments
and fields which are relevant to your project. You can also create an extended IDoc type, by appending one or more
segments to an existing IDoc type. (e.g. /GLB/XGTX_YDEBMAS06) 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.
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 29 © Copyright IBM Corporation 2002
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. (e.g. EXIT_SAPLVEDA_001/002)
The ABAP code to process an IDoc extension is added within an include statement in the user exit (e.g. Include - ZXVEDU03, ZXVEDU04, ZXMGVU03,
Code - /AMS/OCA_CREDIT_ORDER_01/02)
Presentation Title | IBM Confidential | Document ID | Oct 2, 2002 30 © Copyright IBM Corporation 2002
THANK YOU !!