PERFORM ...
{COMMIT|ROLLBACK} .
The statement COMMIT WORK must not be executed in units or
LUW s that are managed by
transactional RFC calls ( bgRFC , tRFC , or qRFC ).
System Fields
sy-subrc Meaning
0You have specified the AND WAIT addition, and the update of
the update function modules was successful.
4You have specified the AND WAIT addition, and the update of
the update function modules was not successful.
The COMMIT WORK statement always sets sy-subrc to 0 if
the AND WAIT addition is not specified.
Latest notes: An SAP LUW that is not closed by COMMIT WORK
, but by ending the current program or closing the
internal session , has no effect on
the registered procedures. Registered update function modules remain on
the database but can no longer be executed.
The COMMIT WORK statement closes all
database cursors . Open SQL
statements that access a database cursor later (
SELECT loop and FETCH ) raise an
unhandleable exception.
COMMIT WORK also triggers a database commit in programs called
using CALL DIALOG .
Runtime Exceptions
Non-catchable Exceptions
Reason for error: COMMIT WORK is not allowed within a FORM
called using PERFORM ... ON COMMIT .
Runtime error: COMMIT_IN_PERFORM_ON_COMMIT
Reason for error: COMMIT WORK is not allowed within the update.
Runtime error: COMMIT_IN_POSTING
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved