cancel
Showing results for 
Search instead for 
Did you mean: 

How we can disable lead selection programitically?

former_member194142
Participant
0 Kudos

Hello,

I have a standard SAP's WDA and it has a TABLE (not ALV pls.) node, I mean, the node is defined as Cardinality 0...n; Selection 0...n; Lead selection is checked

For some reason, we need to disable/uncheck this Lead seelction so that default lead selection will not occur and user has to explicitly select the row

Pls. let us know how can we achieve our requirement, code snippet pls. if u get a chance

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

did you try IF_WD_CONTEXT_NODE->CLEAR_SELECTION( )?

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi,

I agree with Mr. Jozef's suggestion to use CLEAR_SELECTION

You can achieve your requirement as below

  • Create post exit enhancement for WDDOMODIFYVIEW( ) method
  • Identify the context node bound for standard table and write the below code

          data lo_node type ref to if_wd_context_node.

              

         " Clear the selected row(s) only for first time

          if FIRST_TIME eq abap_true.

               lo_node = wd_context->get_child_node( name = wd_this->wdctx_my_node ).

               lo_node->clear_selection( ).

          endif.

Note: Replace 'my_node' with your node name

Hope this helps you.

Regards,

Rama

former_member194142
Participant
0 Kudos

Any help pls.?

Thank you

former_member210252
Contributor
0 Kudos

Hi,

Try using the method

SET_LEAD_SELECTION method of the IF_WD_CONTEXT_NODE interface.

Regards,

Mohammed