cancel
Showing results for 
Search instead for 
Did you mean: 

F4 HELP FOR INPUT FIELD DYNAMICALLY

Former Member
0 Kudos

Dear Experts,

Can anyone let me know how to provide F4 help for a input field dynamically based on launch type = Change & Display.

Senario:

1) On launch type = Create ( It should be just input field)

2) On launch type = Change ( The same input field should contain F4 help)

3) On launch type = Display ( The same input field should contain F4 help)

Thanks

Katrice

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Katrice,

You can use if_wd_context_node_info->set_attribute_value_help( ) to set, change or deactivate the value help associated with a context attribute. Here is some documentation for the interface and its methods.

Cheers,

Amy

Former Member
0 Kudos

Amy,

Can you explain me with example?...

Katrice.

amy_king
Active Contributor
0 Kudos

Hi Katrice,

Here's an example...

DATA: lo_nd_mynode      TYPE REF TO if_wd_context_node, 
      lo_nd_mynode_info TYPE REF TO if_wd_context_node_info. 

* Get the node info object
lo_nd_mynode = wd_context->get_child_node( 
  name = wd_this->wdctx_mynode ). 
lo_nd_mynode_info = lo_nd_mynode->get_node_info( ). 

* Assign a DDIC search help to the context attribute
lo_nd_mynode_info->set_attribute_value_help( 
  name            = 'CONTEXT_ATTRIBUTE_NAME'
  value_help_mode = 121 " DDIC Search Help 
  value_help      = search_help_name ).

* Or deactivate the search help on the context attribute
lo_nd_mynode_info->set_attribute_value_help( 
  name            = 'CONTEXT_ATTRIBUTE_NAME'
  value_help_mode = 101. " Deactivated

See IF_WD_CONTEXT_NODE_INFO attribute C_VALUE_HELP_MODE for the list of possible values for parameter value_help_mode.

Also check out example web dynpro component, WDR_TEST_CHANGE_VHELP.

Cheers,
Amy

Former Member
0 Kudos

Thanks Amy

Katrice

Former Member
0 Kudos

Amy,

What if in the case of custom search help which i've created ?.......

........

Thanks

Katrice

former_member185241
Active Participant
0 Kudos

Katrice,

For your custom Search help (Created in SE11) ,  method set_attribute_value_help  is enough.

DATA: lo_nd_mynode      TYPE REF TO if_wd_context_node,

      lo_nd_mynode_info TYPE REF TO if_wd_context_node_info.

* Get the node info object

lo_nd_mynode = wd_context->get_child_node(

  name = wd_this->wdctx_mynode ).

lo_nd_mynode_info = lo_nd_mynode->get_node_info( ).

* Assign a DDIC search help to the context attribute

*......... Depending on your condition you can assisgn different search help to same input field( Attribute the input field is binded with )

IF lv_opt  is initial.

lo_nd_mynode_info->set_attribute_value_help(

  name            = 'CONTEXT_ATTRIBUTE_NAME'  

  value_help_mode = 121                                                        " DDIC Search Help

  value_help      = SE11_search_help_name1 ).

ELSEIF lv_opt is not initial.

lo_nd_mynode_info->set_attribute_value_help(

  name            = 'CONTEXT_ATTRIBUTE_NAME'  

  value_help_mode = 121                                                        " DDIC Search Help

  value_help      = SE11_search_help_name2 ).

ENDIF.

Thanks

abhishek

amy_king
Active Contributor
0 Kudos

Hi Katrice,

Just give the name of whichever search help you'd like to use, standard or custom.

lo_nd_mynode_info->set_attribute_value_help( 
  name            = 'CONTEXT_ATTRIBUTE_NAME'
  value_help_mode = 121 " DDIC Search Help 
  value_help      = search_help_name ).

Cheers,

Amy

Answers (0)