Skip to Content

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

Save problem

Hi,

I am using the following code to save the data from the tableview.

But in the following line the the row index is not chowing the value.Its alws giving zero..

So what to do to get the respective row which i clicked and what value is coming from that..

ind = tv_data->selectedrowindex.

DATA: tv TYPE REF TO CL_HTMLB_TABLEVIEW,

ind type i,

wa type sflight.

tv ?= CL_HTMLB_MANAGER=>GET_DATA(

request = runtime->server->request

name = 'tableView'

id = 'tv' ).

IF tv IS NOT INITIAL.

DATA: tv_data TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.

tv_data = tv->data.

ind = tv_data->selectedrowindex.

IF ind IS NOT INITIAL.

READ TABLE sflight INDEX ind into wa.

Modify sflight from wa index ind.

endif.

endif.

Former Member
Former Member replied

Hello,

In your code check are you passing the correct id for the table view:

tv ?= CL_HTMLB_MANAGER=>GET_DATA(

request = runtime->server->request

name = 'tableView'

id = 'tv' ).

Thanks,

Greetson

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