Skip to Content

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

Regarding HTMLB Tableview iterator

<body><p>Hi All,</p><p></p><p>I am working on tableview iterator example from Brian's weblog:</p><p>&#91;Iterator|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/213&#93 <b>[original link is broken]</b> <b>[original link is broken]</b> <b>[original link is broken]</b>;</p><p></p><p>I modified the TV in BSP to multilineedit .</p><p>I Filled the curriencies table in constructor with three values ie USD , INR and GBP .</p><p>Now suppose , i select INR in first row for curriencies , when i select the second row , </p><p>this value is initialised to USD which is the first entry in curriencies table.</p><p></p><p>What changes are requied in the iterator class so that the selection is not lost?</p><p></p><p>Note-> there are no entries for the field &quot;currency&quot; in SFLIGHT in my IDES.</p><p></p><p>Thanks,</p><p>Vivek.</p></body>
replied

Now after giving the eventname in onSelect for the dropdown the server event will be triggered. Then in the event "onInputprocessing" you can caputure this event and write the code.

data: tv_cdi TYPE REF TO cl_htmlb_tableview,

tv_cdi_event TYPE REF TO cl_htmlb_event_tableview,

WHEN 'status'.

tv_cdi ?= cl_htmlb_manager=>get_data(

request = runtime->server->request

name = 'TABLEVIEW'

id = 'tv_tb' ).

tv_cdi_event = tv_cdi->data.

row = tv_cdi_event->prevselectedrowindex.

if tv_cdi_event->prevselectedrowindex IS NOT INITIAL.

//using this method get the value of the cells in the table.

//If you want all the rows and cell you can loop and get the //data of the cells.

tv_cdi_event->get_cell_value( row_index = row

column_index = col ).

endif.

// once you get the value u can modify your internal table as you know the index of the row you have captured.

endif.

////// Rest of event of your code.

Hope this will be helpful to you.

Vijay

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