Show TOC

 Example of Search HelpsLocate this document in the navigation structure

Each customer of a carrier (see Flight Model ) or a travel agency has a customer number. You want to find a search option for this customer number.

Two different search paths must be offered to the user.

  • The user must be able to search for the customer number using the customer data, such as the name and address.
  • The user must be able to search for the customer number using existing customer bookings.

You can provide the required search option by creating a collective search help SCUSTOM. For the actual search paths, you create two elementary search helps SCUSTOM_NAME (for searching with the customer data) and SCUSTOM_BOOK (for searching with the existing bookings). These elementary search helps are included in the collective search help.

Elementary Search Help SCUSTOM_NAME

This elementary search help enables you to search for the customer number using the name and address (street, city, country). All this data is contained in table SCUSTOM. Table SCUSTOM must be selected as the selection method of the elementary search help.

You have to decide which fields of the selection method are required for the input help process. These are the fields that appear either in the dialog box for restricting values or in the hit list.

In the dialog box for restricting values, the user must be able to restrict values with the customer's name and address, for example the fields for the street, city and country (as shown in the figure above). These fields as well as the customer's number (the information to be found must always be in the hit list) must appear in the hit list. The fields ID, NAME, STREET, CITY and COUNTRY of table SCUSTOM must be included in the search help as parameters.

You have to specify the parameter ID as an import parameter. A pattern entered in the corresponding field of a screen template can be used directly for the value selection. Restrictions for the other parameters of the search help must be entered in the dialog box for value selection.

All the parameters of the search help have to be declared as export parameters. As a result, all the parameters of the hit list can be returned to the screen template if the corresponding fields are available there.

Elementary Search Help SCUSTOM_BOOK

This elementary search help enables you to search for the customer number using existing customer bookings. For the search, you must use the flight data for the booking (flight number, date of flight, city of departure, city of arrival) and the name of the customer. This data lies in tables SBOOK (bookings), SCUSTOM (name) and SPFLI (cities of departure and arrival). The following figure shows the relationship between the relevant tables, that is, the existing foreign key relationships.

In this case a database view SCUS_BOOK must be created for these three tables (see Example of Views ) as selection method. The tables in the view (join) are linked as defined by the existing foreign key relationships. For more information, see Foreign Key Relationship and Join Condition .

In the dialog box for restricting values, the user must be able to restrict the search for booking data with the carrier ID, customer name, city of departure, and city of arrival. The flight date and the customer number must also be displayed in the hit list. Fields CARRID, FLDATE, CUSTOMID, NAME, CITYFROM and CITYTO of view SCUS_BOOK must be included in the elementary search help as parameters of the search help.

You must specify the parameter CUSTOMID as an import parameter. All the parameters of the search help are export parameters.

Collective Search Help SCUSTOM

After the elementary search helps are created, they have to be included in the collective search help. You must allocate the parameters of the elementary search helps to the parameters of the collective search help. You can see a representation of all the parameters included in the search help in the following figure.

The parameter ID of the collective search help is marked as an import parameter. All the parameters are export parameters. The values can thus be copied from the hit list to the screen template.

Attaching the Search Help

To be able to use the search help SCUSTOM in screen templates, the attachment of the search help (see Attaching Search Helps with Screen Fields ) must be defined.

Attaching Search Help to the Check Table SCUSTOM

The search help must be available for all the fields that are checked against table SCUSTOM. For this reason, the search help must be attached to table SCUSTOM and the parameters of the search help must be assigned to the key fields of table SCUSTOM.

The parameter ID of search help SCUSTOM is assigned to the field ID of table SCUSTOM in this field assignment. No assignment is possible for all other parameters of the search help (NAME, CITY and COUNTRY) since table SCUSTOM does not contain this information as key fields.

Attaching Search Help to a Field of Table SCUSTOM

So that the search help is available when the field SCUSTOM-ID is directly copied to the input template, you have to attach the search help to this field.

With this type of attachment, all the parameters of the search help can be assigned to the corresponding fields of the table. For more information, see the figure below.