SAP IDOC Overview
SAP IDOC Overview
SAP IDOC Overview
OVERVIEW
IDoc is an SAP object that carries data of a business transaction from one system
to another in the form of electronic message. IDoc is an acronym forIntermediate
Document. The purpose of an IDoc is to transfer data or information from SAP to
other systems and vice versa. The transfer from SAP to non-SAP system is done
via EDI (Electronic Data Interchange) subsystems whereas for transfer between
two SAP systems, ALE is used.
IDoc can be triggered in SAP system or in EDI subsystem. This depends on the
direction in which IDoc is sent and is called as Inbound IDoc and Outbound IDoc
accordingly. In case of outbound flow, IDoc is triggered in SAP through document
message control which is then sent to EDI subsystem. EDI converts the data from
IDoc into XML or equivalent format and then sends the data to partner system
through Internet.
For inbound flow, EDI converts partner data and IDoc is created in SAP. After
successful processing of this IDoc, Application Document is posted in SAP.
EDI STANDARDS AND IDOC
“EDI is electronic exchange of business document between the computer systems
of business partners, using a standard format over a communication network”.
EDI stands for Electronic Data Interchange.
For transmission of information electronically, two widely used standards are
ANSI ASC X12 and EDIFACT. ANSI ASC X12 is a committee formed by
representatives of major organizations, government bodies and EDI software
companies which defines standards and guidelines for information interchange
over EDI. UN/EDIFACT stands for United Nations EDI for Administration,
commerce and Transport and was formed in 1985 using ANSI X12 and UNTDI
(United Nations Trade Data interchange) as base standards. ANSI X12 describes
business document as transactions and each transaction is represented by three
digit number e.g. 850 – Purchase Order, 855 – Purchase Order Acknowledgement.
EDIFACT describes business document as messages, represented by standard
names e.g. ORDERS for purchase order.
IDOC TERMINOLOGIES
IDOC (BASIC) TYPE
IDoc Types are based on the EDI standards and mostly on EDIFACT standards.
Basic Types (or IDoc Type) defines the structure of an IDoc. Each basic type
describes standard IDoc segments, format of data fields and their size. Basic Type
also defines number of segments and fields in an IDoc. All the fields that are
necessary for transmission of message for a particular business transaction are
mapped in different segments. It also defines the structure and relationship of
IDoc segments along with mandatory and optional segments.
IDOC EXTENSION
Basic type contains all the standard fields that are necessary for carrying out a
business transaction. However, if any additional values are to be sent to the
partner then we can make use of the IDoc Extension feature. IDoc extension is
extension of basic type and contains additional custom IDoc segments and fields
that are not available in standard basic type.
IDOC SEGMENTS
IDoc segments contain the actual data that is sent to or received from a partner.
These segments contain the actual values that are sent as part of IDoc
transmission.
PARENT AND CHILD SEGMENTS
IDoc segment is termed as Parent segment if it contains its own segments. The
dependent segments are called as child segments.
INBOUND/OUTBOUND IDOCS
IDocs sent outside the system are termed as Outbound IDocs and the ones that
are received into the system, are called as Inbound IDocs.
IDOC DIRECTION
This signifies the direction is which information is sent and is similar to
terminology used in mails. If information is sent outside the system then the
direction is outbox when it is received into the system then direction is inbox. In
SAP Outbox direction is represent by “1” i.e. outbox and Inbox direction is
represented by “2”.
PARTNER
Partner is the Business Partner with which the exchange of information is to take
place using IDoc. It can be a vendor or customer or any other system. Depending
on the direction of information in which the information is sent it plays a role of
either a “sending partner” or a “receiving partner”.
PARTNER TYPE
Partner type/role is used to identify partners within the sap systems. Partner type
is KU for customer, LI for vendor and LS for Logical System.
MESSAGE TYPE
IDoc processing involves transmission or receipt of document in the form of a
message, each of which represents a document in SAP. These documents can be
Order, Shipment Confirmation, Advance Shipping Notification, Goods Receipt, or
Invoice. Message type is associated with Basic IDoc Type (Basic Type) and
defines the kind of data or document that is exchanged with the partner.
PROCESS CODE
The process code contains the details of the Function Module that are used for
IDoc processing. Message Type can be linked to the Process code.
PORT
IDoc Port contains the information about the way data is sent between the source
or target system. The type of port defines the information contained within the
port. For port type “Internet” Port will contain IP address of the target system.
For port type “file”, directory or file name information is maintained. “tRFC” port
contains information about the RFC destination of the target system. For IDoc
transmission using ALE “tRFC” ports are used.
Separate
message type should be triggered in the purchase order for PO change. Additional
line with change message type must be added in the Message control tab with
change message indicator on.
INBOUND OPTIONS (INBOUND PARAMETERS)
For inbound options process code is maintained in the Inbound screen only. IDoc
processing can be triggered by background program and triggered immediately.
Initial Status
numbers are 64 for inbound and 03 for outbound. Successful status is 53 for
inbound and 16 for outbound IDocs.
SENDING AND RECEIVING IDOCS
TRIGGERING AN OUTBOUND IDOC
Outbound IDocs can be triggered from the output message types of Purchase
Orders, deliveries, Material Documents, invoices, etc. The following figure shows
that once the output ZXX1 of PO XXXXXXX1 is processed an IDoc
“000000XXXXXXXXX1” is added/created.
The relationship between the IDoc and the application document can be found in
two ways:
1. Relationship tab of IDoc
2. Relationship tab of Application Document, e.g. PO, SO, Material Document, etc.
A successful
outbound IDoc will pass through all the above statuses in reverse order
(01-03-18-06-12-16). Each status represents an IDoc validation step. If an IDoc
passes all the validations it would reach status 16. These different validation steps
for outbound IDocs are explained below:
01: IDoc generation successful
30: IDoc is ready to be processed by IDoc Processing job
03: IDoc data is passed to the Port
18: IDoc successfully triggered EDI subsystem
06: IDoc data translated to EDI format
12: IDoc is dispatched successfully to the partner
16: Partner has received the IDoc successfully
IDoc can possibly fail at any of the above steps during validation.
An inbound IDoc
goes through all the above statuses in reverse order (50-64-53).
IDOC PROCESSING
AUTOMATIC/IMMEDIATE PROCESSING
In this case, IDoc are processed immediately as they generated or added in the
system. The check “Transfer IDoc immediately” is selected in Outbound Options
and “Trigger Immediately” is selected in Inbound Option. These checks are
generally used when the real time information exchange is necessary between
two systems.
MANUAL PROCESSING
IDocs can also be manually processed using the TCODE BD87 in SAP.
REPROCESSING IDOCS
On the basis of IDoc statuses different programs can be used for reprocessing of
failed IDocs. These are given below:
Inbound /
Status Program for Reprocessing
Outbound
51 RBDMANI2, BD73 / RBDMANIN
56, 61, 63,
BD84 / RBDAGAI2
65
60 RBDSYNER, RBDSYNEI
IDocs remaining in status 62 is abnormal. Use program
Inbound RBDCHSTA ([Note 92552 – IDocs-Status 62 cannot be
(RBDINPUT) 62 processed||http://service.sap.com/sap/support/notes/92552]),
so that to change their status back to 64 and process them
again.
64, 66 BD20 / RBDAPP01
68 WPIE / RBDAGAIE
69 RBDAGAIE
02, 04, 05,
RBDAGAIN
25, 29
26 RBDSYNER
30 WE14 / RSEOUT00
32 WPIE / RBDAGAIE
03 -> 12 : use BD75 transaction (RBDMOIND program).
Answer from Rainer Hübenthal in SDN forum: "Idocs with with
Outbound status 03 are transferred to the tRFC queue. This does not
(RBDOUTPU) mean that they are sent out, they may stuck up on that queue
(e.g. receiver system is down) in that queue. BD75 checks if it
can find the idoc in that queue. If so, it is not beeing send and
03
status remains on 03. If it is not on the t-rfc queue, the systems
considers that this icon is sent and change the status to 12.
You can check the tRfc queue with SM58 and initiate
resending by right click choosing execute LUW.
in BD75 you can check "unsent idocs" and you will get a
similar list."
IDoc search
can also be made on the basis of ISA or Transfer file Reference.
common idocs
Program Purpose
RSEXARCA Archive IDOCs
RSEXARCD Delete archived IDOCs from the database
RSEXARCR Read the IDOCs from archive file
Retrive IDOCs from the archive into the
RSEXARCL
database
RSETESTD Delete IDOCs from Database