ВУЗ: Не указан
Категория: Не указан
Дисциплина: Не указана
Добавлен: 03.04.2021
Просмотров: 2348
Скачиваний: 41
Unit 8: Search Helps
BC430
There are three mechanisms for attaching a search help to a field of the ABAP
Dictionary:
1.
A search help can be attached directly to a field of a structure or table. The
definition of this attachment is analogous to that of a foreign key. You have
to define an assignment (between the interface parameters of the search help
and the fields of the structure) for which the system makes a proposal.
2.
If a field has a check table, its contents are automatically offered as possible
values in the input help. The key fields of the check table are displayed. If a
check table has a text table, its first character-like non-key field is displayed.
If you are not satisfied with the described standard display of the data of the
check table, you can attach a search help to the check table. This search help
is used for all the fields that have this table as check table. You have to
define an assignment between the interface of the search help and the key of
the check table when you define the attachment.
3.
The semantics of a field and its possible values are defined by its data
element. You can therefore attach a search help to a data element. The search
help is then available for all the fields that refer to this data element. In
the attachment you must define an EXPORT parameter of the search help
for the data transfer.
Attaching a search help to a check table (or a data element) can result in a high
degree of reusability. However, there are restrictions on passing further values via
the interface of the search help.
Figure 98: Overview: Mechanisms for the Input Help
218
© 2007 SAP AG. All rights reserved.
2006/Q2
BC430
Lesson: Search Helps
In order to offer a meaningful input help for as many screen fields as possible,
the SAP system uses a number of mechanisms. If there is more than one such
mechanism available for a field, the one that is furthest left or at the top of the
above hierarchy is used.
In addition to the options described above for defining the input help of a field in
the ABAP Dictionary, you can also define it in the screen field. The disadvantage,
however, is that there is no automatic reuse.
With the screen event POV, you can program the input help of a field by yourself.
You can adjust the design of the help to the standard help using the function modules
F4IF_FIELD_VALUE_REQUEST or F4IF_INT_TABLE_VALUE_REQUEST.
However, you should check to see if the part of the input help that you programmed
yourself should be implemented as a search help exit instead (see Appendix).
You can also attach a search help to a screen field in the Screen Painter. There
are some functional restrictions on this kind of attachment as compared with
attachment in the Dictionary.
You should no longer use the input checks defined directly in the flow logic of the
screen, from which it is also possible to derive input helps.
The function
Technical info
is offered in the hit list in the menu of the right mouse
key. It can be used to find out which of the specified mechanisms is being used.
Figure 99: Performance of the Input Help
A large amount of data sometimes has to be searched in the selections for an input
help. This means that the user might have to wait a long time for the possible
entries to be displayed, and can also result in a significant increase in the load
on the system.
2006/Q2
© 2007 SAP AG. All rights reserved.
219
Unit 8: Search Helps
BC430
When defining a search help, you should therefore check whether you should take
measures to optimize the accessing behavior for the selection method. This is
especially true if the selection uses a view and thus more than one physical table.
If the number of entries in the selection method is very large, you should restrict
the hit list with further conditions. This also increases the clarity of the hit list.
The additional conditions can directly result from the context, or can be entered in
the dialog box for restricting values by the user. The performance of the input help
can frequently be significantly improved by creating an index on the fields used
to formulate the restrictions.
If the number of entries in the selection method is relatively small, you should
always check whether the selection method can be buffered.
Figure 100: Alternative Search Paths
In the relational data model, entities are usually represented by formal keys. In real
life, however, these entities are often identified by one or more of their attributes.
For example, the key for a person is the personnel number. A person will generally
describe another with his name and possibly his address.
The attributes used to identify an entity can differ from one user to the next and
from situation to situation. A user wants to use these attributes in an input help to
define a value for a field that requires that a formal key be entered.
You therefore need
search paths
permitting access to the data using non-key
fields. Several different search paths should be possible for one field.
A search path for a field can be implemented with a search help having the form
described above. To describe an input help with more than one alternative search
path, a set of search helps can be combined into a new object in the SAP system.
Since this object is the description of the input help for a field, it is also called a
search help.
In contrast to the elementary search helps described above, the search helps that
combine several search paths are called collective search helps.
220
© 2007 SAP AG. All rights reserved.
2006/Q2
BC430
Lesson: Search Helps
Collective search helps are sometimes used to map the distribution of the possible
entries for a field into several (disjunct) datasets.
Figure 101: Collective Search Helps and Elementary Search Helps
Like an elementary search help, a collective search help has an interface of
IMPORT and EXPORT parameters with which it exchanges data. Using this
interface, the collective search help can be attached to fields, tables and data
elements exactly like an elementary search help.
Only one search help can be attached to a field, table or data element. Several
search paths are therefore attached with a collective search help.
You can omit the components for describing the dialog behavior and data selection
when you define a collective search help. The included search helps are listed
here. You must assign the parameters of the collective search help to the interface
parameters of the included search help for each inclusion.
A search help can also be included in several collective search helps and at the
same time itself be attached to fields, tables and data elements. A collective search
help can also be included in another collective search help.
When you use a collective search help, you are offered the elementary search helps
contained in the collective search help as parallel tab pages. If you repeatedly use
a collective search help, the tab page that was last used is automatically active.
This is because most users always use the same search path.
Extend search helps:
2006/Q2
© 2007 SAP AG. All rights reserved.
221
Unit 8: Search Helps
BC430
Figure 102: Append Search Helps
The set of search paths that are meaningful for an object greatly depends on the
particular circumstances of the SAP customer. The customer often would like to
enhance the standard SAP collective search helps with his own elementary search
helps. Release 4.6 provides an append technique that permits the enhancement of
collective search helps without modifications.
An
append search help
is a collective search help that is assigned to another
collective search help (its appending object) and that enhances it with the search
helps it includes.
The append search help uses the interface of its appending objects. The append
search help lies in the customer namespace. Normally the search helps included in
the append search help are also created by the customer and lie in the customer's
namespace. However, the required elementary search help might already be
provided by SAP, in which case, the customer only has to add it to his own append
search help.
Append search helps are used with SAP to improve component separation. Some
SAP collective search helps therefore already have one or more append search
helps in the standard search help. Customer enhancements should always be made
by creating a separate append search help.
SAP collective search helps often contain elementary search helps that are not
required by all customers. The search helps you do not need can be hidden using
an append search help. To do this, the corresponding search help must be included
in the append search help and the
hidden
flag must be set.
222
© 2007 SAP AG. All rights reserved.
2006/Q2