Файл: BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf

ВУЗ: Не указан

Категория: Не указан

Дисциплина: Не указана

Добавлен: 03.04.2021

Просмотров: 2277

Скачиваний: 40

ВНИМАНИЕ! Если данный файл нарушает Ваши авторские права, то обязательно сообщите нам.
background image

BC430

Lesson: Search Helps

Figure 103: View as Selection Method of a Search Help

If the selection method for a search help is a database view, the input help displays
only the records for which there are entries in all the tables involved in the view
(inner join). The set of possible entries is sometimes described by the entries
in a primary table for which additional optional information can be added from
further secondary tables. This view on the data can be implemented with a help
view in the SAP system. The same outer join logic is used for help views as
for maintenance views.

A help view is defined analogously to a maintenance view. Help views can only
be used as selection methods in search helps. Since the SAP system cannot pass
the selection on a help view directly to the database, it has to generate its own
access routines. The database view should therefore be used as selection method
in preference to the help view.

Selection using a table and text table corresponds to selection using a virtual help
view. For this reason, a virtual help view should not be created in this case.

Exception: The table contains a field having the same name as a non-key field
of the text table. If this field of the text table is needed in the search help, you
have to create a help view on the two tables because the field in the search help
cannot be accessed directly.

It is customary to start the name of help views with the prefix H_. Views beginning
with the prefixes H_Y or H_Z therefore lie in the customer namespace.

2006/Q2

© 2007 SAP AG. All rights reserved.

223


background image

Unit 8: Search Helps

BC430

Figure 104: Further Options for Search Helps

A parameter can be pre-assigned a value by allocating a default value. The
parameter is always given this value unless it is an IMPORT parameter that
is linked with a field of the screen, its module pool or with a parameter of the
including collective search help.

The following can be default values: literals, system fields and GET parameters.

You can use a default value to formulate a simple selection condition for a field of
the selection method.

A single letter or a digit can be assigned as hot key to an elementary search help.
If this elementary search help is used in a screen field for the input help, and if this
field has the short cut =<hot key>.<SEL1>.<SEL2>, when the input help is called,
this elementary search help is processed. <SEL1>, <SEL2> is used as the field
contents for the dialog box for restricting values (with an * added at the end) and
the hit list is then displayed immediately.

Individual search help inclusions can be hidden in a collective search help. You
can thus deactivate individual search paths that are not wanted in a system. They
should normally be hidden in an append search help as this can be done without
modification.

Parameters of an elementary search help can be marked as pure display fields in the
dialog box for restricting values. In general, IMPORT parameters that are assigned
unchangeable fields of the screen are displayed in this dialog box as unchangeable.

224

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Search Helps

Figure 105: Deviation from standard: search help exit

A search help is an object that describes an input help within the system-wide
standard. In some cases, the special semantics of a field require that you deviate
from this standard in some details. This can be implemented with a search help
exit.

A search help exit is a function module having a standardized interface. The
function module F4IF_SHLP_EXIT_EXAMPLE can be used as template. If a
search help has such a search help exit, the search help exit is called prior to each
single 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 administration data also includes the information about the next step to be
executed. The search help exit can now execute either preparatory actions for this
step or the step itself (for example a data selection which cannot be implemented
with a SELECT on a table or view). In the second case the search help exit also
changes the information about the next step to be executed.

Some function modules that can be used as search help exits or that can be used to
manipulate the administration data in search help exits are already defined with
the prefix F4UT_. Search help exits should only be used for exceptions.

Using search help exits encourages non-standard solutions and make it more
difficult to maintain the input help.

2006/Q2

© 2007 SAP AG. All rights reserved.

225


background image

Unit 8: Search Helps

BC430

Figure 106: Alternative Displays of the Input Help

The SAP system recognizes three presentation forms for the input help:

List box

Control (modeless)

SAP Dialog (modal)

The list box does not provide for any further selection conditions and no further
columns are displayed in the hit list. However, the list box is the user-friendly
input help for clear one-column lists. The application developer decides whether
to offer a field as list box and stores this information in the Screen Painter for the
corresponding field. When the user calls the list box, the data to be displayed is
obtained with the input help mechanism stored in the ABAP Dictionary or Screen
Painter for the field. You can obtain more information on using the list box in the
course BC410

Programming User Dialogs

.

Alternatively, you can display fields that are not offered as a list box with
a modeless control or with a modal dialog implemented with SAP screen
technology. With

Help

Settings

, each user can define the variant they prefer.

This presentation form is then used for all input helps for this user. The system
administrator can define the default value.

The control is particularly useful if more than one field is to be filled sequentially
with the same input help (for example in a table control). The Hold list function
starts the control from the modal help.

226

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Search Helps

Exercise 13: Search Helps

Exercise Objectives

After completing this exercise, you will be able to:

Implement input helps with elementary search helps

Define input helps with more than one search path using collective search
helps

Add or remove search paths for collective search helps without modifications

Business Example

Many management tasks require that you search for employee data. The
appropriate search options for this should be provided.

Task:

You should create a simple search help for an input field.

1.

Go to the display screen for the ZDEPMENT## table and call

Utilities ->

Table Contents -> Create Entries

.

An input template appears in which you can create new entries for table
ZDEPMENT## (for example, new departments). The head of the new
department should also be defined here. Make this entry in the Department
head field. Maintenance of this field should be supported with an input help
that displays the (personnel number of the) employee. Verify that the field
already has an input help. Find out which input help mechanism is used here.

The objective is to make the input help for check table ZEMPLOY## more
user-friendly. You will check your success later by calling the input help
again. To do this, create an elementary search help ZEMPLOY##_ESH1.
The following attributes should appear in the specified order in the hit list:

Airline

First name

Last name

Personnel number

Because of the large number of employees, you should restrict the displayed
values by specifying the first and/or last names of the person wanted
before displaying the hit list. Keep in mind that the last name is used more
frequently as a restriction than the first name.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

227