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

dropdownListBox in tableView

Hi@all,

I'm almost new to BSP and got following problem:

I need a dropdownlistbox within a tableview.

I fill an internal table (with a key field and a value field) in a page fragment for using it in the dropdownlistbox.

In the method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START I set the following code:

CASE p_column_key.
...
	WHEN 'ROW5'.

       CALL METHOD CL_htmlb_dropdownlistbox=>factory
          EXPORTING
            id                = 'ddlb1'
            nameofkeycolumn   = 'field1'
            nameofvaluecolumn = 'field2'
            table             = 'internal table'
            selection         = 'xyz'
          RECEIVING
            element           = l_r_element.
...
ENDCASE.

I get an error that the internal table wasn't found. How can I make the internal table from the page fragment available in the method cl_htmlb_dropdownListBox=>factory?

Thanks for answers...

Regards

Benjamin

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 03:12 PM

    You have to define a reference to a internal table of the type TIHTTPNVP.

    data M_SOLUTION_DDL type TIHTTPNVP .

    data M_SOLUTION_DDL_REF type ref to DATA .

    fill the table, set the reference

    GET REFERENCE OF m_solution_ddl into me->m_solution_ddl_ref.

    and pass the reference to the factory method

    GET REFERENCE OF m_solution_ddl into me->m_solution_ddl_ref.

    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.