cancel
Showing results for 
Search instead for 
Did you mean: 

Table & OVS help

baskaran00
Active Participant
0 Kudos

Hi,

I'm having a table UI element with 3 columns.

Table has some 5 rows for example.

In 1 column I have given OVS help.

I'm having my lead selection in Row1.

Problem is:

col1 Press Result

row1 abc* F4 Gives search help according to abc*

row2 a F4 Gives search help with abc* instead a**

I know that this is bcoz of the lead selection.

But dynamically i have to get the lrows lead selection when F4 is pressed on any rows.

Can anyone help me.....

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In the coding for the OVS, instead of using lead selection, use the WDEVENT instance of class CL_WD_CUSTOM_EVENT. Call the method GET_CONTEXT_ELEMENT of the class CL_WD_CUSTOM_EVENT, with the node name as the input to the method. It will return you the corresponding element.

Hope this helps

Regards

Wenonah

baskaran00
Active Participant
0 Kudos

Hi Wenonah,

I tried with ur logic but end up with dump saying "Access via 'NULL' object reference not possible"

I used the below code

data idx type i.

lo_element = wdevent->get_context_element(

name = 'CONTEXT_ELEMENT').

lo_element->get_static_attributes(

importing

static_attributes = ls_elt ).

CALL METHOD lo_element->GET_INDEX

RECEIVING

MY_INDEX = idx.

Can you help me whr i'm wrong???

Thanks

Former Member
0 Kudos

Hi Router,

Check this code for getting index of the table.

DATA : INDEX TYPE I.

CALL METHOD lo_element->get_lead_selection_index
  receiving
    index  = INDEX.

Thanks.

baskaran00
Active Participant
0 Kudos

Viji,

Thanks for ur replay.

Your code helps if i have selected a row.

But i may click any cell in the table. When clicking a cell i should get the index of that row.

Thanks

Former Member
0 Kudos

Hi,

There is an easier way, the OVS_CALLBACK_OBJECT will give you the context element: Use ovs_callback_object->context_element to access the element.

Regards,

Wenonah

Answers (0)