cancel
Showing results for 
Search instead for 
Did you mean: 

error when updating back to ODS using tableview iterator.

Former Member
0 Kudos
64

I get this error when I try to execute my bsp page. The page collects a cell value that was edited on the previous page and updates it to the ods.

The error is "Function not possible in a captured session"

The termination type was: TH_RES_FREE

When I debug, every thing looks fine. ITab3 returns values it's supposed to. So I am not sure what's causing it to fail. Any ideas? Thanks.

Here is my code:


CLASS cl_htmlb_manager DEFINITION LOAD.

DATA: event TYPE REF TO cl_htmlb_event.


event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
if event->id = 'Update' and event->event_type = 'click'.
  DATA: tv TYPE REF TO cl_htmlb_tableview.

FIELD-SYMBOLS <i> LIKE LINE OF selectedrowindextable.

tv ?= cl_htmlb_manager=>get_data( request = runtime->server->request
                                 name = 'tableView'
                                 id = 'tv1' ).

IF tv IS NOT INITIAL.

DATA: tv_data TYPE REF TO cl_htmlb_event_tableview.
  tv_data = tv->data.
  refresh itab2.
  refresh itab3.
  call method tv_data->GET_ROWS_SELECTED
  receiving selected_rows = itab2.
  endif.
  data : ind type SELECTEDROW,
          row_s type row.

  if itab2 is not initial.
    data: rw LIKE LINE OF itab.

    loop at itab2 into ind.
    READ TABLE itab INDEX ind-index into
    rw.
    if rw is not initial.
    row_s = rw.
    append row_s to itab3.
    clear row_s.
    endif.
    endloop.

        MODIFY /bic/aNCN_O01300 FROM table itab3.
 


      ENDIF.
      endif.

View Entire Topic
raja_thangamani
Active Contributor
0 Kudos

In your code no where you are reading the cell value...

 COL_VALUE = TV_DATA->GET_CELL_VALUE( ROW_INDEX = IND-INDEX COLUMN_INDEX = COL_NO ).

Look at the below thread for mode detail..

<i>*Reward each useful answer</i>

Raja T

Former Member
0 Kudos

Thanks Raja. This works fine. I initially had problems updating all fields that I edited. It was giving the last rows value to all rows. I figured it out and it works great now. Thanks for all your help and patience.

raja_thangamani
Active Contributor
0 Kudos

Good to see that you solved it...

Raja T