Escolar Documentos
Profissional Documentos
Cultura Documentos
Applies to:
ECC 6.0.
Summary
Through this document the reader will be able to get a detailed idea about the working of the Workflow
whenever an error occurred in the ALE Idoc. The idoc at the receiving system will be validated and
correspondingly a workflow will be triggered whenever there is an error occurred in the idoc.
Author Bio
Abhijit Daptary is presently working in Capgemini Consulting India Pvt. Ltd as a Consultant. He has
experiences in ABAP, Workflow and XI. He has worked in different fields of and has handled various
scenarios on Workflow and XI.
Sunil Ojha is a XI certified workflow consultant. His current engagement is with Capgemini
Consulting India Pvt. Ltd.
Siddharth Samal presently working in Capgemini Consulting India Pvt. Ltd as a Consultant. He has
experiences in ABAP/Workflow.
Table of Contents
ALE Configuration...............................................................................................................................................3
Idoc Administrator ...........................................................................................................................................4
Receiver of Notifications .................................................................................................................................5
Application Processing Errors ............................................................................................................................7
Error Handling Through the Creation of Work Item............................................................................................7
Locating the Error Handling Task ...................................................................................................................8
Activating the Event Linkage...........................................................................................................................9
Assigning the Possible Agents........................................................................................................................9
Triggering IDOC Error Workflow with Custom Business Object.......................................................................10
Error Handling Through Triggering the Event in Process Code .......................................................................10
Flow of the Process in the Inbound System .....................................................................................................14
Diagram Describing the Flow of Process in Inbound System ..........................................................................17
Creation of the Workflow and Corresponding Linkage with Event ...................................................................17
Related Content................................................................................................................................................24
Disclaimer and Liability Notice..........................................................................................................................25
ALE Configuration
This section describes the configuration specific to ALE processing.
There are five places in the message transmission process where something can go wrong in the
transmission of a message with ALE:
1. Reading the outbound partner profile.
2. Sending the IDoc to the receiving system.
3. Reading the inbound partner profile. This may be a configuration problem or an invalid
received IDoc (syntax error or invalid control information)
4. Calling the application function.
5. Posting the record to the receiving database. This is generally a logical error, involving a
problem with configuration or with a process problem (such as a customer on credit hold).
The first four possible errors are technical errors, involving the distribution of the IDoc without regard to its
business contents. An error in posting the IDoc is a logical or functional error, involving a problem with the
contents of the IDoc itself, rather than its transfer. We will normally send technical and functional error
notifications to different people in an organization.
We can configure Workflow error handling in each of these five error situations. This table lists the areas of
Workflow configuration for each possible error situation:
In each case, we can define one or more possible agents to execute the corresponding error-handling task.
We can use any of the organizational objects to do this. That is, we can assign all of the members of an
organizational unit, a position, or a job to the task, or we can assign a single user or person.
The next sections describe these configurations in detail.
• Idoc Administrator
• Receiver of Notification
Idoc Administrator
Transaction: OYEA
Men Path: SALE Æ Error Handling Æ IDoc Administration
The IDoc administrator, called the EDI Administrator in earlier versions, is the agent responsible for
handling IDoc errors when no partner profile is available. We can set a single organizational unit, position,
job, user, or person as the IDoc administrator. On the outbound system, this error generally indicates a
misconfigured system, where a required partner profile is missing. On the inbound system, this error
probably indicates that the system received an unexpected message type, or a message from an unknown
partner.
The administrator will typically fix the configuration error, and then submit the IDoc for reprocessing.
The following table describes each of the error-related fields on this screen:
Field Description
Recipient type The type of organizational object used to identify the
possible agents. This can be an organizational unit, a
job, a position, a person, or a user.
Identification The organizational object (job, position, etc.) whose
members we want to notify of an error.
Max number of syntax errors The maximum number of IDoc syntax error status
records to write to the IDoc.
Suppress warnings for status If we select this checkbox, the system will not trigger
processing error handling for errors involving the IDoc’s status
records.
Note: You must maintain the IDoc administrator on each system involved in IDoc transfer. You cannot use CTS to
transport the settings.
Receiver of Notifications
A Receiver of Notifications is responsible for handling errors in using a partner profile. In this case, the
partner profile exists, and the system can read it properly, but there is a problem in sending the IDoc
(outbound) or passing it to the application (inbound).
There are four places to define a receiver of notifications:
The partner profile overview screen
Individual partner profile entries for Message Control
Individual partner profile entries for Outbound Parameters
Individual partner profile entries for Inbound Parameters
If an appropriate partner profile exists for the message, but it does not have an entry for the message type in
question, then the system will notify the receiver of notifications listed on the overview screen. If the
individual message type entry does exist, then the system will notify the receiver of notifications configured
for that message type.
To designate a receiver of notifications, use the partner profile maintenance transaction WE20, on the Post
processing: permitted agent tab.
The following table describes each of the error-related fields on this screen:
Field Description
Typ The type of organizational object used to identify the
possible agents. This can be an organizational unit, a
job, a position, a person, or a user.
Lang. The language to use for the message sent to the
receiver.
ID The organizational object (job, position, etc.) whose
members we want to notify of an error.
The screens for the individual message types (Message Control and In/Outbound Parameters) have the
same fields.
This is an SAP-supplied Workflow task, called “MATMAS input error”. It uses the business object
IDOCMATMAS and its method INPUTFOREGROUND.
To configure the error processing for this error, we must activate the event linkage for the triggering event
and designate the possible agents for the Workflow task. The possible agents can be organizational units,
positions, jobs, users, or persons.
• Locating the Error Handling task
• Activating the Linkages
• Assigning the Possible agents
First, you must locate the SAP-supplied task for handling errors in the IDoc type in which you are interested.
1. Execute transaction PFTC_DIS.
2. Enter “Standard Task” under Task type. This indicates a standard single-step task (as opposed to a
multi-step workflow).
3. Put the cursor in the Task field and use the drop-down (or press F4) to activate the search. Type the first
few letters of the name of the task and press Enter. Most task names begin with the message type they
handle. For example, the material master task is "MATMAS input error".
4. Alternatively, you can click on Structure search to bring up the Application Hierarchy. Find the desired
task in the hierarchy. Application error handling tasks are generally in the corresponding hierarchy
section, while ALE-specific tasks (e.g. Fetch messages) are in the ALE section. For example, you will
find the MATMAS error-handling task under Logistics – General Æ Logistics Basic Data Æ Material
Master Æ Standard task Æ MATMAS input error. Double click on the task you want to copy it to the task
maintenance screen.
To activate the event linkage click on Triggering events, then click on the activation button to the left of the
event. This button will be green if the event is active, gray if not.
That’s it! Inbound processing errors should now trigger the Workflow task.
After complete creation of the BOR object set the status of the BOR object to release.
It is required to have two events corresponding to Start and Stop event. This is because whenever and event
is being called it does not start until another event is being called. So, it is necessary to create two events
corresponding to start and stop event.
The error handling is being done in the Inbound system. In the Inbound system the idoc is being processed
by the Inbound Process code. The process code is being created through the transaction WE42
Go to the change mode and click the New Entries button for creating new process code.
Enter the Process Code Name, description and choose the processing type as Processing by function
module. Click on the extension button of Identification.
The details for the of the Process Code after clicking the identification button will be
Enter the function module name, the Object type, the start event and the end event for the error handling.
Click the SAVE button for saving the process code. The Start event and the end event will be triggered by
the SAP itself.
Since, it is and inbound scenario so the message type and the corresponding process code will be
maintained for the Inbound Parameters.
Click on Create Inbound Parameters button for creating new Inbound Message type and the corresponding
message type.
Click on activate, it will ask for the package and an alias name. Enter the alias name and the corresponding
package and activate the workflow.
Since, the workflow is being triggered by the event so it is required to attach the workflow to the event. The
event can be attached to the workflow by clicking the Basic Data button.
On clicking the Basic Data button the following screen will appear. Go to the Start Event tab.
Enter the details of the event with which the workflow should be linked like the category, BOR object type
and the event with which that should be linked.
Click on the Binding Button for generating the binding between the event and the workflow.
After the successful linkage the following sign will appear on the workflow.....
After the successful linkage of the workflow with the event and corresponding configuration of the event at
the process code level. It is required for the SAP system to trigger the event at the error condition. In order to
trigger the event it is required to set certain parameters for the standard SAP system to trigger the event.
The parameters to be set is workflow_result
If the parameter workflow_result is being set to 0 then the standard system will not trigger the workflow
otherwise if that parameter workflow_result is set to 9999 then it will stop the processing and trigger the error
handling event which in turn trigger the error handling workflow.
Here, the process code function module is setting the parameter workflow_results to 9999, which is actually
triggering the event for the error handling.
So, whenever there is an error in the idoc the event will be triggered and the corresponding Idoc will be
triggered which will be sending a mail to the respective person.
Related Content
• http://help.sap.com/saphelp_nw04/helpdata/en/fb/135962457311d189440000e829fbbd/frameset.htm
• http://help.sap.com/saphelp_erp2005vp/helpdata/en/92/bc26a6ec2b11d2b4b5006094b9ea0d/frames
et.htm
• http://www.sapdevelopment.co.uk/
• https://www.sdn.sap.com/irj/sdn
• http://www.saptechnical.com/Tutorials/Workflow/WorkflowTutorialOne/WorkFlowTutorial1.htm