Skip to Content

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

DropdownListBox value in TableView not returned in 'OnInpuProcessing' event

Hi All,

I have a tableView where the 4th column is set up as a dropdownListBox. The values are available for selection in the dropdown and when selected the value is returned to the screen field as required. This part all seems to be working fine.

The problem is that I am not able to retrieve the value from this field when control passes back to the 'OnInputProcessing' event.

The Layout code is as follows:

 
            <htmlb:tableView id              = "tv_idint" 
                             table           = "<%= it_data %>" 
                             visibleRowCount = "10" 
                             selectionMode   = "LINEEDIT" 
                             onRowSelection  = "onRowSelection" 
                             emptyTableText  = "No Data Found" 
                             width           = "740" 
                             sort            = "SERVER" 
                             iterator        = "<%= iterator %>" > 
            </htmlb:tableView> 

The dropdownlistbox value should be returned to 'fld4' in the code below.

The code in the 'OninputProcessing' event is as follows:-

 
data: tv          type ref to cl_htmlb_tableview, 
      tv_data     type ref to cl_htmlb_event_tableview, 
      value       type string, 
      fld4         type char20, 
      fld1         type char20, 
      inputfield  type ref to cl_htmlb_inputfield. 

tv ?= cl_htmlb_manager=>get_data( request = request 
                                 name = 'tableView' 
                                 id = 'tv_idint' ). 

if tv is not initial. 
  tv_data = tv->data. 

  if tv_data->prevselectedrowindex is not initial. 
    value = tv_data->get_cell_id( row_index = tv_data->prevselectedrowindex 
                                  column_index = '4'). 

    inputfield ?= cl_htmlb_manager=>get_data( request = request 
                                              name = 'inputField' 
                                              id = value ). 

    fld4 = inputfield->value. 

    value = tv_data->get_cell_id( row_index = tv_data->prevselectedrowindex 
                                  column_index = '1'). 

    inputfield ?= cl_htmlb_manager=>get_data( request = request 
                                              name = 'inputField' 
                                              id = value ). 

    fld1 = inputfield->value. 
  endif. 

endif. 

Column '1' in the tableView is a straight forward input field that allows the user to directly enter a value. In the code above this value is returned to 'fld1'. So it seems to be working for input fields, but not the dropdownlistbox field!

I have tried using the following to retrieve a value into 'fld4':-

 
data: dropDown    type ref to Cl_HTMLB_DropDownListBox. 

    dropdown ?= cl_htmlb_manager=>get_data( request = request 
                                              name = 'dropdownListBox' 
                                              id = value ). 

instead of:-

 
  inputfield ?= cl_htmlb_manager=>get_data( request = request 
                                              name = 'inputField' 
                                              id = value ). 

but with no luck!

I've looked at a few threads, blogs and wikis, such as:

Link:[BSP Programming: HTMLB TableView Iterator]

Link:[https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/iterator%2bconcept]

Any help would be greatly appreciated

Thanks,

Nick.

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