Ale Idocs in Sap
Ale Idocs in Sap
ALE IDocs in SAP is a lot about configuration and a lot about Tcodes . So if you have worked on
at least one end to end scenario in ALE IDocs in SAP , you probably already have answers to
a lot of questions.
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 EDIDD.
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.
So If system SAP1 has a Partner Profile where it specifies MATMAS as an outbound message
type , it just means that SAP1 can send material master data to say system SAP2.
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 12: Can you edit IDoc content for successful IDocs ?
No. You cannot.
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.
Yes,That for Java mapping and abap mapping, the target data type (messag type) is just a dummy
one, the real (XML) message the receiver will recieve is the one (stream) produced by the java or
abap mapping.
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 ?
Use t.code BD87 to reprocess the IDOC. To find the IDOC number, you can use t.code WE05.
Question 20: What is a change Pointer?
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.
Where can I find documentation on what each qualifier is and what is mandatory for message types in general?
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.).
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.
11. Error in Inbound IDOC File
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.