2012 Jan 19 6:00 AM
Hi Friends,
i have requirement like by selecting few rows in alv_control i have to do some process with those records and i need to delete those rocords. i have written code like this
pai.
get_selected_rows
Process....
deleting selected rows from internal table
refresh_table_display.
set ready for input.
its working fine for the first time.after deleting one record.after all this process again i want to select few more reocrds and want to do the same but second time in get_selected rows is not giving any out put even i selecting few rows and process the pai.
Please give me any suggestions .
Edited by: sudheer b on Jan 19, 2012 7:01 AM
Hi Friends,
i have requirement like by selecting few rows in alv_control i have to do some process with those records and i need to delete those rocords. i have written code like this
pai.
get_selected_rows
Process....
deleting selected rows from internal table
refresh_table_display.
set ready for input.
its working fine for the first time.after deleting one record.after all this process again i want to select few more reocrds and want to do the same but second time in get_selected rows is not giving any out put even i selecting few rows and process the pai.
Please give me any suggestions .
Edited by: sudheer b on Jan 19, 2012 7:01 AM
2012 Jan 19 6:52 AM
Hi Sudheer,
Clear the instance of alv_grid. I mean to say that if u used r_alv and create a instance, it contains some path try to clear that at right place hope it will solve your problem.
2012 Jan 19 7:11 AM
Hi Sudeer,
Use refresh_table_display right after you delete a record in the internal table............
or use like this...
IF gr_container IS INITIAL.
CREATE OBJECT gr_container
EXPORTING
container_name = gc_con_area.
CREATE OBJECT gr_grid
EXPORTING
i_parent = gr_container.
call method gr_container->set_table_for_first_display.
......
ELSE.
call method gr_container->refresh_table_display.
use this type of coding in PBO it only refresh your table each time in PBO except for the first time.
If you are still getting probs please post the exact problem. because i did the same type of requirment and it is working fine now.
Best Regards.
Aswath.