Quantcast
Channel: SCN : Blog List - Web Dynpro ABAP
Viewing all articles
Browse latest Browse all 107

How my tables in WDA kept losing Lead Selection

$
0
0

More than once I got myself on the same scenario when developing an Web Dynpro ABAP application.

 

I would create a standard WD Table element and proceed to bind it to a context node and create a onLeadSelection method.

 

Except that when I selected a table row, instantly the screen would try to call my onLeadSelection method and fail, returning to select the first row instead.

Twice, on different applications, I had the same behavior. And it took me the same amount of time to discover what it was causing this.

 

 

The issue was very simple: I was re-binding the context node of the table!

 

On the onLeadSelection method, I was trying to update the table data, but the result of this is that the table resets the Lead Selection.

 

So, next time you cannot change the Lead Selection of a WDA table, try checking if your onLeadSelection method is not modifying the context node of the table in any way. Such as methods:

 

     lo_node->bind_table( new_items = itab ).

or

     lo_node->invalidate( ).

or

     other methods of if_wd_context_node (bind_element, bind_structure, clear_selection,... )

 

Regards,

Felipe


Viewing all articles
Browse latest Browse all 107


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>