Idocs
Idocs
html
Idocs :
master idoc: in the outbond process all the data in sap r/3
is retreived via outbond program.after retrieving, the data
is arranged in segments in heirarichal order in an internal
table.this internal table which has segments and data is
known as master idoc.
Cheers!!
But if you haven't , make sure you do this exercise. There are plenty of step by step guides to ALE
IDocs available on the internet . Make sure you read one understand it all the way . Sending IDoc
from client 800 to say client 810 on the same server is easy . If possible ,Try an exercise in which
you send an IDoc from one system to another system.
Lets get started . Hope you get some value in these pages :)
Application layer refers to the application data ( SD , MM , FI or data for any SAP application ) . In
this layer the data is collected to be distributed and then sent to the distribution layer.
Distribution layer determines to whom should the data generated by the application layer has to be
distributed i.e. it is in the distribution layer that the recipient is determined , the data is formatted or
filtered and then an actual is created.
Communication layer takes the responsibility of delivering the Idoc to the receiving system and
communicates to the receiving system via tRFC , File ports , FTP or TCP/IP etc.
The transaction code to view an IDoc type (Basic and extension) is WE30.
Examples: ORDERS04, DEBMAS04, MATMAS04, CREMAS04.
These are all SAP standard Basic IDoc Types.
You can even have an IDoc extension in which you can use the existing Basic IDoc type and add extra
segments and fields to it. Usually we extend an IDoc when the standard SAP IDoc type is not able to
cater to the business process.
Question 4: What are the types of records in SAP ALE Idocs and where is this information stored ?
There are three types of records in SAP ALE Idocs:
Control Records: Control record information for an IDoc is stored in standard table EDIDC.
Data Records: Control record information for an IDoc is stored in standard table EDID4.
Status Records: Control record information for an IDoc is stored in standard table EDIDS.
Question 5: What is an Idoc status? What are the different types of Idoc statuses that you know ?
When an IDoc is sent from one system to another , it goes through variuos stages.The IDoc status
indicates the stage that the Idoc in currently in.
There about 75 IDoc statuses.There is no way you can remember those all .
Don't even try to ! You will probably remember only those on which you have worked .
01 IDoc generated
02 Error passing data to port
03 Data passed to port OK
The common port types are the TRFC Port and the File Port.
If both sender and receiver mention TRFC ports, data is exchanged via RFC connections.
If however , a file port is mentioned , the IDOC is written in a flat file at the specified location at the
sender system.Then a FTP transfer should be done from that location to the receiver system or a
Middleware that will send the file to the receiver system.
Question 7: What is a Message type and Idoc Type ? What is the difference between Message
type and an IDoc type?
A Message type and an IDoc type are closely related . In fact, you will find that a Message type is
always associated with an IDoc type.Whereas an IDoc type is a detailed version with all the
segments and fields , a Message type is used just to specify the kind of information that a system
can send or receive to or from another system.
If system SAP1 has a Partner Profile where it specifies MATMAS as an inbound message type , it
just means that SAP1 can receive material master data from say system SAP2.
What all fields can be sent and received will be specified in the IDoc type.
Some other message types: DEBMAS( Customers), CREMAS(Vendors) belong to the Master data.
The link between a message Type and an IDoc type is maintained in Tcode WE82.
Question 8: What is a partner profile ? What are the types of partner profiles ?
To be able to communicate with a partner via an IDoc interface, each system needs to maintain a
partner profile. A partner profile is a mechanism by which the system can specify what kind of
messages (message types) it can send or receive.
Partner profiles can be maintained in WE20.
Question 13: If you send an IDoc say 100008008 from system ECC1 to system ECC2, will the IDoc
number in ECC2 be 100008008?
No. The next number from the IDoc number range in ECC2 will be picked up.
If you wanted to reprocess the Outbound IDOC, you need to do the following steps:-
1. Execute the program RC1_IDOC_SET_STATUS by giving the idoc number, current status of the
idoc and new status 30 and remove the test run flag in the selection screen.
2. Execute the program RSEOUT00 by giving the idoc number as input. or we14
Then the outbound idoc will be reprocessed with out generating a new idoc.
- Program RSEOUT00 (to reprocess 30 status IDocs)
- Program RBDSYNER (to reprocess 26 status IDocs - Idocs with syntax error)
- Program RBDAGAIN (to reprocess IDocs with status 02, 29 - Idocs failing with error in port and
partner profile respectively)
IODC_READ_COMPLETELY
Question 15: How do you send Idoc from a program ?
MASTER_IDOC_DISTRIBUTE
'L_IDOC_SEND
Question 16: How do you achieve filtering in a distribution model ?
Segment Filtering:
Segment filtering can be achieved using transaction BD56. Here you can suppress a whole segment
irrespective of data inside it . You have to give Message Type / Sender Partner / Receiver Partner.
https://blogs.sap.com/2013/12/05/ale-idoc-with-segment-filtering/
Data Filtering:
Data filtering can be done in distribution model (BD64) where you can restrict whole IDOCS or
partials IDOCS to be send based on data in fields inside IDOC depending on whether the segment
in which you filter is at the highest level or at a lower level. For example in MATMAS if you put a filter
of E1MARCM for a particular plant, only data for this plant will go and other plants will be ignored.
Please check this link for detail information.
http://freesapabap.blogspot.in/2013/11/collective-transfer-material-master_3.html
Question 17: Can I create a flat file from an IDOC ? If Yes , How ?
In the EDI message type for the logical system you need, you must set the receiver port as file (es:
“EDISAP”) with the transaction WE20.
Question 18: You want to create and send an IDOC to another the moment a PO is created in
your system . How will you achieve this ?
Question 19: How to Reprocess Idocs in SAP?
Question 20: What is a change Pointer?
The change pointers technique is based on the change document technique, which tracks changes
made to key documents in SAP, such as the material master, customer master and sales order.
Changes made to a document are recorded in the change document header table CDHDR, and
additional change pointers are written in the BDCP table for the changes relevant to ALE.
http://freesapabap.blogspot.in/2013/11/transfer-of-material-master-from-one_3.html
With serialized message distribution, IDocs are created, sent and posted in a specific order. This prevents
errors occurring when inbound IDocs are processed. Interdependent messages can be distributed serially
in different ways, as described in the following sections.
In this Tutorial we will learn Serialization using IDOC Message types and the details steps involved.
Serialization Using Message Types
When master data is distributed, interdependent objects are often distributed together (for example,
purchasing info record is distributed with vendor and material). With serialized message distribution IDocs
are created, dispatched and posted in a specific order. The interdependency of objects is at message
type level and this avoids errors occurring during inbound processing of IDocs. Serialization groups in
which the messages to be used and the posting order is specified, are used to distribute interdependent
messages serially.
Example
If you distribute materials and the material classes, they must be distributed together. You cannot process
classification data in the receiver system, if this system does not also have the data of the material to be
classified. For this reason materials should be included with the associated classifications in a
serialization group. To use serialized distribution you must carry out the following steps in Customizing:
Steps to be followed: -
In addition to the message types used, the dispatch of the message type SERDAT must be modeled in
the distribution model.
In this section you create serialization groups and assign message types and the processing order to
each group. Both the sender and the receiver of the serialization group must know the assignments. This
means this step needs to be carried out in both the receiving system and the sending system.
Serialization groups are required to distribute interdependent objects together so that they are processed
in the correct order.
Example
The message types MATMAS (material master) and CLFMAS (classification) are assigned to a
serialization group for dispatching materials and their accompanying classifications. The message type
MATMAS is assigned the suffix 1 and the message type CLFMAS the suffix 2, so that the materials are
processed first and then the classifications.
http://saptechnical.com/Tutorials/ALE/Serialization/page1.htm
Question 22: Important tcodes in ALE Idocs.
Question 23: Important programs in ALE Idocs:
ANS : These common IDOCs reprocessing questions and answers will come in handy for those who are
supporting users who are using SAP EDI.
Any report or transaction name for reprocessing IDOC with status 52.
Run program RC1_IDOC_SET_STATUS to change the IDoc status 52 to 64 and run program RBDINPUT
to reprocess the IDoc.
1) Go to WE19 enter your IDOC number which already has status 03 and execute.
2) On the next screen, it will display the IDOC, choose appropriate button on toolbar (standard Function
Module) to process it.
3) This will generate the new IDOC similar to the one which was posted completely.
4) Now the new IDOC should have status ready (Unless you have clicked Process Immediately in WE21
for this message type, it should be execute by Background Job).
See the status of the record and process the below program using Submit report (SA38/SE38) by passing
Idoc number:
We had many idocs which failed due to syntax error. We have fixed that error and now want to reprocess
those idocs. We tried BD87 and the status is 03 but it also contains idoc 25 which we want to get rid of. Is
there any transaction / PROGRAM In R/3 by which we can get rid of 26 status and just have 03 status.
Try this Program RBDSYNEO for status 26 and it will give you the desired result. You can check this
program RBDAGAIN / Tcode BD83 for status 02, 04, 05, 25, 29.
http://www.gotothings.com/bc/programs-for-idocs-
reprocessing.htm
Process Code
The process code is having the function module attachment ...here you will get the logic for the data
population in the idocs....simply process code contains the code of the program
Process Code
Description
Outbound Process Code
This will read application data and place data in Idoc
Inbound Process Code
This will Idoc and create corresponding application data
System Process Code
This will create work item in case some error occurs in idoc / application document processing
Status Proces Code
This will handle error that occurs when a idoc is sent to some other system
EDI, stands for Electronic Data Interchange, is the electronic exchange of structured business data
between different applications. The EDI architecture consists of
EDI-enabled applications :They support the automatic processing of business transactions.
The IDoc interface: This was designed as an open interface. The IDoc interface consists of IDoc
types and function modules that form the interface to the application.
The EDI subsystem: This converts the IDoc types into EDI message types and vice versa. This
component of the EDI architecture is not supplied by SAP.
Advantages of the EDI Process
Reduced data Entry Errors
Reduced Processing cycle time
Availability of data electronic form
Reduced Paper Work
Reduced Cost
Reduced Inventories and Better Planning
Standard Means of Communicating
Better Business Processes
Competitive Advantage
ALE
PURPOSE
ALE supports the distribution of the business functions and process across loosely coupled R/3
systems. Connections from R/2 and non SAP systems is also supported.
IMPLEMENTATION CONSIDERATIONS
Distributing business applications and at the same time ensuring data consistency is practical
because:
The increasing globalization of markets has led to the physical division of organizational units.
Business processes are not restricted to one organization only and an increasing number of
customers and vendors are involved.
The performance of an R/3 System can be improved by distributing the business applications.
Features
ALE supports:
Distribution of applications between different releases of R/3 Systems
Continued data exchange after a release upgrade without requiring special maintenance
Customer-specific extensions.
Communication interfaces that allow connections to non-SAP systems.
Coupling of R/3 and R/2 Systems.
ALE has functions for controlling messages flows (Audit) and for eliminating malfunctions.
Differences between the two:
ALE is used to support distributed yet integrated processes across several SAP systems whereas
EDI is used for the exchange of business documents between the systems of business partners
ALE is SAPu2019s technology for supporting a distributed environment whereas EDI is a process
used for exchange of business documents which now have been given a standard format
Both ALE and EDI require data exchange. An Idoc is a data container which is used for data
exchange by both EDI and ALE processes.
How can I create a flat file from IDOC file generated through transaction code WE19 for outbound processing?
ANSWER:
Choose the standard outbound processing and send the created IDOC file to your file. Port type file is maintained in
transaction codes WE20 and WE21.
ANSWER:
When I am creating my distribution model and adding my Z message I do not have the option to add filter groups. How do I
create a filter group for my message?
ANSWER:
If an IDOC file fails because data within the IDOC file is not correct, is there a fast way to search for error lines within the
IDOC file?
ANSWER:
Table EDID4 includes all the header and segment data of an IDOC file. Use transaction code SE16 to data browses the
table. Another alternative is to implement transaction code WE09 or WE10. It retrieves IDOC files that match the condition
you input (e.g. segment, field and value.).
I have an ABAP program that reads several IDOC files with status 3 (port OK). After processing them I must change the
status to 6 (translation OK). Is there a function module or routine in ABAP that does this or if I should modify it directly in
table EDIDC?
ANSWER:
You should use the following function modules to change an IDOC file status: EDI_DOCUMENT_STATUS_SET,
IDOC_STATUS_WRITE_TO_DATABASE.
ANSWER:
ALE or Application Link Enabling is the technical basis for integrating business processes in a distributed system
environment. It includes developer and testing tools and preconfigured Application Link Enabling Business Processes
delivered in the standard R/3 Release. Application Link Enabling has functions for managing messaging and for handling
communication and application errors.
Is it possible to determine if the source of an IDOC file is Application Link Enabling or EDI?
ANSWER:
Yes, if the IDOC file Control is Logical System, then the IDOC file is from Application Link Enabling. Otherwise, it is EDI.
When I attempt to process an IDOC file through transaction code BD87, I receive the following error: ‘No batch data input for
screen’. Application document not posted. What am I doing wrong?
ANSWER:
Some of the SAP standard function modules for processing IDOC files internally use BDCs. The problem is with the BDC
and it could be either missing data for the screen or it could also be a pop-up message. Analyse the screen fields. You could
also reprocess this IDOC file via transaction codeWE19 instead of transaction code BD87. In transaction codeWE19 you
should tell the system to process the IDOC file in foreground and this should bring up the BDC screen.
I tried the IDOC file in transaction code BD87 in foreground but I am receiving the error message: Error during application
process. What is the problem?
ANSWER:
Before reprocessing the IDOC file, you must analyse the message of the application error to suppress the cause. You
should receive the detailed message from transaction codeBD87 by double-clicking on the status 51. For example, you may
have an error because you are attempting to post on a closed financial period. You must open the period before attempting
to process again (or create an IDOC file with a different date if your business process does not allow posting in the past.)
ANSWER:
Select the IDOC file with transaction code WE02. Double-click on the IDOC file you wish to display. On the left side, you will
have both the IDOC file content (segments) and the status history (successive status values). By clicking on the status, you
will receive even more details, such as time and user ID.
If there is an error in inbound IDOC file, can SAP send out email?
ANSWER:
It is possible to still send email by using workflow event inputErrorOccurred. For basic configuration of this event, you should
refer to SAP Help - Application Link Enabling Programming Guide - Error Handling. You may need to add an e-mail
distribution step by yourself.
ANSWER:
Status 64 means that IDOC file is waiting to be processed yet. Usually it occurs on a busy system when there are no free
resources available at the time the IDOC file arrives. Your system might not be configured to process these IDOC files
automatically when system recourses are available. Ask your BASIS to implement a SAP note dealing with the issue.
Meanwhile, you may re-process IDOC files manually via transaction code BD87 (select node/message with status64 and
click ‘Process’ button). This can also be related to workflow. Please check your event linkage. Also KBA 1776428 might be
of help.
1. What is the difference between repair and correction in sap?
3. I HAVE GENERATED AN IDOC WITH ERROR AGAIN WHEN IAM GENERATING IT.
IT IS GENERATED WITH DIFFERENT IDOC NUMBER. BUT I WANT THE SAME NO
PREVIOUSLY IT IS GENERATED?
If you use WE19 then it creates new idoc ,it gives work
flow message.
4. Suppose i was sent 10 records using outbound in ale/idoc 8 records are up dated
in data base tables what happend remaing records did not showing error in we02?
u r trying to generate the idocs with 10
records, and u find only 8 (records) idocs created rest
(records) are missing.
Check with the filter set up for the records for its
receiving partner system(logical system).
ABAP/4 memory
The contents of the ABAP/4 memory are retained only during
the lifetime of an external session (see also Organization
of Modularization Units). You can retain or pass data
across internal sessions. The EXPORT TO MEMORY and IMPORT
FROM MEMORY statements allow you to write data to, or read
data from, the ABAP memory.
If you have any error in IDOC u can edit it by using we02 tcode,
after that you can reprocess the corrected IDOC by using bd87
tcode.
9. Can we, generate i doc for more than 1 vendor.
i.e can we generate idoc for more than 1 po order?
10. How to debug IDOC manually? if i want to extend the standard IDOC say
MATMAS, where we have to write code for extension?
For errors we need to check for the status codes and cming to
debug we can debug our the assingned function module i.e
idoc_input_matmas05 or z(fun module) in case of custom and
while processing in bd87 the complete idoc can be processed
by selecting the option available.
14. Without using the distribution model, can we send data from one system to
another system by using ALE?
no we con't send.because When ever we try to send an IDOC
it checks with distribution model and is there any
filtering is defind or not, if it is defined then checks
with filter data and then it checks with reciver and
messagetype.
16. What is the main difference between interfaces and XI, I think both are cross-
applications right? What is the exclusive difference?
19. While sending idoc from receiver side i got msg type 3 and 12.but in receiver side
while executing we02, i am gettig the error no idocs selected instead of getting
msg type 53.i am simply sending a material from one client to another client?
The very first setting you need to check is in distribution
model if the message type is configured for given sending
recieving system combination.if this is correct and partner
profile is wrong, you will get an IDoc stuc in 56 status on
inbound.
You can also check in we09 with giving more details like
segment name (related to MARA table ) and the corresponding
material no. in the field for selection with MATNR.
20. How the data is coming from 3rd party system to SAP System?
Data from 3rd party can come from middleware tools like MERCATOR. Also data can from
3rd Party from email or fax also. This can be done by intergration mail system with SAP
inbox.
The usual connection for middle ware tool can be type 4 TCP/IP - depending upon the
setting of your gateway server properties one can integrate SAP with other party
Middleware systems.
21. Where to see idoc in inbound side whether it is received in receiver system or
not?
23. Can we attach more than one messages with One IDOC?
yes, we can attach more than one message types to one idoc.
For example sendor wants the records on both material and
purchase at same time then we need to add two message types
to one idoc.
24. Which type of workprocess can execute only once in r/3 system(sap)?