cancel
Showing results for 
Search instead for 
Did you mean: 

Using Search Help with ALV and Dynamic context node

Former Member
0 Kudos

The topic subject already describes my situation.

I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.

This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.

Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.

I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:


  CALL METHOD lo_nd_info_root->add_new_child_node
    EXPORTING
      static_element_type          = vs_tabname
      name                         = 'SAMPLE_NODE_NAME'
*    is_mandatory                 = abap_false
*    is_mandatory_selection       = abap_false
     is_multiple                  = abap_true
     is_multiple_selection        = abap_false
*    is_singleton                 = abap_false
      is_initialize_lead_selection = abap_false
      is_static                    = abap_false
    RECEIVING
      child_node_info              = lo_nd_info_data .


cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = lo_nd_info_root
      node_name = 'SAMPLE_NODE_NAME'
      structure_name = vs_tabname
      is_multiple = abap_true ).

The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

when you have used the above approach, have you checked in debugging the type of value help then node information object is returning (IF_WD_CONTEXT_NODE_INFO) for those attributes..as VS_TABNAME is dynamic.

One more thing - give it a try -

As you have got the root node information object reference(IF_WD_CONTEXT_NODE_INFO) try to use

SET_ATTRIBUTE_VALUE_HELP to explicitly set the type of value help...

Answers (1)

Answers (1)

Former Member
0 Kudos

I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).

The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.

Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.

Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.

Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

Former Member
0 Kudos

If we have a structure in SE11 with all the value help maintained then if we provide this structure for dynamic node creation...

Then can we expect the behavior with search helps automatically determined...