Skip to Content

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

Edit a tableview and store...

Hello Forum...

I have a problem when i try to edit a tableview..

Well, I have a few of input fields in my page, with these input fields i choose some parameters and when i click on the button i do a query in the event oninputprocessing and appears my results on a tableview i draw on the layout.

Until here everything works perfectly.

Now, i have to edit a field of this tableview and store the whole structure of this query in a z table of the dictionary.

I use iterator to do it..but when i am going to save the result once editing i havent value on the cells...

data:

register type ztable,
table_event type ref to CL_HTMLB_EVENT_TABLEVIEW.

tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
name = 'tableView'
id = 'results' ).

IF tv IS NOT INITIAL.
table_event = tv->data.
clear selectedRowIndex.
SelectedRowIndex = table_event->PREVSELECTEDROWINDEX.

  if selectedRowIndex <> 0.

   register-MANDT = SY-MANDT.

  COL_NO = 1.
  DO 9 TIMES.

  COL_VALUE = TABLE_EVENT->GET_CELL_VALUE( ROW_INDEX = selectedRowIndex COLUMN_INDEX = COL_NO ).
  CASE COL_NO.
  WHEN 1.
   register-year = COL_VALUE.
  WHEN 2.
.
.
   endcase.

  COL_NO = COL_NO + 1.

  ENDDO.
  endif.
  endif.

I have an example and it works perfectly but between them there is a diference, first one is a table of the dictionary and the second one is a query on a tableview to edit and save..

When i debug i see the next: (Method get_cell_value)

name = me->GET_CELL_ID( row_index = row_index column_index = column_index).

value = request->get_form_field( name ).

The parameter name has value each loop of my tableview but the parameter value is empty...i dont know why!┬┐?

Any suggestion or idea┬┐?

Thanks in advance and regards...

Mon.

Former Member

Helpful Answer

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