In addition to the Stop Processing on Error checkbox on action function level, a Stop Processing on Error checkbox can also be selected in the Assign Actions activity of the Define Structure Mappings in AIF Customizing. Here, the checkbox behaves a bit differently.
An action number 10 and an action number 20 are assigned to an interface. For action number 10, the Stop Processing on Error checkbox is selected in Assign Actions. If an error occurs during the processing of action number 10, action number 20 is not executed anymore for the current line.
For every defined action function, you can set the behavior in case of a restart. If you select the Restart Always checkbox for a function module of an action, this function module is executed when the processing of the data message is restarted. The function module is also executed if it was executed successfully in the previous run.
If the check fails, there are two options that you can set:
Action Functions - Examples
The combination of the Restart Always and the Stop on Error flag are responsible for the behavior in case of an error. To make your decision about Restart Always keep in mind, that a function that works with internal numbering normally only should be processed once.
Also if you need the data from the first function to process the second it might be senseless to go on after an error in the first function.
Fields to Restore
The figure shows an example: The first action function creates a customer. For this new customer, you should create an invoice. In order to create the invoice, you need the customer number.
The figure shows an example: The first function creating the customer is executed successfully. The second action function creating the invoice fails because the payment terms are not correct. This error is corrected and the message is restarted. The function that created the customer is not executed again, since it was already processed successfully. Therefore, the customer number cannot be passed to the second function
The figure shows an example: The customer number determined by the first function is defined as Field to Restore. If the message is reprocessed, instead of executing the first function, the customer number is retrieved. Then, the customer number is passed to the function, which creates the invoice.
Changeable Fields
Changeable fields can be defined for a specific interface in AIF Customizing under SAP Application Interface Framework → Error Handling → Define Interface-Specific Features. New entries can be created under Define Changeable Fields.
If a field is defined as changeable, the users still need to have the corresponding authorization to change the content of a data message. Thus, users that are only authorized to display the data will not be allowed to edit the data even if the field is set to changeable. If a user changes the data it will be logged by AIF. AIF will log the old and the new value as well as the date and time when the message was edited. These entries can be displayed in transaction /AIF/EDCHANGES.