SAP IDoc tutorial


Hi Guys,

This article, i will show you overview of SAP IDoc concepts and details of IDoc structure. After this topic, functional and SAP PO consultant can understand how to do Inbound and Outbound interface via IDocs.

This article will concentrate to three points:

1.IDoc definitions

2.IDoc structure

3.Outbound | Inbound IDoc configurations

  1. IDoc definitions

IDOC is SAP’s concept of business document base on EDI (Electronic Data Interchange) standard. IDoc used in SAP to transfer data between SAP System and None-SAP System or between SAP and SAP systems.

Inbound

SAP Receive IDoc data message from partner system

Outbound

SAP Send IDoc data message to partner system

Basic Type

Basic type present as type of business transaction, there are two types of
basic type (Master data and Transaction basic types). Master data
basic type contain information of master data object, example Material master, Vendor master, Supplier master, Sales price, etc…. Transaction
basic type contain action information and behavior of object, example: Sales Order, Delivery Order, Sales Receipt, Stock Transfer Order etc…

As you see in picture below, master data basic type show as yellow box, transaction basic type show as blue box.

In SAP, one business object can be presented by many message, but why like that ?. SAP was designed for multi industrial, depend on business perspective one business object can be different meaning and information. The specific message type for each industry will help SAP send and receive data to partners system fully and consistency.

Basic type example

Message Type

Message type is abstract of basic type. SAP updated business process according business requirements, object information in IDoc also updated but still support old IDoc data structure and information.

2. IDoc Structure

To understand IDoc structure, i divided to IDoc message to three parts.

TCode: WE02, Parts of IDoc message

First part is IDoc message general, where contain information about IDoc technical description.

TCode WE02 to view IDoc data detail
1) Contain general information of Idoc message
2) Version of IDoc message
3) Type of business object

Second part, present data of IDoc message, segment is group of properties of business object have the similar characters or similar behavior. Field Name is technical name of properties and field’s value is value of property.

One field have to belong in one segment and segment can be present by hierarchy.

Third part, IDoc status, IDoc steps processing logs will be stored. Functional and Technical consultant can see detail logs to identify issue.

Tools of IDoc

IDoc definition TCodes
IDoc define: WE31
IDoc type define: WE30
IDoc document: WE60

IDoc processing TCodes
IDoc process: BD87
IDoc testing: WE19
IDoc utilities: IDoc
IDoc workbench: WE02, WE05
Search IDoc by content: WE09, WE10
IDoc statictis WE07
Delete IDoc: WE11
Process all IDoc: WE14
Ports in IDoc processing: WE21
Display outbound process code: WE41
Display inbound process code: WE42
Display partner types: WE45
IDoc status maintenance : WE47
Display texts for process code: WE50

3.Outbound | Inbound IDoc configurations

Outbound data flow

Inbound data flow

Outbound IDoc configuration steps:

Config RFC destination, TCode: SM59

What is RFC?, RFC is Remote Function Call.

SAP ERP send data out, we need define destination system via TCP/IP Protocol. Destination need provide a program which listening data from SAP ERP.

Here example, i make connection to SAP PO (Process Orchestration) system as middle ware system.

Config Port in IDoc processing, TCode: WE21

Based on connection defined in RFC configuration, we will make port for IDoc sending out.

Config partner profile to send specific IDoc, TCode: WE20

Partner profile help us define Basic Types will be used for Inbound/Outbound. With Outbound, we use “Logical System”, it is middle-ware system where connection opened in RFC destination configuration.

In outbound partner profile detail, we need to point to message type, basic type and extension IDoc if any. There are two mode of output IDoc, send immediately each time user perform send message of collect IDocs in queue and will as schedule.

In inbound partner profile, we need to indicator “Process code”. Process code is SAP Function, where perform logic to Insert / Update data to SAP ERP. There are two types of process code, standard process code by SAP or customize program developed by ABAP.

Thank you for your attention.

Cuong Dang

9 comments

Leave a Reply to Anonymous Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s