Skip to Content

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

Issue with tableview data storing

Hi,

We are using MVC model, it has view-model-main controller and sub controller. I am displaying

4 columns on the tableview where 2 columns are editable. when i click update button on the screen

i have called do_handle_event method on sub controller, when i debug the code i am getting

table as initial always. I am not sure what am i missing here..can any one help me ?

Here is code

method DO_HANDLE_EVENT

data: o_event type ref to cl_htmlb_event,

visible_row type int4,

visible_last_row type int4,

visrow_count type int4 value 10,

it_osha like line of it_mfgprf_osha,

wa_osha type zpp1_mfgprf_osha,

o_app type ref to zcl_mfg_perf.

o_event = cl_htmlb_manager=>get_event( request ).

if o_event is not initial.

if o_event->id = 'osha_update'.

data: tv type ref to cl_htmlb_tableview.

tv ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'tableView'

id = 'it_osha_history' ).

if tv is not initial.

data: tv_data type ref to cl_htmlb_event_tableview.

tv_data = tv->data.

if it_mfgprf_osha is not initial.

visible_row = tv_data->visiblefirstrowindex.

visible_last_row = visrow_count + visible_row - 1.

loop at it_mfgprf_osha into it_osha

from visible_row to visible_last_row.

it_osha-zosha_ytd = tv_data->get_cell_value(

row_index = sy-tabix column_index = 3 ).

endloop.

endif.

endif.

endif.

endif.

view

<htmlb:tableView id = "it_osha_history"

table = "<%=o_app->it_mfgprf_osha%>"

iterator = "<%=o_cont->osha_iterator%>"

headerText = "OSHA History"

headerVisible = "True"

sort = "SERVER"

onHeaderClick = "sort"

visibleRowCount = "10"

width = "100%"

design = "ALTERNATING"

allRowsEditable = "<%=o_app->ALLOW_RECORD_EDIT%>" />

Thanks!

Lakshmikandh

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