cancel
Showing results for 
Search instead for 
Did you mean: 

I can't default some thing on a field? Unbelievable!

former_member194142
Participant
0 Kudos

Hello,

By using GUIBB of FPM_SEARCH_UIBB I have created a SEARCH webdyn pro app and it has 5 fields in search criteria, SY-UNAME (current user name) is the 1st field in search criteria, its greyed out,well, now I want to DEFAULT currently logged in user ID on the 1st field, pls. let us know how we can achieve my requirement of defaulting some thing before view / screen is launched?

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi,

Have you tried to set default value in wddoinit( ) ?

Regards,

Rama

former_member194142
Participant
0 Kudos

Thank you.

Do we have a WDDOINIT() method for a GUIBB -  FPM_SEARCH_UIBB? if so, can we access those hook methods?

Or am I missing some thing, pls. let us know

Former Member
0 Kudos

Hi,

Have you tried defaulting values in field catalog i.e in feeder class?.

Thanks

KH

ramakrishnappa
Active Contributor
0 Kudos

Hi,

To set default values to the search criteria using fpm_search_uibb.

Use the below code in your GET_DATA method of feeder class :


METHOD if_fpm_guibb_search~get_data.


   FIELD-SYMBOLS:

            <fs_search_criteria> LIKE LINE OF ct_fpm_search_criteria.

   CASE io_event->mv_event_id.

     WHEN cl_fpm_event=>gc_event_start.

       "===============================

       " Set default values

       "===============================

       READ TABLE ct_fpm_search_criteria ASSIGNING <fs_search_criteria>

       WITH KEY search_attribute = 'ERNAM'. " field name

       IF sy-subrc IS INITIAL AND <fs_search_criteria> IS ASSIGNED.

         <fs_search_criteria>-low = sy-uname.

       ENDIF.

       " Inform the framework the search criteria is changed

       ev_search_criteria_changed = abap_true.

     WHEN if_fpm_guibb_search=>fpm_execute_search.

       et_result_list = mt_policy_hd.

   ENDCASE.

ENDMETHOD.


Regards,

Rama



Answers (1)

Answers (1)

former_member194142
Participant
0 Kudos

Any help pls.?

Thank you