Exception Handling

Prerequisites

  • In enhanced notification processing:

    You have configured an agent instance that is to call up one or multiple destination systems using a customer-owned enhancement or the SAP standard enhancement Destination System Calls with Response Processing.

    You call the Destinations tab in the notification. You have assigned a Web Service Destination system to a module of the type destination system call here. See: Assignment of Modules and Variables (ENP).

    You have activated exception handling for this module by selecting the Exception Handling checkbox.

  • In the multiple call destination system:

    You have created a multiple call destination system with which one or multiple destination systems are to be called in a specific sequence. On the Destination System Calls tab, you have selected the Exception Handling checkbox in the Sequence of Destination System Calls table.

Context

You can react in a controlled way to exceptions, which can occur when destination systems are called, by configuring exception handling so you do not have to terminate the destination system call process but rather can continue working with defined values for the destination system output variables.

Exception handling can be called in the following applications:

  • Enhanced notification processing

    You can activate exception handling for enhanced notification processing, for example, using the SAP standard enhancement Destination System Calls with Response Processing or a customer-owned enhancement.

  • Multiple call destination system

    You can activate exception handling for individual steps in a multiple call destination system.

Errors can occur within the processing logic of a called destination system that go back to PCo as exceptions.

Some exceptions indicate actual errors, such as a destination system that is temporarily unavailable, incorrect input parameters, or errors in the processing of calculated variables in a Web Service Destination system.

However, some exceptions can be foreseen from the process flow or can be tolerated and do not need to lead to the termination of the processing of a notification message.

Procedure

  1. Choose Edit Exception Handling.

    The Exception Handling for Module dialog box appears.

  2. Define a logical condition in the Condition field. Use the expression editor to formulate the condition. You can evaluate notification enhancement variables and the text for the exception message in the condition expression (variable !EXCEPTION_MESSAGE!). A return value of 0 means that the condition is false. A return value that does not equal 0 means that the condition is true. An empty condition expression has the same meaning as the return value 0, in other words, the condition is false.
  3. Specify what you want to happen in the case of a true condition and a false condition. In both cases, you can choose one of the following two options:
    • Raise Exception

      The exception is not caught. It is forwarded to the enhanced notification processing (ENP) that called the destination system. This corresponds to the behavior without exception handling. In this case, processing of the notification message is terminated.

    • Catch Exception and Set Destination System Output Variables

      The exception is caught. You can define the values for the destination system output variables in the Set Value of Destination System Output Variables table. You can use fixed values or expressions to determine the values.

      If an exception is caught, processing of the notification message continues. The return values then correspond to the values that you defined here in the table.