on 07-12-2004 10:02 PM
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.
p_replacement_bee = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
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
Hello Brian and Bernhard,
It worked..thanks for your help..
Thanks And Regards
Rajeev Patkie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo Rajeev,
I did answer your question previously in another 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
... ).
++bcm
User | Count |
---|---|
74 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.