Hi Parrul,
As you are using a search help for getting the f4 help you no need to worry about the popup close event and other things, here you are not trying to display a view as a popup. The problem might be with the input and output tables which you need to pass along with the search help name. Check the below code. lets take an example for the field country, we need to append the context attribute and f4 attribute( field name in our search help ).
ls_map-context_attr = 'ext.zzcountry'.
ls_map-f4_attr = 'LAND1'.
APPEND ls_map TO: lt_inmap, lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'ZZCOUNTRY' “search help name created in SE11
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Regards,
Bala.