
BSP With Layout and Initialization
Overview
This simple BSP contains the layout, a page attribute and event handler OnInitialization. This outputs the title, publisher and ISBN of all books in the database table
BSBOOK that were published in the year 2000.This BSP is as follows in the Web Application Builder:
|
Layout |
|
< %@page language="abap"%><html> <body> <h2> Book list </h2> <table border=1> <tr> <th>Title</th> <th>Publisher</th> <th>ISBN</th> </tr> <% data: wbook like line of books. loop at books into wbook. %> <tr> <td> <%= wbook-title %></td><td> <%= wbook-publisher %></td><td> <%= wbook-ISBN %></td></tr> <% endloop. %> </table> </body> </html> |
|
OnInitialization |
|
select * from bsbook into table books where publyear = '2000'. |
|
Page Attributes |
||||
|
Attribute Name |
automatic |
Typing Type |
Reference Type |
Description |
|
books |
|
TYPE |
BOOK_TAB |
Booklist |

The internal table
books of type BOOK_TAB is filled in OnInitialization.Processing Process
The individual steps that are followed when processing this BSP are as follows:

This example can be enhanced by adding a second BSP with navigation: