2008 Apr 23 6:50 PM
I am trying to write my first search help, F4 possible entries. Have
created the object and attached it to a ztable data elememt, at least I
think I have. However, when I try to get the possible entries for a screen
field using this data element I get a "no values found" error message.
Have tried to follow SAP search helps but always get lost. Have looked at
the example in www.help.sap which helped somewhat.
My main question is, where and how do the possible entries get loaded. Is
there something I need to do in the PBO or PAI?
2008 Apr 23 7:13 PM
hi eshwanth,
this problem occurs when you have not assigned values to a particular field or not activated that field.chk once. see below links
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm
http://209.85.165.104/search?q=cache:c2GazS6w-JQJ:fuller.mit.edu/tech/search_helps.pptSearchhelps%2Babap&hl=en&ct=clnk&cd=5
SAP ABAP : Attach a Search Help to the Screen Field
if u have a requirement to attach a search help to the screen field. When u click on the drop-down list, it should automatically pick the company code that is already displayed on the screen and show the results.
It dosent make any sense for search help to wait for user to input the same company code which is already displayed.
Use this functionality to get help.
FORM HELP_CHECK.
*-- Set up fields to retrieve data
ltab_fields-tabname = 'ZFI_PMNTADV'.
ltab_fields-fieldname = 'CHECT'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
ltab_fields-tabname = 'ZFI_PMNTADV'.
ltab_fields-fieldname = 'PMNT_ADV'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
SORT ltab_fields.
DELETE ADJACENT DUPLICATES FROM ltab_fields.
*-- Fill values
SELECT chect
INTO TABLE ltab_values
FROM zfi_pmntadv
WHERE pmnt_adv NE space.
SORT ltab_values.
DELETE ADJACENT DUPLICATES FROM ltab_values.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'chect'
tabname = 'zfi_pmntadv'
title_in_values_list = 'Select a value'
IMPORTING
select_value = so_chect
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
ENDFORM. "fiscal_year
thanks
karthik
reward me points if helpfull
I am trying to write my first search help, F4 possible entries. Have
created the object and attached it to a ztable data elememt, at least I
think I have. However, when I try to get the possible entries for a screen
field using this data element I get a "no values found" error message.
Have tried to follow SAP search helps but always get lost. Have looked at
the example in www.help.sap which helped somewhat.
My main question is, where and how do the possible entries get loaded. Is
there something I need to do in the PBO or PAI?
2008 Apr 23 7:13 PM
hi eshwanth,
this problem occurs when you have not assigned values to a particular field or not activated that field.chk once. see below links
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa5435c111d1829f0000e829fbfe/content.htm
http://209.85.165.104/search?q=cache:c2GazS6w-JQJ:fuller.mit.edu/tech/search_helps.pptSearchhelps%2Babap&hl=en&ct=clnk&cd=5
SAP ABAP : Attach a Search Help to the Screen Field
if u have a requirement to attach a search help to the screen field. When u click on the drop-down list, it should automatically pick the company code that is already displayed on the screen and show the results.
It dosent make any sense for search help to wait for user to input the same company code which is already displayed.
Use this functionality to get help.
FORM HELP_CHECK.
*-- Set up fields to retrieve data
ltab_fields-tabname = 'ZFI_PMNTADV'.
ltab_fields-fieldname = 'CHECT'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
ltab_fields-tabname = 'ZFI_PMNTADV'.
ltab_fields-fieldname = 'PMNT_ADV'.
ltab_fields-selectflag = 'X'.
APPEND ltab_fields.
SORT ltab_fields.
DELETE ADJACENT DUPLICATES FROM ltab_fields.
*-- Fill values
SELECT chect
INTO TABLE ltab_values
FROM zfi_pmntadv
WHERE pmnt_adv NE space.
SORT ltab_values.
DELETE ADJACENT DUPLICATES FROM ltab_values.
CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
EXPORTING
fieldname = 'chect'
tabname = 'zfi_pmntadv'
title_in_values_list = 'Select a value'
IMPORTING
select_value = so_chect
TABLES
fields = ltab_fields
valuetab = ltab_values
EXCEPTIONS
field_not_in_ddic = 01
more_then_one_selectfield = 02
no_selectfield = 03.
ENDFORM. "fiscal_year
thanks
karthik
reward me points if helpfull
2008 Apr 23 8:35 PM
Hi Eswanth,
The actual purpose of searchhelp is, i want to create a set of possible values which are stored in a table in a field i will create a searchhelp and i will assign this searchhelp to the field for which i want to provide the possible values.
If I have a field called code and I have another table with
a listing of all the codes. Can I create a search help on code to point
to the table that has all the codes. Is this possible. I am learning
search helps, and any input will be greatly appreciated.
steps to create a searchhelp.
1)go to se11
2)select searchhelp and enter any name starting with z and click on create and then select elementary searchhelp.
3)give a description and then name of the table which has listing of all the codes in the selection method.
4)in searchhelp parameters click on f4 and select the field which will store the code values
5)check imp,exp and enter 1 in Lpos,1 in Spos
6)save check and activate.
now the searchhelp is created.test in by pressing F8.
so now we have to assign this search help to the field code in another table.
steps.
1)go to se11
2)select table and open the table
3)select the code field and then click on searchhelp button which is above this data.
4)enter the searchhelp that we created earlier and then press enter
5)place the cursor infront of the field and then click on copy.
now the searchelp is assigned to the field code.
if you are not clear let me know
rewards points if useful.
2008 Apr 24 9:35 AM
Try to execute the sarch help directly to check whteher any values available.
Try to attch the search help directly to the screen field.
(If its a report program use 'Match code object' to attach search help.)
2008 Apr 25 5:23 AM
Hi
We go for search/help when we need to refer the fields of a particular table to another table.
To create search help,
1. In SE11,enter a name for Search/help.
2.Then enter the table name for which 'search/help' is to be created in the "Selection method" field
3.In 'Dialog Type' choose "Display Values immediately"
4.In 'Search Help Parameter' enter the required fieldnames of the table(can choose field names by clicking search icon).
5.Enable import,export.
6.mark LPOS as 1 and SPOS as 0
7.Save,check and activate.
8.In SE11,in tables object enter the second table name to which the above created search help is to be assigned.
9.Place the cursor in a particular field and click 'Search help' icon and it will ask the search help name(enter the created search help name)
10.Now the search help for that field is created.So when you create entries for this table search icon would have been enabled for the assigned field.
You can even create a search help at domain level.
while creating domain u can give values in the value range.but these are used for getting fiexed values.
Follow this procedure it will definetly work
Before creating the search help u need to enter the records in the table. i.e in the technical settings keep Display/maintenace allowed then do to utilities -> create entries.
then by creating the search help by the above procedure, when u click f4 values will be found for the particular field for which u created the search help.
thnx
sravani
Plz reward points if useful.....
2008 Apr 25 9:44 AM
Hi,
The input help (F4 help) is a standard function of the SAP 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 search help 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:
1.Elementary search help
2.Collective Search help
Elementary Search help:
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 help:
Combine several elementary search helps. A collective search help thus can offer several alternative search paths.
Creating Elementary Search Helps:
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.
2. Select Elementary search help and Hit enter.
3. Enter an explanatory text in the field Short text.
4. In the Definition tab page enter the selection method of the search help.
5. 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.
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. You can assign the parameter a Default value in the Default value field.
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.
9. Activate.
Collective search help:
1.In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
2. Select Collective search help .
3.In the Definition tab page enter the parameters of the collective search help.
4. On the Included search helps tab page, define the search helps that you want to include in the collective search help.
5. Position the cursor one after the other on each allocated search help and choose Parameter assignment.
2008 Apr 25 7:19 PM
Unless you are trying to do something out of the ordinary you should not have to do anything more than create the search help and link it up. Because you are getting no values found, it sounds like SAP is not finding any matches on the elements that you are using. Have you defined any default values? What data elements have you declared?