Файл: BC430_EN_Col62_FV_Part_A4_-_ABAP_Dictionary.pdf

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

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

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

Добавлен: 03.04.2021

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

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

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

Unit 8: Search Helps

BC430

If an airline was already specified before the input help was called, only its
employees are offered. Otherwise an input field on the input template for
the airline will be filled when you select the employee. Make sure that the
search help defined for the check table help of table ZEMPLOY## is used
Check your success as described above.

2.

The search help you just created can only improve the check
table help of table ZEMPLOY## (and thus the input help of field
ZDEPMENT##-Department head) if it was attached to table ZEMPLOY##.

3.

You might want to offer further search paths for finding employees. To do
this, make the following preparations:

Copy search help SAREA to your new search help ZEMPLOY##_AREA.
Change the parameters, selection method table, and data elements in your
copy so that it references the names used in your table instead of the original
table.

Check and activate the search help. Copy search help SDEPT to your new
search help ZEMPLOY##_DEPT. Change it accordingly and activate it (as
above). Copy search help ZEMPLOY##_DEPT to ZEMPLOY##_CSH
and convert the new copy to a collective search help. Include search helps
ZEMPLOY##_ESH1, ZEMPLOY##_AREA, and ZEMPLOY##_DEPT as
components of the new collective search help.

Change the search help defined for the check table help for table
ZEMPLOY## and check your success.

4.

Your business requirements have changed and it impacts the process of
searching for employees. The search path with which employees can be
found by their department is not currently required.

Change the input help used for field ZDEPMENT##-Department head
accordingly without actually modifying search help ZEMPLOY##_CSH
(or a table that is involved). Do this by creating an append search
help for ZEMPLOY##_CSH. The append should include search help
ZEMPLOY##_DEPT as a hidden search help. Check your success.

228

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Search Helps

Solution 13: Search Helps

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.

229


background image

Unit 8: Search Helps

BC430

If an airline was already specified before the input help was called, only its
employees are offered. Otherwise an input field on the input template for
the airline will be filled when you select the employee. Make sure that the
search help defined for the check table help of table ZEMPLOY## is used
Check your success as described above.

a)

Choose Search help in the initial screen of the ABAP Dictionary and
enter ZEMPLOY##_ESH1 in the corresponding field.

b)

Choose Create. In the next dialog box, confirm that you want to create

an elementary search help.

c)

Enter a short text for your search help.

d)

The search help should support the search for employees. These are

managed in table ZEMPLOY##. You therefore have to select this table
(or a view on this table) as selection method. The table is sufficient for
this exercise. Enter it in the Selection method field.

e)

To obtain the required behavior, choose dialog type Dialog with value
restriction.

f)

Choose the search help parameters using the F4 help. You should retain

the hit list with the possible search help parameters by selecting Keep,
since you do not have to call the help again in this case. Select fields
Airline, First name, Last name, and Personnel number as parameters.

g)

Mark all parameters as EXPORT parameters (column EXP). Mark the
attribute to be searched for (for example Personnel number) and the
hierarchically higher airline as IMPORT parameters (Column IMP).
This ensures that a corresponding entry in the input template is taken
into consideration (as described in the exercise).

h)

You can define the hit list by assigning the corresponding position
numbers (for example 1, 2, 3, 4, 5) in the column LPos.

i)

You can define the dialog box for restricting values by assigning
position numbers in the column SPos. You should therefore enter
positive numbers in these columns for parameters First name and
Last name, where the value of Last name should be smaller than that
of First name.

j)

Activate your search help. The search help is not yet effective for field
ZDEPMENT##-Department head. However, you can try out the search
help immediately with the Test function.

Continued on next page

230

© 2007 SAP AG. All rights reserved.

2006/Q2


background image

BC430

Lesson: Search Helps

2.

The search help you just created can only improve the check
table help of table ZEMPLOY## (and thus the input help of field
ZDEPMENT##-Department head) if it was attached to table ZEMPLOY##.

a)

Go to change mode in the maintenance screen for this table. Choose
Goto->Search help->For table. In the next dialog box, enter the name
of search help ZEMPLOY##_ESH1. Choose Continue.

b)

The proposal created by the system for assigning the search help
parameters to the key fields of the table is probably correct. Check this
and copy the definition.

c)

Activate table ZEMPLOY##.

d)

Call the Create entries function for table ZDEPMENT## again. The
input help of field Department head should now behave as desired.

3.

You might want to offer further search paths for finding employees. To do
this, make the following preparations:

Copy search help SAREA to your new search help ZEMPLOY##_AREA.
Change the parameters, selection method table, and data elements in your
copy so that it references the names used in your table instead of the original
table.

Check and activate the search help. Copy search help SDEPT to your new
search help ZEMPLOY##_DEPT. Change it accordingly and activate it (as
above). Copy search help ZEMPLOY##_DEPT to ZEMPLOY##_CSH
and convert the new copy to a collective search help. Include search helps
ZEMPLOY##_ESH1, ZEMPLOY##_AREA, and ZEMPLOY##_DEPT as
components of the new collective search help.

Continued on next page

2006/Q2

© 2007 SAP AG. All rights reserved.

231


background image

Unit 8: Search Helps

BC430

Change the search help defined for the check table help for table
ZEMPLOY## and check your success.

a)

On the initial screen of the Dictionary, enter SAREA in the search
help name field and hit the copy button. Change the to search help
name to ZEMPLOY##_AREA and choose Continue. Choose change
for the new search help.

b)

Change the selection method table to ZEMPLOY##. Change parameter
names to match the fields of the table by selecting the parameter and
input help. This also corrects the data element reference. Correct other
specifications as needed, syntax check the definition, and activate the
search help

c)

Repeat steps a) and b) to create the search help ZEMPLOY##_DEPT
using the SDEPT template.

d)

Copy search help ZEMPLOY##_DEPT to ZEMPLOY##_CSH. On the
maintain search help screen, choose Edit ® Change search help type
and confirm the change.

e)

Insert an import parameter for the area. This must referr to the data
element, which you used for the ZEMPLOY##-Area

f)

Select tab page Included search helps. Enter search help
ZEMPLOY##_ESH1.

g)

Position the cursor on the search help just entered. Choose Parameter
assignment. Have the system make a proposal for the assignment.

h)

The proposal is probably correct. To be on the safe side, check and
then copy the proposal.

i)

Repeat steps 4 – 6 for included search helps ZEMPLOY##_AREA
and ZEMPLOY##_DEPT.

j)

Activate search help ZEMPLOY##_CSH.

k)

Go to the table maintenance screen for table ZEMPLOY## to change

the search help for the table. Choose

Goto->Search help->For table

and change the search help name to ZEMPLOY##_CSH. Have
the system make a proposal, check it, and copy it. Activate table
ZEMPLOY##.

l)

By calling the input help for field ZDEPMENT##-Department head,
you can see that the input help is still functioning and that a collective
search help is now in effect.

4.

Your business requirements have changed and it impacts the process of
searching for employees. The search path with which employees can be
found by their department is not currently required.

Continued on next page

232

© 2007 SAP AG. All rights reserved.

2006/Q2