ALV restrict standard F4 and launch own.
I have a problem in my interactive ALV.
In my field catalogue I have a field wher ei provide REF_TABLE and REF_FIELD.
Now in the ALV, this column gets a automatic F4 which shows all entries coming for the field.
In normal conditions I want to display the standard F4 coming from the ref_table and ref_field for a ALV column.
But in some conditions, I have to restrict this standard F4 and launch my own F4 showing only restricted values.
Now in certain conditions, i launch a search help which shows restrictd values for this column. But after I make a selection from this F4 pop-up, the standard F4 pop-up also comes up, which I don't want now.
Do you know how can I avoid this second pop-up?
Thanks & Regards,
Marcin Pciak replied
You can customize this field by handling event onf4 . In the handler you can attach your custom search help or provide internal table input help and suppress standard input help pop up
METHOD handle_on_f4. DATA: repid LIKE sy-repid, dynnr LIKE sy-dynnr, field TYPE help_info-dynprofld. MESSAGE 'User defined value input' TYPE 'I'. repid = sy-repid. dynnr = sy-dynnr. field = e_fieldname. "this part work excatly as standard search help for this field "but is processed by a user althought looks like standard processing CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST' EXPORTING tabname = 'SFLIGHT' fieldname = 'SEATSMAX_F' dynpprog = repid dynpnr = dynnr dynprofield = field. "return to same screen field which triggered the event "prevent furhter standard processing er_event_data->m_event_handled = 'X'. ENDMETHOD.
I assumed you know how to properly register this event.