Application Development and Automation 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: 
Read only

Create search help

Former Member
0 Likes
446

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

3 REPLIES 3
Read only

Former Member
0 Likes
417

Can you explain in detail about ur question. that would help.

Read only

0 Likes
417

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.

Read only

Former Member
0 Likes
417

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