2005 Dec 06 10:17 PM
Hi ,
Can anyone of you explain the situations which cause the failure the COMMIT WORK command in SAP ?
Thanks in advance,
Regards,
Vara
2005 Dec 06 10:21 PM
It can be several reasons why a commit will fail, but most often it is because this command was issued in an update task. Apart from this reason, other reasons could be an extremely rare case of some system or memory crash.
Srinivas
2005 Dec 06 10:21 PM
The only runtime errors I have encountered is while using COMMIT WORK in CALL FUNCTION .. ON UPDATE TASK, we should not be using COMMIT work here.
Also, check the help documentation for COMMIT WORK.
2005 Dec 06 10:53 PM
hi,
can i do this in my custom transaction.
call function z_bapi-sales_ord_change in update task
....
....
call function bapi_transcation_commit.
2005 Dec 06 10:57 PM
If the program flow is as described by you, yes you can. But if the BAPI_TRANSACTION_COMMIT call is within the Z_BAPI_SALES_ORD_CHANGE, then it will dump.
What you have to remember is, all the database updates that are in UPDATE task will be transferred to the database after you issue the COMMIT WORK or it is implicitly issued by the system like when you leave the transaction in a normal way.
Srinivas
2005 Dec 06 11:04 PM
hi
thanks for ur quick reply..
i tried commenting out the commit
call function 'ZBAPI_SALESORDER_CHANGE' in update task
exporting
salesdocument = ord_num
order_header_in = header
order_header_inx = headerx
tables
return = t_return
partnerchanges = update_so_partners
partneraddresses = update_so_addr.
call function 'BAPI_TRANSACTION_COMMIT'
and the result is there was no update to the tables.
does that mean tha the system did not issue an implicit commit work after i leave my transcation..
thanks..
2005 Dec 06 10:21 PM
It can be several reasons why a commit will fail, but most often it is because this command was issued in an update task. Apart from this reason, other reasons could be an extremely rare case of some system or memory crash.
Srinivas
2005 Dec 06 10:26 PM
Another reason that I encountered most often was if the tablespace is full. This has happened at our site, a couple of times, when the the database alerts set by the database administrators failed to intimate them automatically when the tables were filling up. So the commits failed because there was not enough space to store the records. This is also very extreme, but with fast growing tables such as MSEG or BSEG, it is very much possible if proper notification process is not in place.
Srinivas
2005 Dec 06 10:28 PM
I'm not sure if this answers your question, but even though a transaction issues a commit and the commit is successful, the update may still fail. You can use SM13 to find out if this has happened. (Click on 'terminated'.)
Rob