cancel
Showing results for 
Search instead for 
Did you mean: 

OVS search help

Former Member
0 Kudos

Hi,

i implement OVS search help for one of the column (col B) in my ALV table. this OVS search help value is dependent on a column value example col A.

if col A = 1, it will display values of 1,

if col A = 2, will display values of 2.

when i.click on colB, how can i check which row in the ALV im clicking OVS search help for, in order for me to get the value of col A of the same row.

thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use the context element of your callback object,

just do get_attribute( exporting name = column name

importing value = value).

you find the exact name in phase 3 where you paste the selected value into the ovs search help field

grtz,

Koen

sorry too long typing

Message was edited by:

Koen Labie

Former Member
0 Kudos

Hi,

i tried both mtds, but i cant get wat i need.

can u show me code examples?

Former Member
0 Kudos

Hi,

sample:

data: elem_ovs type ref to if_wd_context_element.

elem_ovs = ovs_callback_object->context_element.

elem_ovs->get_static_attributes(

IMPORTING

static_attributes = STRUC_OVS ).

grtz,

Koen

Former Member
0 Kudos

Hi,

i've tried the way. but i've got this dump.

Note

The following error text was processed in the system SDC : Invalid operand type for the MOVE-CORRESPONDING statement.

The error occurred on the application server DVCSRM_SDC_10 and in the work process 0 .

The termination type was: RABAX_STATE

The ABAP call stack was:

Method: IF_WD_CONTEXT_ELEMENT~GET_STATIC_ATTRIBUTES of program CL_WDR_CONTEXT_ELEMENT========CP

Method: ON_OVS2 of program /1BCWDY/6VFOSV935DH9WEBJABHB==CP

Method: ON_OVS2 of program /1BCWDY/6VFOSV935DH9WEBJABHB==CP

Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/6VFOSV935DH9WEBJABHB==CP

Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP

Method: FIRE_EVENT of program CL_WDR_COMPONENT==============CP

Method: IFWDR_INTERNAL_API~RAISE_EVENT of program SAPLWDR_RG_PROXY_FACTORY

Method: IF_COMPONENTCONTROLLER~FIRE_OVS_EVT of program /1BCWDY/3ENEQWDG2IHGDHKPHTU1==CP

Method: WDDOINIT of program /1BCWDY/3ENEQWDG2IHGDHKPHTU1==CP

Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/3ENEQWDG2IHGDHKPHTU1==CP

this is how i declare the type for STRUC_OVS.

data: struc_ovs type ref to data.

is that correct? cause i think this is the one giving me the dump.

thanks a lot

Former Member
0 Kudos

Hi!

You need to use a strucure type for your STRUC_OVS. Try this -

data STRUC_OVS type wd_this->elements_<i>ctx_node</i>

where ctx_node is the name of your context node.

Hope this helps.

Regards,

Neha

Answers (1)

Answers (1)

Former Member
0 Kudos

You can get the row details as below, where wdevent is the importing parameter in your event handler.

Data: lr_element type ref to if_wd_context_element.

lr_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

Now do lr_element->get_static_attributes to get the data in the row. Based on the attributes, populate the search table for OVS.

Regards

Nithya