cancel
Showing results for 
Search instead for 
Did you mean: 

how to capture data from the tableview to the internal table?

Former Member
0 Kudos

hello all,

i need to change the table data from the table view before that i have to check the old retrive data and new field data of the tableView so please help me out here

if any demo code is avilable please provie it

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

loc_table_event type ref to cl_htmlb_event_tableview,
      wf_vendor          type zer_vend_asgn_smp_s,
      int_lt_vend type zer_vend_asgn_smp_t,
      loc_ind type selectedrow,
      loc_sel_rows type selectedrows,
      wf_vend like line of wf_vend_table.
      



  call method cl_hrrcf_iterator=>get_tv_attr
    exporting
      p_tv_id               = 'TV'
      p_component_id        = me->component_id
      po_request            = me->request
    importing
      p_visible_first_index = me->visible_first_row
      pt_selected_keys      = me->lt_selectedkeytab
      po_tv_event           = loc_table_event.

call method loc_table_event->get_rows_selected
receiving selected_rows = loc_sel_rows.

loop at loc_sel_rows into loc_ind.
read table wf_vend_table index loc_ind-index into wf_vend.
if wf_vend is not initial.
      
       wf_vendor-field1   = loc_table_event->get_cell_value(
                                         row_index     = loc_ind-index
                                      column_index  = 1 ).
        wf_vendor-field2  = loc_table_event->get_cell_value(
                                         row_index     = loc_ind-index
                                         column_index  = 2 ).

modify wf_vend_table index loc_ind-index from wf_vendor .

vijay

raja_thangamani
Active Contributor
0 Kudos

Hi,

These kind of questions discussed many times . Please search the forum.

Few threads below:

To check your old data, refer your internal table which will hold the old data (before you read the changes & update this itab)

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

Raja T