cancel
Showing results for 
Search instead for 
Did you mean: 

problem in get_lead_selection_index( ). . pls help

Former Member
0 Kudos

Hi frnds,

I have two tables.. one below the other..

the below table has drop down values. lets say table2

the above has the item list. lets say table1

WHen a new record is selected in the table 1, the below table2 has to update few values. for that i created a action, and assinged to onLeadselect for table1. it is working fine.

But on table1, i have a button Delete, which deletes the row selected. to get the index of row i am using get_lead_selection_index( ).

but it is giving wrong values.. like 2- if last row if i delete, 1 value if second row delted...

and giving dump if i delete the only record..

pls help ... i even tried to read the context using the wizard,, that is also giving wrong values, which is not slected...

kindly help

thanks in advance,

niraja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In the First table on Select Event add

NEW_LEAD_SELECTION type IF_WD_CONTEXT_ELEMENT in the action parameters.

And use this NEW_LEAD_SELECTION to get the index, value what ever u want.

Former Member
0 Kudos

Vikranth,

Do you mean onLeadselect for table1 event/action? or the action or event i assigned for Delete button?

which one?

if delete button is clicked, i want to knwo in that action, which row index is selected...

pls help..

Niraja

Former Member
0 Kudos

Hi,

You can add attributes in the View to store the selected values .

For eg Add gv_index type i.

Now in the On select first table add a parameter NEW_LEAD_SELECTION type IF_WD_CONTEXT_ELEMENT in the action.

Now

use the get index method.

CALL METHOD new_lead_selection->get_index

RECEIVING

my_index = lv_index.

wd_this->gv_index = lv_index.

Now when u press the Delete Button the wd_this->gv_index gives the current index which u have selected before

And in the properties of the table SelectionMode use singleNoLead proerty so that the user has to select some value to delet the records.

Answers (0)