In case that on a page that contains flow logic, a view, or a controller, a runtime error occurs, you can assign an error page to it. When a runtime error occurs during execution of this (other) page or this controller, the system automatically processes the assigned error page and sends it to the browser. If no error page is assigned to a page/a controller, in case of a runtime error, the system displays a standard page. If runtime errors occur in a called controller or view and there is no error page, this section remains empty.
If different types of exception occur, you can use the ERROR_OBJECT error object from class CX_ROOT in your error page. You can implement this object using dynamic ABAP and use GET_TEXT or GET_LONGTEXT methods to output an appropriate error text for your application (message short or long text).
Use the functionality in the HTTP service tree (Transaction SICF) to create error pages if short dumps occur. See also Error Pages.
You cannot assign an error page to a page or a controller that itself is marked as error page
With views you must not assign a controller class, because an error page is always called implicitly by the BSP runtime.
To identify a page / a controller as an error page:
Go to the properties display and switch to Change mode if necessary.
In section Error Handling, mark the checkbox Is Error Page.
Save your entries and activate the page or controller.
You can now assign this page or controller as Assigned Error Page to another page or another controller.
The BSP application BSP_MODEL in the system contains an example of how to implement and use an error page.