Entering content frameProcedure documentation Creating the Top-Level Controller Locate the document in its SAP Library structure

Procedure

  1. Create a BSP application and declare it as stateful.

You can find the checkbox for stateful on the Properties tab page as the ID Stateful.

  1. Save your BSP application.
  2. Create a controller within this BSP application.
    1. Enter a unique class name for the controller.
    2. Set the lifetime in the Status field to Session.
  1. Save your controller.
  2. Double-click on the controller class name.
  3. The following dialog box asks if you want to create the class. Answer it with Yes.

You branch to the Class Builder.

  1. Save your class.
  2. On the Properties tab page, check that your class inherits properties from CL_BSP_CONTROLLER2. If this is not the case, for example if your class inherits properties from CL_BSP_CONTROLLER, then change the data for the class that passes on the properties.
  3. Branch to the Methods tab page.
    1. In change mode, overwrite method DO_REQUEST using the icon This graphic is explained in the accompanying text (Redefine):
    2. method DO_REQUEST .

          data: main_view type ref to if_bsp_page.

      * if input is available, dispatch this input to subcomponent.
      * this call is only necessary for top-level controllers.
      * ( if this is not a top-level controller or no input is present,
      *   this call returns without any action)
        dispatch_input( ).

      * if any of the controllers has requested a navigation,
      * do not try to display, but leave current processing
        if is_navigation_requested( ) is not initial.
          return.
        endif.

      * output current view
        main_view = create_view( view_name = 'main.htm' ).
        call_view( main_view ).

      endmethod.

    3. If necessary, overwrite method DO_INIT.
    4. In order to react to user input, overwrite methods DO_HANDLE_DATA and DO_HANDLE_EVENT.
  1. Activate your class.
  2. Create a view within your BSP application.
    1. In the following example, the view is called main.htm.
    2. Fill the view layout with HTML coding or HTMLB coding.
    3. Save the view.
  1. Activate and test your finished BSP application.

 

Continue by Creating Components.

 

 

Leaving content frame