Can I write COMMIT and ROLLBACK in user-exit?

Answer Posted / krishna davuluri

Hi,

Coomit and Roll back in the User exit should not be used.
Because while executing userexit its not allways sure that
all needed values for database updations are present or
not.hence we should not use COMMIT or ROLLBACK, of work.
Also userexit is expected to add new functionality to
existing functionality, its not supposed to make any
changes in the existing functionality.

Suppose if you take Userexit SAVE_DOCUMENT_PREPARE.Systems
goes through the user exit more than once and COMMIT or
ROLLBACK may cause inconsistencies.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find the tables to report from when the user just tell you the transaction he uses? And all the underlying data is from SAP structures?

703


8)when u create sales report what u can see in that report ? what rthose field names or data element names? 9)when u create purchase order details report what u can see in that report ?what rthose fieldnames or dataelements? 10)when u create material stock report in material master grouped by material type and plant what u can see in report ?what rthose field names or dataelement ? 11)when u create shipping forecast report what u can see in that report ?what rthose data elements or field names?

1616


Some Realtime Examples on Exits .

1728


what is mean be On Change of in Control Break statement

856


Did you create primary index?

548






What is the difference between synchronous and asynchronous updates?

611


What data is contained? : abap data dictionary

699


What is the difference between free and refresh?

604


What happens if we use leave to list-processing without using suppress-dialog?

700


What is the transaction for recording bdc ? : abap bdc

607


Does every abap/4 have a modular structure?

562


what are the various types of parameters and how are they distinguished from one another?

732


What is the difference between a pool table and a transparent table and how they are stored at the database level?

589


What is the difference between internal tables and extract datasets? : abap modularization

674


How to call a subroutine in sapscript?

578