Entering content frame

Procedure documentation Defining Event Handlers for the Results List Locate the document in its SAP Library structure

 

Use

Just like for the list of authors, only the event handler OnInitialization is needed for the results list, results.htm (see also Event Handlers for the List of Authors ). The content of OnInitialization is set when the page is called, so no user action is required.

The initialization involves the following:

Procedure

  1. Choose the tab page Event Handler for the results list.
  2. Choose OnInitialization from the pulldown menu.
  3. Specify the processing procedure.
  4. if authorfname is not initial or

      authorlname is not initial.

        translate authorfname to upper case.

        translate authorlname to upper case.

    else.

      authorfname = '%'.

    endif.

     

    select a~authlname a~authlnam a~authfname a~authfnam a~isbn b~title

      from ( bsauthors as a inner join bsbook as b on a~isbn = b~isbn )

      into corresponding fields of table books

      where a~authlname like authorlname or a~authfname like authorfname

      order by a~authlname a~authfname a~isbn.

    First the system checks whether one of the input fields is empty. If one is empty, it is filled with a wildcard, so that a result is also displayed, if the user only specifies the first or last name of an author.

    The user data is then converted to upper case, as the entries in the fields authfname and authlname are in upper case in the bsauthor table.

    The select statement comes next: The entries for the first and last names, ISBN and title are displayed in an index, whereby both bsauthors and bsbook tables are combined together through an inner join so that only the entries with the same ISBNs are compared.
    The entries found are saved in an internal table
    books. Always when an index entry for the first or last name agrees with the authorfname and authorlname pages attributes, the last name, first name and ISBN are sorted and displayed in a table using the layout (see also Layout for the Results List).

  5. Save your entries.

 

Now you have to define the page attributes.

This graphic is explained in the accompanying text Page Attributes for the Results List

 

 

Leaving content frame