on 03-19-2007 2:09 PM
I have disabled the Lead selection in the table as it was giving a dump when there was no data and in certain scenarios not clear to me.
Can anyone tell me why we get dumps in Lead Selection? This concept is not getting clear to me
Hi Aishi,
A 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....
Now in your case check for the cardinality. You can try with different
cardinalities as per your requirements.
As per my understanding the reason for to get this dump is that you have set
the property "Initialization Lead Selection" to true of a context node in the
CALLED view.. now since initially there is no data in your context the system
is not able to perform this action and hence you get this dump. Uncheck this
and it should work fine.
Hope this answer will help you.
Cheers,
Darshna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aisha,
Please go to transaction ST22, select your dump and have a deeper look at it.
I assume that the dump occurs during the rendering phase (some classes containing something with "..adapter".
In most of these cases the data of a deepter node should be rendered. But if the parent node is empty, no lead selection can be set, and the rendering class has nothing to render, because the node, where the data should be, does not exist.
In this case you should make the ui elements invisible, which bind to the deeper node. You can do so either by context binding to a context attribute at the root node or a node in first level.
Another possibility is to call CL_WD_DYNAMIC_TOOL=>SET_VISIBLE_FROM_ELEMENT in the WDDOMODIFYVIEW method.
Ciao, Regina
Sorry guys. I am not able to get the concept. Lets take a very basic scenario. I created a context node in the component controller pointing to a table.
Then I mapped the node in the component controller to the view, and created a standard form from this context node. Thats it.
Following scenarios I noticed:
Cardinality : 1..1 or 1..n; no lead selection : Dump that Lead selection could not be initialized.
Cardinality: 1:1 or 1..n , lead selection set -> OKAY
Cardinality : 0..n or 0..1 : Lead selection set or not -> Dump
What I understand from 0..1 or 0..n is that there is no element existing at run time from where the view UI could get its data. Probably that results in a dump.
But when 1..1 or 1..n , how does Lead selection play a part?
Any clues please? This is really troubling me now.
Hi Aishi,
Hope this Helps you.
___________________________________________________________________
Cardinality
Description
1:1
The node contains only one element instance, which is instantiated automatically.
0:1
The node contains only one element instance, which must not be instantiated.
1:n
The node can contain multiple element instances, of which at least one must always be instantiated (and is instantiated automatically).
0:n
The node can contain multiple element instances, of which none have to be instantiated.
___________________________________________________________________
Bhawanidutt
Message was edited by:
Bhawanidutt Dabral
Thanks Bhawani. But I understand the meaning of cardinality.
Thats what I said that 0..n or 0..1 give a dump this makes sense as there is no node from which view could get data.
But 1..n or 1..n means there has to be a node at run time. What does Lead Selection play a part in this is what I do not understand. Why does switching off lead selection give a dump in this case?
Thanks again.
Hi Aishi ,
When you use Standard Form for your UI , and when you bind it to a context, it always takes data from the Lead Selection . When your lead selection is not set, you will get runtime error .
You can try experimenting a bit more as below ,
Cardinality : 1..1 or 1..n; no lead selection
With this scenario, in the method , WDDOINIT of your view you can try method, SET_LEAD_SELECTION , and you won't get any dump !
An Ex. in WDDOINIT of View
****************************************************************************************
data:
Node_Flighttab type ref to If_Wd_Context_Node,
Elem_Flighttab type ref to If_Wd_Context_Element,
Stru_Flighttab type If_Componentcontroller=>Element_Flighttab .
navigate from <CONTEXT> to <FLIGHTTAB> via lead selection
Node_Flighttab = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Flighttab ).
get element via lead selection
Elem_Flighttab = Node_Flighttab->get_Element( ).
CALL METHOD NODE_FLIGHTTAB->SET_LEAD_SELECTION
EXPORTING
ELEMENT = Elem_Flighttab
*****************************************************************************************
Regards
Saurabh
Hi,
can you give the dump text please?
grtz
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.