Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get Cell Value (Tableview)

Hi,

I use tableview for a BSP tool.

When I use the tableview, and I get the data, it's alright.

table ?= cl_htmlb_manager=>get_data( request = request
                                     name    = 'tableView'
                                     id      = 'start_tbv_pack' ).

      table_event ?= table->data.
      lv_i = table_event->selectedrowindex.

      data = table_event->get_cell_value( row_index    = lv_i
                                                       column_index = '2' ).

But when I use a tableviewcolumn, in my BSP, the table_event->get_cell_value is empty.

The function can get the cellname (start_tbv_pack_3_2) but is not returning any values.

Code:

<htmlb:tableView id               = "tbv_pack"
                           headerText       = "Pack configuration"
                           width            = "100"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "<%= lv_i %>"
                           fillUpEmptyRows  = "true"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           onRowSelection   = "SET_PACK"
                           selectionMode    = "LINEEDIT"
                           selectedRowIndex = "<%= controller->lv_packselect. %>"
                           table            = "<%= model->packs %>"
                           tabIndexCell     = "true"
                           iterator         = "<%= model->ADMIN_ITERATOR %>" >
            <htmlb:tableViewColumns>
              <htmlb:tableViewColumn columnName = "pack_type"
                                     title      = "Pack" >
              </htmlb:tableViewColumn>
              <htmlb:tableViewColumn columnName = "start_date"
                                     title      = "Start date" >
              </htmlb:tableViewColumn>
            </htmlb:tableViewColumns>
          </htmlb:tableView>

Former Member
Not what you were looking for? View more on this topic or Ask a question