on 11-04-2008 5:25 PM
Hi friends.
I am getting The lead selection has not been set error:
scenario:
I have a view with a table which displays some records(item level of a sales order).
Below that table i created a container and inserted 5 input fields.
for this i created a context node with table fields and then a subnode with container fields (5 fields).
Now when ever a new record is selected in table, the below 5 input fields has to be updated with the selected item. So i crreated subnode, and bind_strucutre( ls_stru ).
for table i used bind_table( lt_tab ).
when i selected a new record in the table im getting : The lead selection has not been set: error......
i checked the cardinalliyt to 0..1, 0..n, 1..1, 1..n.. but no use... kindly help me this is very
thanks in advance..
Niraja
Hi Niraja,
Verify if the property "Initialization Lead Selection" for the node corresponding to the table is checked. Try checking it if its unchecked.
Best Regards,
Rashmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rashmi,
Thanks but i checked both the ways.. but still its giving the same error..
Basically sometime it works when my page loads.
But whtn i click the second record of item table, to which the input fields below that should be updated and shown up... it gives the dump here.
Kindly give me some help here.
Niraja
Are these the steps u have followed:
Node A (table)
---Node B (5 input elements)
Create Node A (For the table data)
-cardinality - 0:n
-selection - 0:1
check Initialize Lead Selection (This would not have been needed if you would have modelled the node b as a brother and not child)
Create Node B under Node A
-cardinality - 1:1
-selection - 0:1 / 1:1
check Initialize Lead Selection
In the Layout, for the Element table, selectionMode is auto
the property rowSelectable should be checked
Method shoudl be defined as follows for the event OnLeadSelect of the table
DATA lo_nd_A TYPE REF TO if_wd_context_node.
DATA lo_el_A TYPE REF TO if_wd_context_element.
DATA ls_A TYPE wd_this->element_keyfig_table.
lo_nd_A = wd_context->get_child_node( name = wd_this->wdctx_A ).
* get element via lead selection
lo_el_A = lo_nd_A->get_element( ).
* get all declared attributes
lo_el_A->get_static_attributes(
IMPORTING
static_attributes = ls_A ).
*Read the row selected and populate Node B attributes.
It should work if its done this way.
If you still get a dump, can you post the text of the dump?
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.