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

get_selected_rows in pai

former_member217546
Participant
0 Likes
732

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

2 REPLIES 2
Read only

umashankar_sahu
Active Participant
0 Likes
616

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.

Read only

Former Member
0 Likes
616

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.