‎2008 May 08 10:28 AM
Hi,
I am working on a report using classes.I have used method get_selected_rows for selecting some row from output display.I have one button 'UPDATE' on application tool bar.When i press UPDATE this method gets called and gives me the row no of the selected row.First time its working fine but when i again select some row and press UPDATE this method is not returning row numbers of the selected row.No data found in the internal table exporting from this method.
Below is the code that i am using
CASE ok_code.
WHEN kc_back.
LEAVE PROGRAM.
WHEN kc_update.
CALL METHOD zgrid->check_changed_data.
CALL METHOD zgrid->get_selected_rows
IMPORTING
et_row_no = it_row_no.
IF it_row_no IS INITIAL.
MESSAGE e999(z1) WITH text-041.
ELSE.
LOOP AT it_row_no
INTO lwa_row_no.
lwa_edit_data-chk = 'X'.
MODIFY it_edit_data
FROM lwa_edit_data
INDEX lwa_row_no-row_id
TRANSPORTING chk.
ENDLOOP. "LOOP AT it_row_no
CALL METHOD cl_gui_cfw=>flush.
CALL METHOD zgrid->refresh_table_display.
Can you please help me in solving this problem.
Regards,
Mukesh Kumar
‎2008 Jun 09 9:01 AM
You have to write the code in the user-command module.you have to get the selected rows. Check in debug if the method is triggered or not.
rocky
‎2008 Jun 09 9:02 AM
could u show full code to find the bug if my above solution is not working.
rocky