Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

COMMIT WORK

Former Member
0 Kudos

Hi ,

Can anyone of you explain the situations which cause the failure the COMMIT WORK command in SAP ?

Thanks in advance,

Regards,

Vara

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

hi,

can i do this in my custom transaction.

call function z_bapi-sales_ord_change in update task

....

....

call function bapi_transcation_commit.

0 Kudos

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

0 Kudos

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..

Former Member
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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