Вы находитесь на странице: 1из 29

ALE / EDI Training Material Preparation

IDOC Concepts

2004 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

IDOC Concepts
Audience  ABAP Consultants & Functional Consultants

Prerequisite  Introduction to ALE Technology

Extra Material: http://teams1.sharepoint.hp.com/teams/GADSCSAPTD/ABAP%20training%20material/ALE,%20EDI%20and%20IDOCS/Idoc%20Extra%20Material.ppt

page 2

IDOC Concepts
Table of Contents IDOC Definition
IDOC IDOC IDOC IDOC IDOC IDOC IDOC IDOC IDOC

IDOC IDOC IDOC IDOC

Partner Profile Outbound Status Inbound Data Flow Inbound Status

Benefits Components Message Types Process Codes Structure Types of Processing Outbound data flow Port Definition RFC Destination

page 3

IDOC Concepts - Definition


IDOC Is not a process and its an Intermediate document An IDOC is simply a data container that is used to exchange the information between any two process that can understand Syntax and semantics of the data An IDOC is created as a result of execution of an outbound ALE or EDI Process. In an inbound ALE or EDI process, an IDOC serves as an input to create application document

page 4

IDOC Concepts Data Transfer


Asynchronous Document-related

System 1
SAP Document

System 2 IDoc
Document Transaction Message

R/3 System

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


page 5

IDOC Benefits
The advantage of using the IDOC interface is that it is an open interface. It is Independent of sending and receiving applications.
y The advantage of using the IDOC interface is that it is an open interface. It is Independent of sending and receiving applications.

Communication with back level IDOCS. Custom Applications, which are developed with the previous y Exception Handling via Workflow, SAP Uses the Workflow to route the errors to the Concerned Person. version of the IDOCS, are supported. SAP Can Generate Enhance the add on (Customer) Requirements. and process back level IDOCS.

y Communication with back level IDOCS. Custom Applications, which are developed with the previous version of the IDOCS, are supported. SAP Can Generate and process back level IDOCS.

Exception Handling via Workflow, SAP Uses the Workflow to route the errors to the Concerned Person. Enhance the add on (Customer) Requirements.

page 6

IDOC Components
The IDOC Components are as follows Segments
y The advantage of using the IDOC interface is that it is an open interface. It is Independent of sending and receiving applications.

Basic IDOC Type

y Communication with back level IDOCS. Custom Applications, which are developed with the previous version of the IDOCS, are supported. SAP Can Generate and process back level IDOCS. y Exception Handling via Workflow, SAP Uses the Workflow to route the errors to the Concerned Person.

Enhance the add on (Customer) Requirements.

page 7

IDOC Concepts IDOC Segments

Control Record Data Records


E1HDDOC M 1 E1HDADR C 5 E1ITDOC M 1 E1ITSCH E1TLSUM C 1

Tree of Segments
Status Records

99

page 8

IDOC Concepts IDOC Segments

The Displayed segments are released in different versions. TCODE WE31

page 9

IDOC Concepts IDOC Segments


Each Segment has three components 1. Segment type 2. Segment Definition 3. Documentation Segment type will start with E1, Segment definition with E2 and Documentation with E3. For example if you create one custom Segment , it will create three segments starting with Z1,Z2 and Z3 respectively. Note: Segment is version dependent, once you release the Segment you cannot edit till you reset the release.

page 10

IDOC Concepts Basic IDOC Types


Basic IDOC Type is a structure of data records in the IDOC. Basic IDOC Type is a group of segments arranged hierarchically The segments maybe mandatory or Optional. While generating The IDOC Inbound or outbound ,the data should be filled in the Mandatory segments.

page 11

IDOC Concepts Basic IDOC Types

WE30

page 12

IDOC Concepts Basic IDOC Types


The popup screen shows the max , min parent segment & Level

attribute s

page 13

IDOC Concepts Message Types

WE81

Message type represents the Business process . For example ORDERS Message type for PO/Order.
page 14

IDOC Concepts Process Codes


Process Codes will be assigned in the Partner Profile. Two types of process codes are used in the Partner Profile. Outbound Process Code This Process code will be defined in the Message control of the partner profile, Outbound process will be triggered through the Message Control. The Process code names the relevant function module. Inbound Process Code Names the Function module or Workflow , which read the IDOC data and transfers the data to the application document.

page 15

IDOC Concepts IDOC Structure

Control Record

