cancel
Showing results for 
Search instead for 
Did you mean: 

Class CL_WDR_ALL_IN_ONE_UTIL

Former Member
0 Kudos

Hi all!,

I´m just a begginer at WDA and I´m facing a problem that I can not go through it. I hope someone of you could help me because I´m in a hurry.

I have a table (normal table not a ALV) in a view, and I have to control when the user select one table entry (just one). I know about the OnLeadSelect event in the table, I´ve implemented it, I´m able to retrieve the exact register selected... and so on. But after processing, the table has always displayed as selected (dark yellow) the first register.

I´ve already dubugged several times WDR_TEST_TABLE application at SAP standard.

So, my cuestion is: is it mandatory to implement the CL_WDR_ALL_IN_ONE_UTIL class to use the OnLeadSelect event in a table?. I don´t really think so, but ... i´m a bit lost.

Thanks a lot for your help!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi beatriz,

Lead selection is initialized automatically for each newly created context node.

you can also manually set the lead selection

Manual initialization of lead selection-If automatic initialization was deactivated, the lead selection can be programmed manually. In this case it is possible to assign this property to an element other than the first element of a node (for example, using an index).

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!,

Thank you all for your answers. Now it is working!!!

The class CL_WDR_ALL_IN_ONE_UTIL is not mandatory. When I knew that I focused in other part of the code. And then, thanks to Anand Prakash Rai answer I started to think that I was re-creating muy context again and again.

And that was the answer!. I had the binding part at WDMODIFYVIEW method, I don´t know exactly why, but when I changed it to other even it started to work.

Thank you very much!!

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi ,

No class needs to be implemented .

if you want to change your lead selection as such you can use the methods

SET_LEAD_SELECTION_INDEX Set Element of Lead Selection with Index

SET_LEAD_SELECTION Set Element of Lead Selection with Index

MOVE_FIRST Set Lead Selection to First Node Element

MOVE_LAST Set Lead Selection to Last Node Element

MOVE_NEXT Set Lead Selection to Subsequent Node Element

MOVE_PREVIOUS Set Lead Selection to Previous Node Element

MOVE_TO Set Lead Selection to Specified Node Element

where you can change your lead selection.

Priya

Former Member
0 Kudos

hi ,


is it mandatory to implement the CL_WDR_ALL_IN_ONE_UTIL class to use the OnLeadSelect event in a table?.

no the class is not mandatory

just change the SELECTION MODE property of UI to single

refer the SAP online help

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2d/390e422dfcde2ce10000000a1550b0/content.htm

rgds,

amit

Former Member
0 Kudos

hi,

Change the Selection mode property of Table to Single.

Now you will be able to select only one row in a table.

For getting the selected row, i think you have already implemented Lead Selection Event.

No class needs to be implemented to use Lead Selection Event.