cancel
Showing results for 
Search instead for 
Did you mean: 

Lead Selection Has Not been set

Former Member
0 Kudos

hi Friends ,

I am getting runtime error that lead selection has not been set .At times I am able resolve it .I will be happy if one can tell me Possible cases when such errore occurs and what solutions to it in those cases .

Another thing When to set Single ton ?When to not ?

Answers will be rewarded .

Cheers

Parry

Accepted Solutions (1)

Accepted Solutions (1)

S-H
Active Participant
0 Kudos

Hi Parry,

The error comes if the node has the cardinality 1..n and the lead selection is not set to the results which you bind to the node.

One of the option is to set the cardinality to 0..n or to set the lead selection of the node explicitly.

and also

if the UI element is bound to a context node or attribute on a node , where this

node is defined as : cardinality 0..n or 0..1. The framework will not create a default empty element in this case. When the view is to be rendered, its source content doesnt exist. AS the node has no elements. rendering fails....

Singleton:

The property singleton can be explained as the way to store dependent internal tables in the classical ABAP world. The dependent table could be the content of a cell in each table line (singleton=false <-> nested internal tables) or the dependent table could be an independent element, containing the dependent data of only one line of the parent table (singleton=true <-> independent internal tables).

i.e. If a Node A has child node B, which is having cardinality 0..n then

if singleton=false then for every element in the parent node collection (A in this case), there will be a distinct instance of the child node B.

Best regards,

Suresh

Message was edited by:

Suresh Honnappanavar

Former Member
0 Kudos

Thanks Suresh Honnappanavar ,

But In my case I have set cardinality 0..n still its throwing run time error...

Former Member
0 Kudos

Hi Parry.

Did you set initializie lead selection flag of the node?

Cheers,

Sascha

Former Member
0 Kudos

No I have not set that flag as my nodes are not containing data initially.

Second thing I am getting error on load of another view where I have used around 4 item list boxes and I have binded them single node individually .

like for item list box of cost center I have bind ND_COSTCENT and I have made its cardinality 0..n and selection 0..1 and lead_selection_flag is not set .Is it fine .

Last day it was working fine i don know after adding new node this error come .i m nt able to trace mistake i did .

Former Member
0 Kudos

Where did u add these new nodes? As subnodes?

Former Member
0 Kudos

new node was added in component controller . from my one view I am adding data to it and I want see same data in another view .So I am putting in in Component Controller .

Former Member
0 Kudos

Sacha , Should I set lead initaillization flag or not for ND_cost_center .

Former Member
0 Kudos

Hi Parry.

The error is thrown during the rendering process

of the UI element which is bound to the node cause there is no element to use for rendering. You should find out which UI element thows the error. The node is empty but the UIelement need at least one element to render.

Former Member
0 Kudos

hi Sascha ,

Thanks .Now how can I know , I can trace which UI element is causing the problem .

Former Member
0 Kudos

just post the shortdump completelty pls.

Answers (1)

Answers (1)

former_member194099
Active Participant
0 Kudos

Hi,

Go in debugging mode and check what is the lead selection. If the value is -2 then the lead selection is not set for the node. Then you can set it programatically using the method "set_lead_selection_by_index" at appropriate place.

Hope it helps.

Regards

Sagar

Former Member
0 Kudos

sagar thanks ,

but should i put break point . I m getting error just before new view is loaded like

Lead Selection has not been set .EDIT_VIEW .