cancel
Showing results for 
Search instead for 
Did you mean: 

Replace F4 in runtime (dynamically)

0 Kudos

Hallo Colleagues and Experts,

I have a field which already assigned to a F4 (I defined ddic_shlp_name in if_ofm_guibb_form~get_definition)

Now in Form I have a dropdown, I would like the F4 to be replaced with other F4 if the dropdown changed.

Can this be done?

Thank you and best regards,

Steve

Accepted Solutions (1)

Accepted Solutions (1)

jens_boeckenhauer
Active Participant
0 Kudos

Hi Steve,

dynamic exchange of search helps is not supported in (static) GUIBBs. But you could define a field catalog based on a DDIC structure having assigned a context sensitive F4 help which takes the value of the other field (bound to the drop down) into account. Alternative you may use the OVS technique (IF_FPM_GUIBB_OVS) and code against the value of the drop down.

Best regards

Jens

0 Kudos

Hi Jens,

Thank for your reply.

could you please give me more explanation to the 1st alternative, probably code example?

My knowledge ends here:

method if_fpm_guibb_form~get_definition.

eo_field_catalog ?= cl_abap_typedescr=>describe_by_data( my_struct_data ).

I will of course consider the OVS alternative.

Thank you, I really appreciate your help.

Best regards,

Steve

jens_boeckenhauer
Active Participant
0 Kudos

Hi Steve,

if my_struct_data is based on a DDIC structure (e.g. TYPE sflight), the structure field corresponding input field could have an assignment of a value help (on DDIC structure level) with two import parameters: one mapped to the field itself and the other one mapped to the structure field corresponding to your drop down. If this value help provides different result sets depending on the second import parameter, this may solve your requirement.

Best regards

Jens

0 Kudos

Hi Jens,

I got it,

so basically I will need to programm the F4 help myself if I want to influence it with additional condition, if its not provided yet. I will have a look the option with OVS


Thanks,

Steve

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Steve,

You can create one Z-table with two fields

Dropdown value

Shlp Name

So based on dropdown selected, you can fetch shlp name from z-table and you can pass that shlp name.

Thanks

KH

0 Kudos

Hi Katrice,

Thanks for your reply,


You said "pass that shelp name". This is exactly what I want to do, where can I do that?

There are only three method which are called on dropdown event: flush, process event, and get data.

I do not see any fields contain the shelp, which I can replace.

Best regards,

Steve