‎2006 Oct 11 4:09 PM
Hi,
I want to create a search help for a field made in screen painter and I used in the PAI FIELD cycle select * from table where .... The search helps appears but after I select one value in the corresponding field nothing appears. How can I solve this problem?
Thanks
‎2006 Oct 11 4:11 PM
‎2006 Oct 11 4:19 PM
For the values I want to enter in that field there isn't any search help, so how can I make one?
I have tried something In the PAI Module using FIELD... SELECT. The search help appears but when after I choose a value from the list it doesn't appear in the input field.
‎2006 Oct 11 4:51 PM
Hi,
It is better you create a Search help in SE11 for that filed, and assign this search help in SE51, it is simple you will not do any program lines for this one.
If you want to create a Search help, it is better to write in PBO module ... see the below code to add a search help
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.
Regards
Sudheer