cancel
Showing results for 
Search instead for 
Did you mean: 

How to put a dropdown in a tableview header??

Former Member
0 Kudos

I´m trying to replace a column title by a dropdown.

Iterators provide a method to define columns in a tableview (GET_COLUMN_DEFINITIONS), the most important parameter p_column_definitions has a component that looks interesting: DISPLAY_BEE.

I though I could send a dropdown in that BEE, but it ain´t rendering it.

Has anyone used this??

View Entire Topic
Former Member
0 Kudos

Hi there, I had similiar issues with this but I think you'll find what you are trying is just not possible.

/people/sap.user72/blog/2004/08/27/bsp-howto-tableview-iterator--column-header-graphics

That's the weblog with some updates that you can check out.

Former Member
0 Kudos

Dear Craig,

as you say, that´s what I found, doesn´t seem to be possible.. I don´t understand why, because that´s what seems to be the purpose of the DISPLAY_BEE element..

well.. I mean, what else could that be ment for..?

What about a BEE in the table title??

Oh.. about your weblog.. already tried that, it works to display an image, but not a BEE..

Former Member
0 Kudos

Some of the updates in the weblog and I thought I had a link there to a thread where SAP explains why it won't work.

former_member181879
Active Contributor
0 Kudos

The display_bee was our first idea about how to custom render a complete column. (Un)fortunately it failed for to many examples (or use cases) is that is why we added the iterator to the tableView. You can not get a ddlb into the column header. The only option that is possible is to use a filter row, which does support a ddlb as possibility.

PS: Max has a new weblog (which I still have to read) on exactly this aspect:

<a href="/people/sap.user72/blog/2005/05/05/bsphowto-filter-using-dropdown-in-tableview: Filter using DropDown in Tableview</a>

maximilian_schaufler
Active Contributor
0 Kudos

Hi Jonathan,

what are you trying to achieve with a dropdown in the header? Make the column's content variable for displaying changing columns of the internal table?

Maybe if you state your motivation behind it we can find a workaround together.

Max

Former Member
0 Kudos

Thanks Brian,

so it is not possible to use display_bee at all, is that right? Is there any way to add a BEE to the tableview header (the row where it shows the tableview title)? I guess no, but it doesn´t hurt to ask.

BTW Max´s weblog is great I already added several filters for other columns Thanks Max!

Regards,

- Jonathan

Former Member
0 Kudos

You can play around and try and hack but in the end you'll find that it's more trouble than it's worth and then the next SP comes and it stops working anyway.

So nope you are out of luck but if they are keeping track they can add both our names to the list of people who want it!!

Former Member
0 Kudos

Max, you got a good point, let me tell you..

Instead of having the user select a row and then clicking a button to add/edit/delete a record, I added a dropdown to each row so you can edit or delete it with just one click. But I need to insert a second dropdown that so far will have only one opcion ´add´.. (there will be more in other cases)

I´m not sure the filter row is the best place as it would create some confusion..

Former Member
0 Kudos

Typically I use images in an extra row added to the front of each row using the Iterator. If the row is not selected I show certain buttons if it is selected I show others like "Edit" or "Delete".

Basically how your taste is and what your users like.

Craig

Former Member
0 Kudos

Brian.. Is there any way to change de look (style) of the filter dropdown? to make it look like a normal ddlb..

maximilian_schaufler
Active Contributor
0 Kudos

Hi Jonathan,

I think the filter dropdown has been custom rendered ever since it was introduced, but I can't check that now.

However, instead of making the filter dropdown looking like "normal" dropdowns, why not make all your other dropdowns look like the filter one

This sure is not the best way, but your questions makes me assume that you do not know the <b>controlRendering</b> attribute yet:

<htmlb:content
   design           = "design2003"
   controlRendering = "SAP" >

It will render custom form elements instead of using the browser ones. Give it a try some time ...

As for your Add (and other functions) problem, here is my opinion:

I would not like to have actions that add/modify/delete a row in tableview being placed within the header of that tableview - because for me the header always corresponds to the column, not to the whole tableview and not to a certain row.

Having delete/modify within the editable rows is ok, because these actions are executed for the row.

Maybe place some buttons next to each other either above or below the tableview ...

You don't have to follow this idea, this is just how I think about it.

Max