Show TOC Start of Content Area

Procedure documentation Creating an Exception Block  Locate the document in its SAP Library structure

Use

In this step, you create the block that represents the phase of the process.

In addition, you consolidate the parameters and the roles, and define the exception handling mechanism.

Prerequisites

You have created the User Details callable object, as described in Exposing a Java Class as a Callable Object.

Procedure

...

       1.      Open the gallery and choose Create Block from the contextual panel.

       2.      Select English for the original language, Sequential for the block type, and choose Create.

       3.      Enter the required data in the Basic Data tab page as follows:

¡        Name – enter Exception Block

¡        Description – enter a brief description of the callable object; for example, Exception Block

¡        Location – choose the Exception Handling folder

       4.      Make sure that Action is selected from the Item dropdown list, and choose This graphic is explained in the accompanying text (Insert).

Browse the gallery for the action, and confirm your selection using Select. Repeat the procedure for each of the actions in the following order:

¡        User ID Input Form

¡        Retrieve User Details

¡        User Details Display Form

       5.      Open the Parameters tab page.

To display data as required, create the following groups:

¡        Consolidate the entries User ID defined for User ID Input Form with the one defined for User Details.

¡        In User structure, select the entry First Name and consolidate it with the entry First Name defined for User Details Display Form.

Repeat the same step for Last Name, Telephone and Fax.

This consolidation ensures that the output from the background action is used to fill the input fields in the display form.

Example: Consolidate Parameters

This graphic is explained in the accompanying text

       6.      Open the Exceptions tab page.

                            a.      Select the line EXCEPTION_NO_USER_FOUND in the table and choose Add.

                            b.      Browse to select Handle: User ID Input Form.

To confirm your selection, use Choose.

                            c.      To define what happens after the exception handler is called, select Strategy.

To make the user to re-enter the User ID, choose Repeat from the dropdown box.

Example: Configure Exception Handling

This graphic is explained in the accompanying text

                            d.      To make sure that the output parameter - User ID, coming from the exception handler, is mapped to the appropriate input parameter of the existing block, choose Map Output Parameters.

                                                  i.       In the Exception block table select User ID cons.

                                                ii.       In the Handle: User ID Input Form table select User ID.

                                               iii.       Select Done.

Example: Map Output Parameters

This graphic is explained in the accompanying text

       7.      Open the Roles tab page.

Select all roles and consolidate them to The one and only role. Then choose Save.

       8.      To activate the object, choose This graphic is explained in the accompanying text (Activate).

Result

The exception handling is now defined.

You can use the Exception Block to create and start a process.

More information: Creating an Exception Process

End of Content Area