IDoc-ID Sender-ID Receiver-ID IDoc type and logical message External structure IDoc-ID Sequence/Hierarchy Segment Format definition for
header data item data

Data Record

Status Record

IDoc-ID Status information

page 16

IDOC Concepts IDOC Structure


Rules of an IDOC Only Valid segments are defined in the IDOC Type Segments may be mandatory or Optional Mandatory data should be filled Data Record repetition should not exceed the max no as Mentioned in the segment attributes.

page 17

IDOC Concepts Partner Profile

Outbound Messages

Inbound Messages

page 18

IDOC Concepts Partner Profile

PORT

IDOC Type, Extension, and View

page 19

IDOC Concepts Port Types


SAP Application IDoc Interface & ALE Services
IDoc & status IDoc & status

IDoc

IDoc

IDoc

IDoc

File + RFC

tRFC

CPI-C

MIME

ABAP

XML

EDI Any
2.1 on

ALE Any
3.0 on

R/2
3.0 on

Internet
3.1 on

Any
4.5 on

EC Any
4.6 on

page 20

IDOC Concepts Types of processing


Types of Processing Inbound Outbound

page 21

IDOC Concepts Outbound flow


SAP Application
Document

Message Control (NAST)


NAST Record Document

Programs

IDoc Interface & ALE Services


IDoc

System 2, e.g. EDI subsystem

page 22

IDOC Concepts With Stand Alone Programs


Use the Standard Programs Like BD10 for MATMAS and send
the IDOC Manually The Program will extract the data and then creates the Master IDOC using MASTER_IDOC_DISTRIBUTE. Then It will determine the no of receivers through distribution Model. For each receiver it will check the Filters, Conversions, Versions, etc For each receiver one Communication IDOC will be created and at the same time IDOC Will create in the database also After Creating the Communication IDOC it will dispatch to the target system

page 23

IDOC Concepts Message Control


Check NAST-Reord

Read Partner Profile

Call Selection Module (application)

Call ALE Service Transfer according to output mode

R S N A S T E D

1/2

3/4

Single IDoc

Batch of IDocs by RSEOUT00

page 24

IDOC Concepts Outbound Status


Status

by the SAP system: 01 IDoc created 03 Data passed to port OK 18 Triggering port OK 25 Processing despite syntax error (outbound) 26 Error during syntax check of IDoc (outbound) 29 Error in ALE service 30 IDoc ready for dispatch (ALE service) 31 Error - no further processing 37 IDoc created with errors 39 IDoc received in target system 40 Error - application document not created in target system 41 Application document created in target system 42 IDoc created by test transaction Status by the EDI subsystem: 06 Translation OK 08 Syntax check OK 10 Interchange handling OK 12 Dispatch OK 14 Interchange Acknowledgement positive 16 Functional Acknowledgement positive 22 Dispatch OK, acknowledgement still due 24 Control information of subsystem OK
page 25

IDOC Concepts Inbound Data flow


System 2, e.g. EDI subsystem
IDoc

IDoc Interface & ALE Services


IDoc + Process

SAP Business Workflow


Document

IDoc + Function Module

SAP Application

page 26

IDOC Concepts Inbound Through WF


In Process through Workflow In this

In

this process inbound process code is defined with the workflow options. The WF task could be single or multiple tasks. This will be used in EDI process not in ALE.

Use

the direct input via function call rather than Workflow for inbound processing because of the performance overhead of invoking Workflow for each inbound IDOC or IDOC packet.

page 27

IDOC Concepts Inbound Through FM


ALE reads the inbound IDOC customizing settings to determine which function module to call. ALE Layer calls the function module and given the IDOC(s) to be processed. The function module returns status information about whether the IDOC was successfully processed. If it was successfully processed, it returns the ID of the application document that was created or changed. If an error occurred while processing the IDOC, the ALE layer triggers the SAP Business Workflow event assigned to the IDOC.

page 28

IDOC Concepts Inbound Status


IDoc

added 56 IDoc with errors added 60 Error during syntax check of IDoc (inbound) 61 Processing despite syntax error (inbound) 62 IDoc passed to application 63 Error passing IDoc to application 64 IDoc ready to be passed to application 65 Error in ALE service 66 IDoc waits for predecessor (Serialization) 68 Error - no further processing 74 IDoc added by test transaction Status by the SAP system (Applications): 51 Error - Application document not posted 52 Application document incomplete posted 53 Application document posted
page 29

Вам также может понравиться