Application Development 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: 

get selected rows

0 Kudos

Hi,

I am using get_selected_rows method to fetch the edited columns in alv. My task is to update the edited data in alv into database table but i am not getting it. anybody help me with this code.

thanks in advance,

hari.

1 ACCEPTED SOLUTION

former_member184569
Active Contributor
0 Kudos

HI Hari,

Are you getting the changed data in get_selected_rows method while debugging?

Now, in order to modify the database table, make sure that key field data is also available. I am assuming lead id is the key field, but please ensure.

4 REPLIES 4

former_member184569
Active Contributor
0 Kudos

HI Hari,

Are you getting the changed data in get_selected_rows method while debugging?

Now, in order to modify the database table, make sure that key field data is also available. I am assuming lead id is the key field, but please ensure.

0 Kudos

Hi susmitha,

I made lead id as key in feld-catalog. but while debugging i am not getting the edited row index from get_selected_rows. i am not getting where is the mistake.

thanks.

0 Kudos

Hi Hari,

To get the rows in get_selected_rows, you need to select the records as shown in figure. Have you selected the records ?

Another option to get those records whose values have been changed, you need to implement handle_data_changed method.

Here all the data that has been changed will be in the table for method implemented for event handle_data_changed.

former_member289261
Active Contributor
0 Kudos

Hi,

My question is same as Susmita, are you selecting the records using buttons on the left of the records ?

But I think you wont be able to see those buttons as of now according to your code. To make those select buttons visible you will have to make your ALV editable by calling method o_grid->SET_READY_FOR_INPUT

EXPORTING

I_READY_FOR_INPUT = 1.

Call this method before displaying the grid i.e before method SET_TABLE_FOR_FIRST_DISPLAY.

Regards,

Ashish