Entering content frameProcedure documentation Creating a Controller Locate the document in its SAP Library structure

Use

You create a controller to use a Model View Controller design pattern in your BSP application. You can use a controller for the initial access (see also Testing Controllers).

Prerequisites

You are in a system from SAP Web AS 6.20.

Procedure

  1. Use the Web Application Builder in the ABAP Workbench (Transaction SE80) to create a controller object as a sub-object of your BSP application.
  2. In doing so, you determine the controller name and the class name of the controller. The URL is automatically inserted from the name of the BSP application and the controller name.

  3. In the Class Builder (Transaction SE24), create the class that is derived from CL_BSP_CONTROLLER2.
  4. Note

    If you create your class directly from the Web Application Builder by double-clicking on the class names, then the inheritance of CL_BSP_CONTROLLER2 has already been configured.

  5. Overwrite some of the methods of your class, especially DO_REQUEST.

You can find additional information about these methods in CL_BSP_CONTROLLER2 and Process Flow.

  1. Save and activate your class and your controller.

Example

You can find examples of controllers in BSP application ITMVC2.

 

 

Leaving content frame