Each customer of a carrier (see
Flight Model) or of a travel agency has a customer number. You want to find a search option for this customer number.The user must be offered two different search paths.
The required search option can be defined by creating a collective search help SCUSTOM. Two elementary search helps SCUSTOM_NAME (for searching with the customer data) and SCUSTOM_BOOK (for searching with the existing bookings) are created for the actual search paths. These elementary search helps are included in the collective search help.
Elementary Search Help SCUSTOM_NAME
This elementary search help (see
Structure of Elementary Search Helps) should enable you to search for the customer number using the name and address (street, city, country). All this data is contained in table SCUSTOM. It is therefore sufficient to select table SCUSTOM as selection method of the elementary search help.The fields ID, NAME, STREET, CITY and COUNTRY of table SCUSTOM must be included in the search help as parameters of the search help.
The parameter ID of the search help is declared to be an import parameter. A pattern entered in the corresponding field of a screen template can therefore 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 are declared to be 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 should enable you to search for the customer number using existing customer bookings. The flight data for the booking (flight number, date of flight, city of departure, city of arrival) and the name of the customer should be used for the search here. This data is distributed on the tables SBOOK (bookings), SCUSTOM (name) and SPFLI (cities of departure and arrival). The following graphic 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 on these three tables (see
Example for Views) as selection method. The tables in the view (join) are linked as defined by the existing foreign key relationships (see Foreign Key Relationship and Join Condition).The fields CARRID, FLDATE, CUSTOMID, NAME, CITYFROM and CITYTO of the view SCUS_BOOK must be included in the elementary search help as parameters of the search help.
The parameter CUSTOMID is declared to be an import parameter. All the parameters of the search help are export parameters.
Collective Search Help SCUSTOM
The two elementary search helps are now included in the collective search help (see
Structure of Collective Search Helps). You must now allocate the parameters of the elementary search helps to the parameters of the collective search help.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
In order 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 to the Check Table SCUSTOM
The search help should be available for all the fields that are checked against table SCUSTOM. The search help therefore must be attached to table SCUSTOM. The search help parameters must therefore be assigned to the key fields of table SCUSTOM.
The parameter ID of search help SCUSTOM is here 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 to a Field of Table SCUSTOM
In order 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.