Can I call a search help programatically, with some parameters already filled in and non-editable?

vlad-ardelean picture vlad-ardelean · Jun 17, 2013 · Viewed 10k times · Source

I have collective search help S_MAT1 defined for data element MATNR.

I want to invoke programatically the append search help S_MAT1_APPEND, this means that when I press a button in an ALV list, I have to trigger a search dialog, like that for a search help.

I'd also want to be able to fill in some parameters automatically, and not let the user change those.

I am expecting to find a function module that does this. HELP_START doesn't seem too documented, and doesn't seem to be what I want.

Can this be done?

Answer

vwegert picture vwegert · Jun 17, 2013

Yes. Use the function module F4IF_GET_SHLP_DESCR to get a description of the search help, then call F4IF_START_VALUE_REQUEST with the description data. Be aware that you need to set SHLP-INTERFACE-VALFIELD to X for the fields you want to get back from the value help.