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: 

How to update database multiple rows after selecting,in ALV grid display?

Former Member
0 Kudos

Hi Experts,

I have ALV list and i want to update the edited rows in database table when i press "update" button.

i'm looking forward for your answers

Regards,

Mohanraj.R

7 REPLIES 7

Former Member
0 Kudos

I don't know if I correctly understood: you have an internal table (represented with ALV) and you want that clicking a button, the db is updated. If so, you have to manually update db contents row by row.

0 Kudos

i'm displaying an internal table using ALV.

ex:There are 10 rows in that

And i'm editing few rows with some values in that ALV list

when i click "Update" button,How can i update the edited rows into the database table?

Former Member
0 Kudos

Former Member
0 Kudos

Hi,

Try this.

You may be using an internal table to populate the ALV list. in the click event of the push button write the code to update the internal table and then use the internal table to update the database table.

Sharin.

former_member188685
Active Contributor
0 Kudos

in the user_command event you can handle the Update button action and Accordingly you can Update the data.

Check this thread...

https://forums.sdn.sap.com/click.jspa?searchID=16682136&messageID=6031562

Former Member
0 Kudos

hi in your

FORM user-command using p type sy-ucomm

ff type selfield.

case sy-ucomm.

when 'UPDATE'.

loop at itab where box = 'X'.

modify itab.

modify ztab from itab.

endloop.

NOte:when you edit a row ,you should select it.

Edited by: swati gupta on Sep 24, 2008 12:51 PM

0 Kudos

Thnx for helping me out....!