cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Value Help in a table view

Former Member
0 Kudos
172

Hi All,

I have created a value help for a field in a table view. This serch help result has 3 fields which are present in the table view also. If I choose any record from serch help, 3 fields are populated automatically as per the mapping.

DATA:ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
        lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
        lv_str_index TYPE string.

  IF iv_index IS NOT INITIAL.
* Take the index in a string
    lv_str_index = iv_index.
    CONDENSE lv_str_index.
    CONCATENATE 'TABLE[' lv_str_index ']' INTO ls_map-context_attr.
    CONCATENATE ls_map-context_attr 'PUBL_ID' INTO ls_map-context_attr SEPARATED BY '.'.

    ls_map-f4_attr = 'PUBL_ID'.    " Mapping Field of search help
    APPEND ls_map TO: lt_outmap.

*Flow the value of Publication name
    CONCATENATE 'TABLE[' lv_str_index ']' INTO ls_map-context_attr.
    CONCATENATE ls_map-context_attr 'PUBL_TYPE' INTO ls_map-context_attr SEPARATED BY '.'.
    ls_map-f4_attr = 'PUBL_DESC'.   " Mapping Field of search help
    APPEND ls_map TO: lt_outmap.

*  Flow the value of Publication owner
    CONCATENATE 'TABLE[' lv_str_index ']' INTO ls_map-context_attr.
    CONCATENATE ls_map-context_attr 'PUBL_OWNER' INTO ls_map-context_attr SEPARATED BY '.'.
    ls_map-f4_attr = 'PUBL_OWNER'.   " Mapping Field of search help
    APPEND ls_map TO: lt_outmap.

    CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
      EXPORTING
        iv_help_id        = 'ZCRM0003'   " search help name
        iv_help_id_kind   = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
        iv_input_mapping  = lt_inmap
        iv_output_mapping = lt_outmap.

  ENDIF.

But If I make those fields disable in the table view,, the serch help values are not flowing to those fields in table view.

Please help.!!!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If fields are disabled, your values from search help would never transfer to your field.

If you are giving option to user to enter the value from search help then field should be input enabled...In case you want to stop user from trying in incorrect/undesired value, then you can put checks on enter/save events and throw an error. In case search help that you are providing has limited set of values then go for dropdownn box, users cant type in dropdown box...

Hope that helps.

Regards,

BJ

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

As far as I know if the fields are not editable in the UI then F4 does not fill the values. However you can achieve this functionality with a workaround. Once the F4 value is filled for the key field (which is editable in UI), on pressing enter you can set the other 2 fields using entity set_property() method. This logic can be done inside eh_onsubmit or do_prepare_output().

Please reward if this information is useful.

Thanks,

Gopal