Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem in using method get_selected_rows

Former Member
0 Likes
365

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

2 REPLIES 2
Read only

Former Member
0 Likes
341

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

Read only

Former Member
0 Likes
341

could u show full code to find the bug if my above solution is not working.

rocky