Entering content frame

Procedure documentation Specifying Layout for List of Authors Locate the document in its SAP Library structure

Use

The layout for the page with the list of all authors, authors.htm, is to contain a two column table with the first and last names of all authors.

Procedure

  1. For the authors.htm page choose the Layout tab page.
  2. Define the layout:
  3. <%@ page language="abap" %>

    <html>

      <body BGCOLOR="#B5E1D2">

        <h2> List of Authors </h2>

        <table border=1>

              <tr>

            <td><b>first name</b></td>

            <td><b>last name</b></td>

              </tr>

          <% data: wa_author type bsauthline.

            loop at authors into wa_author. %>

              <tr>

                <td> <%= wa_author-authfnam %> </td>

                <td> <%= wa_author-authlnam %> </td>

              </tr>

            <% endloop. %>

        </table>

      </body>

    </html>

    This page uses the same background color as the first page.

    After the heading there is a table with two columns. The first column contains the first names, the second column contains the surnames. The following ABAP statement fills the table:

          <% data: wa_author type bsauthline.

            loop at authors into wa_author. %>

              <tr>

                <td> <%= wa_author-authfnam %> </td>

                <td> <%= wa_author-authlnam %> </td>

              </tr>

            <% endloop. %>

    The values in the HTML table are obtained from the internal table authors, which is filled in the initialization phase (see Event Handlers for the Author List)with the names of the authors from the database table bsauthors.

    The ABAP statement loop processes the internal table. The fields containing the first names and surnames are read from the table in a loop.

  4. Save your entries.

This graphic is explained in the accompanying text Now define the Event Handlers for the List of Authors.

 

 

Leaving content frame