cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic F4 help

Former Member
0 Kudos

My application determines the required F4 help during runtime (when the user presses F4). In the past the function modules HELP_VALUES_GET or F4IF_INT_TABLE_VALUE_REQUEST could be used to bring up the corresponding F4 dialogue. Is there a corresponding service, that can be used for a web dynpro UI?

Accepted Solutions (1)

Accepted Solutions (1)

former_member515618
Active Participant
0 Kudos

Hi Thomas,

SAP has provided us with a class CL_WDR_VALUE_HELP_HANDLER to haldle different requirements in search helps. In your case you can use the method HANDLE_DD_SHLP to call the search help determined at runtime.

But there is a restriction here, we can not associate this to the context element so we have to have a event upon which this method can be called.

This is how you can use it.

Instead ot F4 create a small button besides the input field and give an icon 'Search'.

1. Create an attribute in the attributes tab

M_VIEW type ref to if_wd_view.

2. In WDDOMODIFY Do the following.

In WDDOMODIFY, get the reference to the view and fill it in m_view

IF first_time EQ 'X' .

wd_this->m_view = view .

ENDIF.

When user clicks on that button for search, Do the follwoing in the action handler method

Identify the search help by what so ever way.

DATA:

cl_view TYPE REF TO cl_wdr_view,

DATA:

node_xyz TYPE REF TO if_wd_context_node,

elem_xyz TYPE REF TO if_wd_context_element,

cl_view ?= wd_this->m_view.

Using the code wizard, read get the attribute.

  • navigate from <CONTEXT> to <CAUSE_ACTION> via lead selection

node_xyz = wd_context->get_child_node( name = wd_this->wdctx_xyz ).

  • Get element via lead selection

elem_xyz = node_cause_action->get_element( ).

  • Call the data base saerch help.

CALL METHOD cl_wdr_value_help_handler=>handle_dd_shlp

EXPORTING

context_element = elem_xyz

context_attribute = 'ATTRIBUTR' "Name of the attribute bound to the input field.

shlp_name = 'SEARCH_HELP_NAME'

is_read_only = 'True/False'

uielementid = 'Name of the Input field'

view = cl_view.

The following happens at runtime,

When the button is clicked, the search help is identified and then the above mehtod is called.

The Hitlist is displayed and when user selects the a value it is coppied back to the view->inputfield->fieldname that are passed into the method.

Hope this helps.

Regards,

Sravan Varagani

Answers (1)

Answers (1)

Former Member
0 Kudos

hi moritz...

you can make use of ovs for that.

---regards,

alex b justin