‎2008 Oct 14 12:51 PM
DELETE FROM zvfnvrd.
* Check if delete Ãs OK
SELECT COUNT(*)
FROM zvfnvrd.
IF sy-subrc = 0.
WRITE:/ 'Try again'.
<<<<<<<HERE>>>>>>>>>>>
ENDIF.
Hi,
How to leave program without COMMIT WORK.
If I use LEAVE PROGRAM, commit work is stil done.
Adibo.
‎2008 Oct 14 1:07 PM
‎2008 Oct 14 12:56 PM
commit work
Executes a database commit and thus closes a Logical Unit of Work
All database updates are made irrevocable and cannot be reversed with ROLLBACK WORK
‎2008 Oct 14 12:59 PM
Hi,
Once the records are deleted from database table they cannot be rolled back.
You can give appropriate error message for the same.
Regards,
Saba
‎2008 Oct 14 1:07 PM
‎2008 Oct 14 1:18 PM
Hi,
ROLLBACK WORK before LEAVE PROGRAM is not working.
So if I have database table with lets say 20 records.
When calling DELETE FROM table, if 10 record have been deleted and 10 have NOT been deleted I can't ROLLBACK?
Its strange.
When I'am in DEBUGGING MODE and have called DELETE FROM table an then I execute program bij simply closing the window, I get all the records back. So nothing is deleted!!
Adibo
‎2008 Oct 14 1:33 PM
If ROLLBACK WORK does not work, you have perform a database commit (implicitly or explicitly) Some instructions close the current database LUW, so its then too late to undo the database changes.
Look at [Database Logical Unit of Work (LUW)|http://help.sap.com/erp2005_ehp_03/helpdata/EN/41/7af4bca79e11d1950f0000e82de14a/frameset.htm] where you will found information on implicit database commit triggering.
Regards