cancel
Showing results for 
Search instead for 
Did you mean: 

Search Help on a table's field: how to get row attributes?

matteo_montalto
Contributor
0 Kudos

Hi all gurus,

we have to modify an existing search help on SRM 7... we can both modify the standard one OR replacing it with a custom one... but we're facing a difficulty in getting row's data.

In depth: data are shown in a table, which is build up with many items (rows). The user can click on the search help (specifically, on the PRODUCT_ID field) of a row. We would like to get data of the row, as the search help should filter possible results at runtime on the basis of a specific custom field value.


How can we do it? As far as I've seen, there's no visibility on the WD Context node (e.g., the table) to get the selected element, and retrieve its attributes.


Any help will be appreciated

Accepted Solutions (1)

Accepted Solutions (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi Matteo,

May be you could create an OVS for that field, in the method for the event OVS you can use the method ovs_callback_object->context_element->get_static_attributes.

Regards

Answers (3)

Answers (3)

former_member210266
Active Participant
0 Kudos

Hi

You can use the class static attribute

cl_wdr_value_help_handler=>m_context_element 

It contains the current web dynpro element from which the F4 has been called.

Regards

Swati

Former Member
0 Kudos

Hi Matteo,

We came across a similar situation where we needed to filter on the search help values of a field based on other field values on that row.

For this, we implemented search help exit in the search help of table structure. The search help will take in other fields as importing and and the search help exit FM can be used to filter the results.

No change on WDA side was required.

Thanks,

Pris.

matteo_montalto
Contributor
0 Kudos

Hi Prisford,

I notices that search help exit has an IMPORTING section which is, by standard, empty. But since the call of that function seems to be dynamic, how can you pass other field's value as parameter for that function?
I guess that simply adding my Zfield as IMPORTING parameter will not work....

Former Member
0 Kudos

You would need to add the zfield as an importing parameter in the search help.

And in the search help exit, this importing parameter can be referenced from table SHLP_SELOPT.

Once you qurey on the importing parameter, the result can be sent to the serch help screen using FM

F4UT_RESULTS_MAP.

Regards,

Pris.

former_member217546
Participant
0 Kudos

Hi,

Below link may help you,this is the similar case like above.

http://scn.sap.com/thread/3345856

Thanks,

sudheer