Show TOC

Creating PagesLocate this document in the navigation structure

Use

You can implement the layout for each page (often called BSP) using the script languages ABAP and JavaScript.

BSPs can have different attributes: Therefore, when you create a page, we distinguish formally between 3 page types:

Page with flow logic

A page defined this way can implement the entire flow logic itself (event handler-based model). The page can have event handler and page parameters (including automatic attributes) in addition to the layout.

Such a page is executable and can be addressed through a URL or through navigation from other pages.

View

Views are used solely for displaying application data. They have page parameters in addition to the layout section. In contrast to the page with flow logic, views have neither event handlers nor automatic page attributes.

A controller class is generally assigned to a view. This class controls the view calls and is responsible for communication with the model.

Views are based on the MVC Programming Model and allow you to clearly separate the application logic from the presentation logic in BSP applications.

Page Fragment

Page fragments are special parts. You cannot use them as stand-alone pages in an application. They are not executable directly. Instead, you include them into other pages using the include directive.

Example

<%@ include file=' /fragment.htm'%>.

Caution

A page fragment cannot define event handlers or parameters.

Note

You can implement a page with flow logic or a view (or even a controller) as an error page. See also: Creating Error Page

Prerequisites

You have already created the BSP application.

Procedure

To create a page for your BSP application from within the object list (SE80):

  1. Right-click the BSP application.

  2. From the context menu, choose Start of the navigation path Create Next navigation step Page End of the navigation path.

    The system displays the Create Page dialog box.

  3. Provide further specifications on the page by enter the name of the page and a short page description. Afterwards, select the required option for the page type ( View/ page with flow logic/ page fragment).

  4. Choose to confirm your entries.

    The system displays the layout editor for the new page in the tool area.

  5. Choose Save to save your page.

Result

The created page is assigned as subobject to the BSP application and stored in the Repository. Besides the basic HTML structure, the page directive is pre-generated:

<%@ page language="abap" %> or <%@ page language="javascript" %>

The page directive determines the script language. The script languages supported are currently ABAP and JavaScript.

Note

If you have chosen the page type View, both tab pages Event handler and Type definitions are suppressed - in contrast to a page with flow logic.

If you have chosen Page fragment as the page type, the tab pages Event handler, Page attributes, and Type definitions are suppressed.