Skip to Content
author's profile photo Former Member
Former Member

Drop-DownListbox in TableView Control

Hello All,

I tried to incorporate drop-downlist box in one of the columns of tableview.The column which contains this drop-downlistbox is dynamic column i.e. it gets populated on an event. I had tried using text box using the concept of iterator which works fine by using following code:

p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(

id = p_cell_id

value = f_name

type = 'string'

size = '20'


For implementing the drop-downlist I tried to populate an internal table in IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS method (since this method is fired only once) and use the same in above code i.e.


id = p_cell_Id

table = myItab

selection = myString

nameOfKeyColumn =

nameOfValueColumn =


but it gives error while compiling iteslf giving type mismatch error for table parameter..I had used in the layout where it works fine passing internal table as parameter.Also it does not allow to type-caste using ?= operator.

How to implement the iterator concept in this case?

Thanks in advance.

Thanks And Regards

Rajeev Patkie

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jul 14, 2004 at 01:17 PM

    Hello Rajeev,

    the problem is the parameter mismatch. You want to give a internal table to parameter which is declared as "type ref to data" - that means you have to create a data reference (to your table) and pass it to the parameter of the factory method.

    Hth, Bernhard

    Add a comment
    10|10000 characters needed characters exceeded

    • Hallo Rajeev,

      I did answer your question previously in another Different Listboxes in Tableview-Colum with some links to the actual code. Don't know why it missed this thread.

      Bernhard is correct that you need to get a reference on the data. Please check ABAP documentation for the command "GET REFERENCE OF".

      The relevant bits and pieces of source code is:

      data M_CURRENCIES_REF type ref to DATA.
      GET REFERENCE OF me->m_currencies INTO me->m_currencies_ref.
      p_replacement_bee = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
         id                = p_cell_id
         table             = me->m_currencies_ref
         ... ).


  • author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2004 at 06:58 PM

    Hello Brian and Bernhard,

    It worked..thanks for your help..

    Thanks And Regards

    Rajeev Patkie

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.