Skip to Content
avatar image
Former Member

SET LEAD SELECTION

Hi All ,

I am generating dynamic dropdowns in my WDA .

Now I want to set the values in these dropdowns to particular index .

I am doing the following piece of coding :

Do n times

here n is the counter , that many dropdowns shud be generated


DATA : lv_node type string value 'SYS' .
  CONCATENATE lv_node wd_this->count_sys INTO lv_node.
  wd_this->count_sys = wd_this->count_sys + 1.


 DATA: dyn_node TYPE REF TO if_wd_context_node.
  dyn_node = wd_context->get_child_node( name = lv_node ).

after that my piece of code to genertate the dynamic node .

now I am using lead selection for each dropdown as follows

  dyn_node->set_lead_selection_index( lv_index ).
EndDo.
 

suppose Do ..EndDo runs 4 times , so 4 dynamic dropdowns are generated , suppose 1st dropdown is set to lead selction 5 , 2nd to 7th , 3rd to 1st and 4th to 10th

now the problem is the lead selection for all the dropdowns is set to the last dynamic dropdown index , ie in this case all the dropdowns are set to lead index 10 . can any 1 help me , how to set index correctly .

regards,

amit

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 19, 2009 at 09:04 AM

    Hi,

    I think you are using the SAME attribute to all the dropdowns. hence it is taking the last set value.

    Is that so. what are attirbutes under that node.

    Or

    Get the reference of the dropdown then set the index.

    Regards,

    Lekha.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      The table that you are looping does this have dyn node instance.

      For ex: if you have created 4 nodes for 4 dropdowns, are you storing this dyn node instance in any table.

      One thing you do,

      store both the dyn nodes and droddown instacnes in one node (0:N) which has the respective types to store information.

      Now loop at this table, and set the lead selection.

      Regards,

      Lekha.

  • avatar image
    Former Member
    Aug 19, 2009 at 01:02 PM

    I had solved the problem by myself ,

    had to increment counter in select query

    Add comment
    10|10000 characters needed characters exceeded