cancel
Showing results for 
Search instead for 
Did you mean: 

Initialization Lead Selection - how to remove it dynamically?

matteo_montalto
Contributor
0 Kudos

Hi all gurus,


I have a Context Node, bound with a table, with selection 0..n .

This Context Node is *standard*, and has the "Initialization Lead Selection"  is checked.

I cannot change this property via Enhancement as the check is not editable, so I wonder if there's a way to obtain the same result via a pre/post exit in WDDOINIT/WDDOMODIFYVIEW.

Is there any way to obtain this? I searched for methods of IF_WD_CONTEXT_NODE but found nothing...

Accepted Solutions (1)

Accepted Solutions (1)

rodolformoraes
Explorer
0 Kudos

Hi Matteo,

i didn't found any standard solution for that, so i think you can try something diferent.

Read your context node and get its node_info casting to the class that implements the source code for the if_wd_context_node_info interface

  DATA:
   lo_nd_test          TYPE REF TO if_wd_context_node,
   lo_node_info        TYPE REF TO if_wd_context_node_info,
   lo_cl_node_info     TYPE REF TO cl_wdr_context_node_info.

  lo_nd_test = wd_context->get_child_node( name = wd_this->wdctx_test ).
  lo_node_info = lo_nd_test->get_node_info( ).

  lo_cl_node_info ?= lo_node_info.
  lo_cl_node_info->reset( ).

Call the reset method of the cl_wdr_context_node_info class. Here is the trick, create a enhancement at the end of the method, asking about the corret node name that you need to initialize (ME->NAME), clear the ME->IS_INITIALIZE_LEAD_SELECTION attribute.

Hope it works,

Regards,

Rodolfo

matteo_montalto
Contributor
0 Kudos

Thanks Rodolfo,

sounds interesting even if it requires to apply an enhancement to a standard method class...
I really hoped there was a "cleaner" solution ...

Answers (0)