Skip to Content

Dynamic search help using value set is not working in any method other than wdinit

Hi,

I am creating the dynamic value help using the below code. It is working only when I put the code in wdinit() method.

My requirement is to get the dynamic value help values based on another field selected so I cannot put the code in wdinit().

Let me know how we can catch the event when the user clicks f4 button in above scenario so that I can get the query field value(project) and get the dynamic search help values(wage type relevant to that project).

DATA lo_nd_flightinfo TYPE REF TO if_wd_context_node.

DATA lo_nd_info_flightinfo TYPE REF TO if_wd_context_node_info.

DATA lt_value_set TYPE wdy_key_value_table.

DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .

lo_nd_flightinfo = wd_context->get_child_node( name = 'FLIGHTINFO' ).

lo_nd_info_flightinfo = lo_nd_flightinfo->get_node_info( ).

lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

lo_componentcontroller->read_carrid( IMPORTING e_carrier_vs = lt_value_set ).

lo_nd_info_flightinfo->set_attribute_value_set( name = 'CARRID' value_set = lt_value_set ).

Thanks & Regards,

Kiran Kumar K

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Aug 14, 2012 at 01:43 PM

    Hi Kiran,

    There is no event for onClick of the F4 button, but you could move your code into hook method WDDOMODIFYVIEW, which will execute upon return from a search help.

    Cheers,

    Amy

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Amy,

      My requirement is to have a search help not dropdown because user want to see both value and text together.

      The importing parameters for the elementary search help doesn't help in my case as I need to search the ztable to fetch the active record at that point of time based on the work_date I.e workdate should be in between begda and enda. The workdate field is not there in the ztable from where I am searching the records but there are begda and enda.

      Again below code is working when I put the same in WdInit() for search help but it is not working in any other method.

      Its working fine I.e in other methods in the case of dropdown but incase of UI element to be input field(I.e for search help) it is only working in WdInit() and not working in any other methods.

      I have put the context attribute property 'Input Help Mode' to be 'automatic'.


      I am referring the below tutorial:

      http://fuller.mit.edu/web_dynpro/value_help_web_dynpro_tutorial.pdf

      I am using the below code:

      DATA:

      lr_node_sbook type ref to if_wd_context_node,

      lr_node_info type ref to if_wd_context_node_info,

      lr_value_set type wdr_context_attr_value,

      lt_value_set type table of wdr_context_attr_value.

      lr_node_sbook = wd_context->get_child_node( name = wd_this->wdctx_wbs_order_wt ).

      lr_node_info = lr_node_sbook->get_node_info( ).

      *define value set

      lr_value_set-value = '1166'.

      lr_value_set-text = 'Living Allowance Non Taxable'.

      Append lr_value_set to lt_value_set.

      lr_value_set-value = '1167'.

      lr_value_set-text = 'Travel Allowance Non Taxable'.

      Append lr_value_set to lt_value_set.

      lr_node_info->set_attribute_value_set( name = 'DEF_WT1'

      value_set = lt_value_set ).

      Thanks & Regards,

      Kiran Kumar K

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.