Tuesday, November 12, 2013

TAW 10 - Search Help

SAP STANDARD FUNCTION: INPUT HELP

By using F4 help or the input help, the flight maintenance personnel obtains a list of flights belonging to airline LH along with their respective destinations and flight numbers. This example shows that the basic purpose of F4 help is to display a list of possible values for a screen field. You can activate the input help option either by selecting on the corresponding screen field or with F4 function key.

INPUT HELP REQUIREMENT


The input help of a screen field (or a search field) can function after certain requirements are met:
You must program the system to consider (in the input help) the information about the context. This should include the user entries in the current input template and the information obtained in the dialog steps earlier.

The input help must provide the user with a set of values for selection. It should also specify the data that is to be displayed in that list of possible values.

The input help option must be interactive in a way which enables the user to select a value from the list of possible values displayed.

The input help must send the value back to the search field when the user selects a value.

ABAP DICTIONARY OBJECT SEARCH HELP


The search help object in the ABAP Dictionary is used to define an input help. The exchange of data between the input template to the F4 help and back is controlled by the interface of the search help. When a user selects a value, the interface determines the context data to be used, as well as the data to be returned to the input template.
The internal behavior of the search help comprises the selection method which determines the values to be displayed, as well as the dialog behavior that describes the interaction with the user.

SELECTION METHOD OF A SEARCH HELP

It is important to define a selection method for a search help when the data relevant for input help are distributed on several objects. For this, you need to specify a database object from which you can select the data for the input help by defining a table or a view as selection method.
Both tables and views can be used as a selection method. You can use a view for this purpose if the search-related data are distributed on several tables.
On the other hand, you can use the table as a selection method if the data is placed in one table or in the corresponding text table.

DESCRIPTION OF THE DIALOG BEHAVIOUR


The dialog box for displaying the hit list presents the possible values in list format from which the user can select the required entry. If the hit list is huge, the user can shrink it by setting additional restrictions for the attributes of the entry in the dialog box for restricting values. This not only improves the clarity of the list but also reduces the system load.
In addition, the dialog type of a search help determines whether the system displays the dialog box for restricting values before presenting the hit list.

INTERFACE OF A SEARCH FILE
Both the IMPORT and EXPORT parameters of a search help constitute your interface. While defining the parameters of a search help, you must specify whether these are IMPORT parameters, which means they can copy data to the input help; or whether they are EXPORT parameters, meaning that they can return data from the input help. The search help attachment defines the location from which the IMPORT parameters of a search help get their values, as well as the screen fields in which the contents of the EXPORT parameters of the search help are returned.

HOW DO YOU USE SEARCH HELP?


When the input template is defined, the semantic and technical attributes of a screen field, such as the type, length, F1 help, and others are often not defined directly. Therefore, a reference to an ABAP Dictionary field is specified in the Screen Painter and the screen field takes on the attributes of this field from the ABAP Dictionary. Similarly, you can also define the input help of a screen field. The search help attachment mechanism assigns the search help to the field.

SEARCH HELP ATTACHMENT IN THE ABAP DICTIONARY


You can attach a search help to a field of the ABAP Dictionary in three ways:
You can attach a search help directly to a field of a structure or table, if the definition of the search help that is to be attached is analogous to that of a foreign key. Then the system proposes to define the assignment.

The system automatically offers a list of possible values in the input help and displays the key fields if a field has a check table.

You can attach a search help to a data element so that it is available for all the relevant fields. It is also important to define an EXPORT parameter of the search help in the attachment for data transfer.

OVERVIEW:MECHANISM FOR THE INPUT HELP



The R/3 System uses numerous mechanisms for offering meaningful input help for as many screen fields as possible. If there is more than one such mechanism available for a field, then the one that is furthest left or at the top of the above hierarchy is used.

PERFORMANCE OF AN INPUT HELP

If the system has to search vast amount of data in the selections for an input help, then its performance may get adversely affected if it takes huge amount of time. Therefore, you need to take measures to optimize the accessing behavior for the selection method, especially when the selection uses a view.
You can do this by restricting the hit list with additional conditions, if the number of entries in the selection method is very large. This also helps increase the clarity of the hit list.
Additionally, you can create an index on the fields which are used to formulate the restrictions.
However, you should always check whether the selection method can be buffered, if the number of entries in the selection method is relatively small.

ALTERNATIVE SEARCH PATHS.
As shown here, a customer obtains the booking number for her flight and a travel agent finds out the number of bookings made at his agency by following alternative search paths. This indicates that the entities in the relational data model in a real world scenario are identified by their attributes. These attributes can vary from one user to another and from one situation to another. Therefore, you need search paths that permit access to the data using non-key fields. There can be several search paths for one field.
As a developer, you can merge a set of search helps into a new object in the R/3 System so that there are multiple alternative search paths for describing an input help. Such search helps that combine several search paths are called collective search helps.

COLLECTIVE SEARCH HELP AND ELEMENTARY SEARCH HELP

A collective search help can be attached to fields, tables, and data elements through an interface of IMPORT and EXPORT parameters. This is similar to how an elementary search help executes exchange of data with an interface.
Only one search help can be attached to a field, table, or data element. Therefore, several search paths are attached with a collective search help. The elementary search helps are included as the parallel tab pages in a collective search help.
You must assign the collective search help parameters to the interface parameters of each included search help.

APPEND SEARCH HELP

You may need to enhance the standard SAP collective search helps with your own elementary search helps. In such cases, you can make use of an append search help, which is a collective search help that is assigned to another collective search help. The append search help is positioned in the customer’s namespace and it utilizes the interface of its appending objects. Typically, the user can create the search helps included in the append search help.
If SAP has already provided the required elementary search help, then the customer is only required to add it to his own append search help.

VIEW AS SELECTION METHOD OF A SEARCH HELP

You can define the set of possible entries for an input help by the entries in a primary table, which can be supplemented by entries from secondary tables. You can implement this view on the data with a help view.
The outer join logic used for maintenance views is also used for the help views. Although help view is defined similarly to a maintenance view, help views can only be used as selection methods in search helps.

FURTHER OPTIONS OF SEARCH HELPS

This slide illustrates the various search help options available to the user:
Default values are values which are preassigned to a parameter. You can use a default value to create a simple selection condition for a field of the selection method.

Hot keys are keys with a single letter or a digit assigned to an elementary search help.

Another option is to hide individual search help inclusions in a collective search help. This helps in deactivating individual search paths that are not wanted in a system.

Additionally, you can use parameters of an elementary search help as display fields in the dialog box for restricting values.

DEVIATION FROM STANDARD: SEARCH HELP EXIT


Generally, a search help defines the system-wide standard for an input help.
However, in some cases, the user may deviate from this standard. A search help exit is used for such purposes. A search help exit is a function module having a standardized interface. If it occurs in a search help, it is called before each step of the process.
The administrative data of the help processor is passed via the interface. The search help exit can manipulate this data. The administrative data also includes the information about the next step to be executed.

ALTERNATIVE DISPLAYS OF AN INPUT HELP


There are three presentation forms for input helps in the SAP System:
Listbox

Control

SAP Dialog

The list box is the user-friendly input help for clear one-column lists.
As an application developer, you can offer a field as list box and store this information in the Screen Painter for the corresponding field. Alternatively, you can show input help as a list box with modeless control or with a modal dialog implemented with SAP screen technology.

No comments:

Post a Comment