Remember to save the page. In order to run the BSP, the first thing we have to do is to activate it. The activation concept is the same as for the other repository objects. Refer to initial sections of this chapter. First, leave the editor screen of the BSP page; otherwise the activation will fail. To run the application, click the Direct Processing button, or, alternatively, press F8. Because we have not defined the page as public, the system will request the SAP username and password.
Enter the information requested and click OK. We could have alternatively defined the page as public. If you look up the source code from the browser with Microsoft Internet Explorer, select View Source , you can actually see that the whole code is static, and the font text "Hello world After this first success, let's have a closer look to each of the elements that make up a BSP application.
You can see this option in the tabstrips in the right-hand side of the screen of a BSP application. In the section for the properties, the system shows the administrative data for the application. These include the user, creation and modification dates, and package. You can enter the following information:. Navigation allows for defining calling routes between HTML pages. In this way, if a page is called from several other pages and we have the need to modify the name of the page, we would only have to perform the change in one single place.
The column Start is used to enter the name of the source page. In the column Navigation Request we enter the alias used in the page, and the column Target is used to enter the name of the target page. As can be seen, this is a procedure for indirect calls. BSP pages are also made of the following elements:.
As in the BSP applications, there is a tabstrip in the application to enter the main properties or attributes of the BSP pages.
The most important properties are as follows:. This option only appears in pages with flow logic. This section can be used to code the actions to be performed for each of the system events. In this case, the only valid language is ABAP.
When selecting an event in the first input field, the system will show the editor for the code corresponding to that event. Possible events are as follows:. This tabstrip is used to enter any "data object" that we need to share for the layout and the events. Activate this checkbox whenever the BSP application should be implemented as stateful. XSRF Protection. Note the following points:. Creating Pages. Creating Controllers. The BSP application has been created in the Repository as a development object.
Application class If you enter the name of an ABAP class as the application class in this field, then this class can be directly referenced in the BSP application using the predefined object application. Stateful Activate this checkbox whenever the BSP application should be implemented as stateful. Creating Pages Creating Controllers.
These are simple pages with event handlers, but without application logic or visualization elements.
It is possible to build a BSP application exclusively out of pages with flow logic and event handlers. These are created like normal BSPs but then marked as page fragments.
In the navigation structure you can define the pages which are to be navigated to and from for which navigation request. The business logic of a BSP application is encapsulated in an application class. Every page of a BSP application can directly reference the components of this class attributes, methods, and so on using the predefined Object application.
0コメント