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: 

Search help

Former Member
0 Kudos

Hi

while giving search help to a parameter and press F4 i shd get an intial screen and while i press enter i shd get all the data assigned to that field

please suggest me

Regards

Salman

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rasheed,

go through this info.

You have to create a help view if a view with outer join is

needed as selection method of a search help.

The selection method of a search help is either a table or a

view.

If you have to select data from several tables for the search

help, you should generally use a database view as selection

method.

However, a database view always implements an inner join. If

you need a view with outer join for the data selection, you

have to use a help view as selection method.

The creation method for Help view is similar to that of

Database view.

The input help (F4 help) is a standard function of the R/3

System.

The user can display the list of all possible input values

for a screen field with the input help.

This standard process can be completely defined by creating a

searchhelp in the ABAP Dictionary. This search help only has to

be assigned to the screen fields in which they should be

available.

There are two types of search help:

Elementary search helps describe a search path. The elementary

search help must define where the data of the hit list should be

read from (selection method), how the exchange of values

between the screen template and selection method is

implemented

(interface of the search help) and how the online input help

should be defined (online behavior of the search help).

Collective search helps Combine several elementary search

helps. A collective search help thus can offer several

alternative search paths.

Each customer of a carrier 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.

1> The user should be able to search for the customer

number using the customer data, such as the name and

address.

2>The user should be able to search for the customer number

using existing customer bookings.

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

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.

For creation:

Procedure

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

2> Select Elementary search help and choose .

The maintenance screen for elementary search helps

appears.

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

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

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

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

7> Select the dialog type of the search help.

The dialog type defines how the hit list is displayed in the

input help.

8> Save your entries.

A dialog box appears in which you have to assign the search

help a development class.

9> Choose Activate .

Syntax:

PARAMETERS P_PARA1 MATCHCODE OBJECT <SEARCH_HELPNAME>.

Rewords some points,

Rgds,

P.Naganjana Reddy

5 REPLIES 5

Former Member
0 Kudos

Hi..,

A search help is a ABAP Dictionary object used to define possible values (F4) help . You can link a search help to a parameter as follows.....

<b>

PARAMETERS P_PARA1 MATCHCODE OBJECT <SEARCH_HELPNAME>.</b>

regards,

sai ramesh

Former Member
0 Kudos

Hi Rasheed,

go through this info.

You have to create a help view if a view with outer join is

needed as selection method of a search help.

The selection method of a search help is either a table or a

view.

If you have to select data from several tables for the search

help, you should generally use a database view as selection

method.

However, a database view always implements an inner join. If

you need a view with outer join for the data selection, you

have to use a help view as selection method.

The creation method for Help view is similar to that of

Database view.

The input help (F4 help) is a standard function of the R/3

System.

The user can display the list of all possible input values

for a screen field with the input help.

This standard process can be completely defined by creating a

searchhelp in the ABAP Dictionary. This search help only has to

be assigned to the screen fields in which they should be

available.

There are two types of search help:

Elementary search helps describe a search path. The elementary

search help must define where the data of the hit list should be

read from (selection method), how the exchange of values

between the screen template and selection method is

implemented

(interface of the search help) and how the online input help

should be defined (online behavior of the search help).

Collective search helps Combine several elementary search

helps. A collective search help thus can offer several

alternative search paths.

Each customer of a carrier 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.

1> The user should be able to search for the customer

number using the customer data, such as the name and

address.

2>The user should be able to search for the customer number

using existing customer bookings.

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

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.

For creation:

Procedure

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

2> Select Elementary search help and choose .

The maintenance screen for elementary search helps

appears.

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

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

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

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

7> Select the dialog type of the search help.

The dialog type defines how the hit list is displayed in the

input help.

8> Save your entries.

A dialog box appears in which you have to assign the search

help a development class.

9> Choose Activate .

Syntax:

PARAMETERS P_PARA1 MATCHCODE OBJECT <SEARCH_HELPNAME>.

Rewords some points,

Rgds,

P.Naganjana Reddy

Former Member
0 Kudos

Hi Salman,

F4 Help is used to give the Possible values for the Particular Field.

To create a F4 help,

Step1 : Go to Se11 and Select Search Help and Enter One Name and Click Create.

Step2 : Enter your Table name in 'Selection Method' Field.

Step3 : Enter the field Name and tick the Flags Imp and Exp and Type 1 and 2 in Lpos,

Spos fields.

Step4 : Save it and In se38 Write the Code Like This,

data Empname like Zemp-empname matchcode object [enter name that u Created].

Thanks.

Note : Reward If helpful.

Former Member
0 Kudos

Hai,

Basically you are not supposed to use differnetly the functionalities of F4 for Search help and similarly for Enter.

You want F4 help when you press Enter and Get initial screen of the transaction,Am i correct ?.

Yes, You can also do like that <b>Using Module Programming</b>.

You write the PAO Modules for the selection screen as below:

<b>CASE SY-UCOMM.

WHEN 'F4_HELP'.

CALL TRANSACTION SE11.(Tranction Name)

WHEN 'ENTER'.

CALL F4IF_FIELD_VALUE_REQUEST.(Function Modele for F4 Help)

ENSCASE.</b>

Hope You can proceed now.

<b>Reward points if it helps.</b>

Regds,

Rama chary.Pammi

former_member491305
Active Contributor
0 Kudos

Hi,

If you are using Your own elementary search help then, u can change the

Dialog type as 'DIALOG WITH VALUE RESTRICTION' in 'Dialog behaviour' property in 'Definition' Tab for that search help in SE11.After doing this then you can get selection condition before displaying List of F4 values.