Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the use of hot key...

Former Member
0 Kudos

what is the use of hotkey in elementary search helps...how to use this in elementary search helps...can anybody send any navigations on these ..

4 REPLIES 4

Former Member
0 Kudos

Creating Elementary Search Helps

Procedure

In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.

A dialog box appears in which you must select the type of search help.

Select Elementary search help and choose .

The maintenance screen for elementary search helps appears.

Enter an explanatory text in the field Short text.

You can for example find the search help at a later time using this short text.

In the Definition tab page enter the selection method of the search help.

You can enter the name of a table or a view (database view, projection view or help view) here. If you enter a table that has a text table, the name of the text table is automatically entered in the corresponding field.

Using the input help (F4 help), select fields of the selection method as parameter in the Search help parameter area. Select the fields that should be used in the dialog box for value selection or in the hit list.

If the selection method is a table that has a text table, both the fields of the table and the fields of the text table are offered in the input help.

The data element of the parameter is automatically copied from the selection method. The data element defines the output attributes and the F1 help of the parameter in the hit list and in the dialog box for value selection.

You can assign the parameter another data element. To do so, select the Mod flag. The Data element field is now ready for input. Then select a data element with the input help (F4 help). Only data elements whose data type, length and number of decimal places is the same as those of the previous data element can be assigned.

This removes the link between the data element of the search help parameter and the data element of the selection method field having the same name. If you cancel the Mod flag, the data element of the assigned table field is used again.

Define the attributes of the search help parameters.

Select the IMP flag if it is an import parameter. Select the EXP flag if it is an export parameter.

You can define the dialog for the input help with the fields LPos, SPos and SDis. Enter the parameter position in the hit list in LPos. If you enter nothing or the value 0 here, the parameter is not displayed in the hit list.

Enter the parameter position in the dialog box for value selection in SPos. If you enter nothing or the value 0 here, the parameter is not displayed in the dialog box for value selection.

Set the SDis flag if the parameter should be a pure display field in the dialog box for value selection. The user is thus informed that the contents of the parameter restrict the value, but he cannot change this restriction. This makes sense for example when the parameter is an import parameter or if it has a default value.

You can assign the parameter a default value in the Default value field.

Select the dialog type of the search help.

The dialog type defines how the hit list is displayed in the input help.

Save your entries.

A dialog box appears in which you have to assign the search help a development class.

Choose .

Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.

Result

The search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred during activation, the activation log is automatically displayed.

Other Options

Assign a hot key: If the search help is to be accessed with a hot key, you must enter a one-place ID in the Hot key field. All the elementary search helps contained in a collective search help should have different short cuts.

Assign a search help exit: In exceptions, you might have to change the standard flow defined by the search help with a search help exit. In this case enter the name of the search help exit in the corresponding field.

Test the search help: You can test the flow of an input help defined by the elementary search help with . A dialog box appears in which you can simulate the behavior of the search help under different conditions. You can obtain information about the options provided in this window with .

See also:

Example for Search Helps

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 user should be able to search for the customer number using the customer data, such as the name and address.

The user should 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. 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 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. Table SCUSTOM must therefore be selected as the selection method of the elementary search help.

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

In the dialog box for restricting values, the user should be able to restrict values with the customer’s name and address, i.e. the fields for the street, city and country. These fields as well as the customer’s number (the information to be found must always be in the hit list) should 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.

The parameter ID 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).

In the dialog box for restricting values, the user should 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 of course the customer number should 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.

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. 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.

Structure of an Elementary Search Help

An elementary search help defines the standard flow of an input help. You can define the following components of this flow in the search help:

where does the data displayed in the hit list come from (selection method)

what information should be displayed in the dialog box for value selection and in the hit list (search help parameters)

what field contents can be taken into account for hit list selections and which values in the hit list can be returned to the screen fields (search help parameters)

what dialog steps should be executed in the input help (dialog behavior)

Selection Method

The possible input values displayed for a field in the hit list are determined at runtime by database selection.

If all the data required in the hit list comes from one single table, you only have to select this table (or a projection view on this table) as selection method. If there is a text table for the table, its fields are also available in the input help. A table entry is linked with the corresponding text by the existing foreign key.

If the data needed in the hit list comes from more than one table, you must link these tables with a view (database view or help view). This view must be defined as the selection method.

If the underlying tables are client-specific, the client field must be contained in the view. Otherwise selection for the input help would be for all clients.

Search Help Parameters

A search help has an interface consisting of parameters. These parameters define the fields of the selection method that should be used in the input help.

A parameter of the search help must correspond to each field in the dialog box for value selection and to each field of the hit list. The parameters are copied from the corresponding selection method, that is they always have the same name as the corresponding field of the selection method.

If the search is restricted with a parameter of the search help, this is used in the data selection for formulating a WHERE condition for the field of the selection method with the same name. Vice versa, the parameters of the search help are assigned the contents of the fields of the selection method having the same name.

The search help should not contain any parameters for the clients. In the input help, selection is automatically in the logon client of the user.

A data element must be assigned to each search help parameter, that is a type is always defined for the search help parameters.

