ALE will trigger the event inputErrorOccurred when the inbound function module's import parameter MASS_PROCESSING is set to "'X". In this case ALE is treating the inbound IDoc(s) as a packet, even if it only contains one IDoc.
Since some IDocs in a packet could be processed successfully while others fail, the export parameter WORKFLOW_RESULT cannot be used to set the container parameter RESULT. Instead, the parameter takes on different values according to the parameters used in the table Return_Variables:
Wf_param |
Value of RESULT in event container |
Error_IDOCs |
99999 |
Retry_IDOCs |
1 |
Continue_IDOCs |
2 |
Note that for a given IDoc number (in field Doc_Number), you should only use one of the above three names. The names are case sensitive.
You could use these three values as follows: inputErrorOccurred could be used to trigger a workflow, which branches according to the value of the RESULT parameter:
Result |
Action Defined in Workflow |
1 |
Retry the IDoc n minutes later, using a new task that uses the method InputBackground. This could be used to retry IDocs that failed because an application was temporarily locked by another user or process. |
2 |
Process the IDoc in some other manner. |
99999 |
Error handling, using the standard/customer task |
Parameter |
Value |
|
In_Update_Task |
" " (initial value, for example) - update task not used |
|
Call_Transaction_Done |
" " (initial value, for example) |
|
Workflow_Result |
"99999" |
|
Application_Variable |
" " (initial value, for example) |
|
Idoc_Status |
The table must contain four records with fields containing: |
|
Docnum |
Status |
|
4711 |
53 |
|
4712 |
51 |
|
4713 |
51 |
|
4714 |
51 |
|
The Msgid etc. fields of the status record for IDocs 4712, 4713 and 4714 must contain the error message. |
||
Return_Variables |
The table must contain the following five entries: |
|
Wf_param |
Doc_Number |
|
Processed_IDOCs |
4711 |
|
Appl_Objects |
1234 |
|
Error_IDOCs |
4712 |
|
Continue_IDOCs |
4713 |
|
Retry_IDOCs |
4714 |
|
If processing the inbound IDoc does not create or change an application object, the "Appl_Objects" entry can be omitted - it makes no sense without a document number. |
||
Serialization_Info |
Empty if not using serialization |
IDoc 4712 caused an error for which the event's parameter RESULT = 99999; IDoc 4713 caused an error for which RESULT = 2; IDoc 4714 caused an error for which RESULT = 1.