2010 Feb 26 12:46 PM
Hi Gurus,
Can we use COMMIT statements generally in our normal SE38 Report Programs....Is there any specific instance in which a COMMIT statement can be used. Please let me know.
Also wanted to know if we can use COMMIT statements inside User Exits.
Thanks
2010 Feb 26 12:58 PM
Whats your requirement actually..
If in Program(SE38) if updating/inserting data by INSERT/MODIFY/UPDATE stmt, then u need to use COMMIT WORK...
if updating/inserting by BAPI then then use BAPI for Commit.
2010 Feb 26 1:01 PM
generally commit should be avoided inside a user exit ..
Also it is better to go through the documentation before you use commit inside a user exit
(coz it might lead to data inconsistency)
also
the commit need only be used when needed inside any se-38 program.
(after INSERT/MODIFY/UPDATE)
also
refer the links below for more info on user exit commits
Hope this helps
Regards
Manthan.
2010 Feb 26 1:58 PM
hi,
you can use commit in se38.
there are 2 to 3 ways of commiting.
commit and wait.
use can use bapi to commit.
you can also use commit work.
if u r updating any record or inserting or deleting a record from a database table then you need to commit.
Thanks,
Tanmaya
2010 Feb 26 2:04 PM
Hi ,
You can write COMMIT WORK after a select statement.
Regards,
Srini.
2010 Feb 26 2:07 PM
Hi you can find a great deal in SAP help regarding this.
Hi,
a transaction flow must adhere to its ACID(Atomicity,Consistency,Integrity and Durabiliy) properties.
The ACID properties of a DBMS allow safe sharing of data to the tables.
and also you may be aware of the states of transaction like start,abort,rollback,commit...
In the transaction flow diagram the commit state comes at last.
Just think if you give a commit work in between the flow and if the data gets replicated in db
and if the transaction gets aborted after the exit, does this make any sense.
In the transactional states the rollback state always comes before commit state.
Its not possible to roll back after a commit state.
As far as i knoe Its not recommended to give a commit in between a transactional flow( ex:in bapi,exits,badi etc )