‎2007 Jun 15 4:20 AM
Hi Guys
I want to delete particular entry from ALV output and press save,it should refresh and should update the database table.
How can i proceed on this.
Thanks in advance
‎2007 Jun 15 4:41 AM
FORM PAI_INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN '&TEM'. " im not sure what the code is for the save button (u can also make your own button in a toolbar)
LOOP AT itab.
MOVE itab TO Zexttable. " zexttable is the external db table in this case
UPDATE Zexttable.
ENDLOOP.
MESSAGE S000(E4) WITH 'Data successfully saved to'
'database table'.
ENDCASE.
ENDFORM. "pai_input
‎2007 Jun 15 4:43 AM
Hi,
for this delete all the database table entries first before saving the modified details.
after that use
MODIFY <DBTAB> FROM TABLE ITAB.(HERE ITAB IS UR INTERNAL TABLE WHICH CONTAINES THE DATA U R DISPLAYING IN THE ALV.)
rgds,
bharat.
‎2007 Jun 15 4:58 AM
Program <b>BCALV_EDIT_04</b> This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to implement the saving of the new data.
reward points it if it is usefull ..
Girish
‎2007 Jun 15 5:01 AM
hi,
check the BLog:for deleting an entry:
/people/srilatha.t/blog/2007/04/13/alv-grid--delete-row-function
Capture the changes into an Internal Table based on the fields and update the Database table with that internal table using Modify/insert or Update