cancel
Showing results for 
Search instead for 
Did you mean: 

Filter using DropDown in Tableview

Former Member
0 Kudos

Hi everyone,

I tried following example

/people/sap.user72/blog/2005/05/05/bsphowto-filter-using-dropdown-in-tableview

but with the addition, that i prepared a "normal" BSP. Now, I have the problem, to get the selected dropdown value...How can i get this in the event "OnInputProcessing"?

thanx and best regards

Andi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Max, Monica,

thank you for your answer.

@Max

Your right, I don't need the selected dropdown value...

@Monica

The Filter Example BSP Application <b>SBSPEXT_TABLE</b> was very helpful.

I have found the mistake. I forgot to fill the column <b>name</b> of the filter table;-)

best regards

Andi

Former Member
0 Kudos

Hi Andi,

You can also check the filter example in "SBSPEXT_TABLE " bsp application .

To get the selected dropdown value you can use the "GET_ROW_FILTER_VALUE" METHOD of CL_HTMLB_EVENT_TABLEVIEW class.

check this ex code .

********OnInputprocessing********

IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.

data: sel type string.

  • Scenario 1: Read event from manager.

DATA: event TYPE REF TO CL_HTMLB_EVENT.

event = CL_HTMLB_MANAGER=>get_event( request ).

IF event IS NOT INITIAL AND event->name = 'tableView'.

DATA: tableview_event TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.

tableview_event ?= event.

sel = tableview_event->GET_ROW_FILTER_VALUE( COLUMN_INDEX

).

ENDIF.

ENDIF.

*********************************

I hope this will be of some help.

Regards

Monica

maximilian_schaufler
Active Contributor
0 Kudos

If you are using <b>filter="SERVER"</b> for the tableview you should not need to manually use this value anywhere.

However, if you want to use it, have a look at this class and its methods, especially the following one:

<b>CL_HTMLB_EVENT_TABLEVIEW=>GET_ROW_FILTER_VALUE</b>

With some basic understanding of the eventing system you should be able to achieve what you need. Have a look at these two weblogs:

<a href="/people/brian.mckellar/blog/2004/07/18/bsp-in-depth-using-the-htmlb-event-system In-Depth: Using the HTMLB Event System</a>

<a href="/people/brian.mckellar/blog/2004/07/28/bsp-programming-handling-htmlb-events Programming: Handling HTMLB Events</a>

Cheers,

Max