A search help can contain further parameters that do not correspond to any field of the selection method. This is normally only necessary if the standard flow of the input help described by the search help still has to be modified by with a search help exit.

Import and Export Parameters

When an input help is called, the entries that the user already made in the input template are taken into consideration. For example, if a user calls the input help for the flight number and already specified the carrier, of course only the numbers of flights of this carrier should be offered.

On the other hand, if the user selects one row of the hit list, more than one field of the input template might have to be filled with data from the selected row of the hit list. For example, if the flight number is obtained from the hit list, the city of departure and the destination should also be returned in the screen template.

The interface of a search help defines the context data that can be used in the input help and the data that can be returned in the input template.

A parameter of a search help can be classified as:

Import parameters: Parameters with which context information from the processed input template (screen) may be copied to the help process.

Export parameters: Parameters with which values from the hit list may be returned to the input template.

A parameter can simultaneously be an input and an export parameter. A search help can also contain parameters that are neither import nor export parameters. Such parameters could be required for the internal input help process, for example.

When you attach a search help, you must define where the import parameters of the search help get their values from and the fields in which the contents of the export parameters are returned. See also Value Transport for Input Helps.

Description of the Online Behavior

The online behavior defines the steps executed in the input help process and the structure of the hit list and dialog box for value selection.

The dialog type defines whether or not the dialog box for value selection should be displayed. If you want to skip the dialog box for value selection, the hit list is displayed directly after calling the input help.

When you define an elementary search help, you can define how the dialog box for value selection and the hit list should look. For example, you can define the position of a parameter in the dialog box for value selection here. The column position in which the values of a parameter are displayed in the hit list can also be defined here

Please reward points..

regards

Former Member
0 Kudos

The hot key permits the user to select an elementary search help from the collective search help directly in the input field with the short notation. The restrictions can also be entered directly in the dialog box for restricting values.

Letters and digits are allowed as hot key.

With the short cut, the user can select an elementary search help of a collective search help and fill in the fields of the dialog box for restricting values directly in the input field. This can save time if the user frequently looks for values using the same search help.

The short cut must be entered in the input field according to the following convention:

=HK.S1.S2.S3 etc.

where HK is the hot key of the elementary search help and S1, S2, S3, etc. are the restrictions that are entered in this order in the corresponding dialog box. Each entry is considered to be a pattern with a terminating '*'. Restrictions for fields for which no entry could be made in the dialog box are ignored.

The hot key need not be entered if only one elementary search help is assigned to the field or if the elementary search help stored as the standard search help should be used. If S1 consists of more than one character, the first separator '.' can also be omitted.

If the hot key is entered without restrictions (=HK), the dialog box for restricting values appears. If restrictions are defined, the dialog box for restricting values does not appear and the hit list is displayed directly. If exactly one hit is found, the hit list is not displayed. The values of the hits that are found are returned directly to the screen in this case.

Example: =b.lh.frankfurt is entered in an input field for a flight number. This field has a collective search help containing several search paths (elementary search helps) for the flight number. If you now choose F4, the elementary search help with hot key B is selected. The hit list is selected with restriction 'LH' for the first field and 'FRANKFURT' for the second field in the dialog box for restricting values that normally appears for this elementary search help. The hit list is displayed directly if more than one hit is found.

Note: If an elementary search help is chosen using the hot key, no new standard search help is stored. The standard search help stored for each user and collective search help is only reset if an elementary search help is chosen with the selection dialog box.

Regards

Kiran

Former Member
0 Kudos

Hi Raja,

open table mara and then pree ctrlshiftf10.then you will get databrowser tablemara selection screen.there you will find fields matnr,ersda,ernam..etc.

press f4 on matnr then you will get a search help.in that notice the tabstrips that you havewhich are elementary searchhelps.actually when you press f4 you will be in first tabstrip.

instead of pressing f4 enter =A in the matnr field and press f4.now you will be in second tabstrip.observe this.what happend is ,for second tabstrip means for second elementary searchhelp they assigned a hot key 'A'.

to understand practically what is a hot key follow these steps.

1)go to se11 and select searchhelp and enter MAT1_A and press display.

2)you will get a collective searchhelp.

3)click on included searchhelps tabstrip.you will see the list of elementarysearchhelps that are included like

MAT0M

MAT1A

MAT1B etc.

double click on each searchhelp.

if you click on MAT0M you will get elementary searhelp screen for MAT0m.see in DialogBehaviour->hotkey there is a value 'M'

if you click on MAT1A you will get elementary searhelp screen for MAT0m.see in DialogBehaviour->hotkey there is a value 'A'

and so on.

so if you enter this hotkey in the field as i mentioned earlier you will directly taken to that tabstrip means that elementarysearchhelp.

please reward points if helpful.

former_member230674
Contributor
0 Kudos

hai

raja,

The hot key is used to

-> select the elementary search help from the collective search help and

-> To enter the restrictions in the dialog box for restricting values directly from the entry field.

Advantage:

If the user often searches for values using the same search help, this procedure can save time.

If useful, reward points.

By

G.V.K.Prasad