Application Development and Automation 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: 
Read only

Run time Error OS_COMMIT_TOP_FAILED came just once

Former Member
0 Likes
2,231

Hi Gurus,

I have developed one program which updates some custom tables as a scheduled batch job. It works in below steps.

1. It sets a lock as database flag in one control table using MODIFY and COMMIT WORK AND WAIT.

2. It updates the custom tables using Update FM and COMMIT WORK AND WAIT.

3. It releaes the lock while by clearing the flag from control table using MODIFY and COMMIT WORK AND WAIT.

It was working perfectly fine for last two months. Today We received the run time error OS_COMMIT_TOP_FAILED once. After that, It is again working fine. I cheked in sap notes 1141443 link https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1141443.

But Coun't decide why this error came in our program.

It would be great if you could suggest possible reasons behind it.

Note: Currently the program is running fine.

Thanks & Warm Regards,

Raveesh

Hi Gurus,

I have developed one program which updates some custom tables as a scheduled batch job. It works in below steps.

1. It sets a lock as database flag in one control table using MODIFY and COMMIT WORK AND WAIT.

2. It updates the custom tables using Update FM and COMMIT WORK AND WAIT.

3. It releaes the lock while by clearing the flag from control table using MODIFY and COMMIT WORK AND WAIT.

It was working perfectly fine for last two months. Today We received the run time error OS_COMMIT_TOP_FAILED once. After that, It is again working fine. I cheked in sap notes 1141443 link https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1141443.

But Coun't decide why this error came in our program.

It would be great if you could suggest possible reasons behind it.

Note: Currently the program is running fine.

Thanks & Warm Regards,

Raveesh

7 REPLIES 7
Read only

Former Member
0 Likes
1,699

Just wanted to add that this error came in the first step at COMMIT WORK AND WAIT level.

Thanks,

Raveesh

Read only

0 Likes
1,699

Have you looked for notes?

Rob

Read only

0 Likes
1,699

Hi Rob,

I have looked into the note 1141443. I have written this in my question. It says this

It is very likely that this is due to a programming error in the application.

The exception OS_COMMIT_TOP_FAILED is triggered as soon as a COMMIT WORK is triggered and the system finds an open "object services" (sub)transaction.

I tried looking into my code but couldn't find any problem. Also it happened just once. Now it is working perfectly fine.

So wanted to know if any one has any idea about this error.

Thanks & Warm Regards,

Raveesh

Read only

0 Likes
1,699

Hi Raveesh,

are you using classes, methods, badis, enhancements, ... in your program?

Regards,

Klaus

Read only

0 Likes
1,699

Hi Klaus,

Thanks for your reply. No, I am not using any class, BAdi etc in my program.

This exception gets triggered after COMMIT WORK AND WAIT.

Warm Regards,

Raveesh

Read only

Former Member
0 Likes
1,699

Hi All,

Today I noticed the same run time error at 3rd step at COMMIT WORK AND WAIT.

Does anyone have any clue?

Is it possible to have this run time error due to multiple COMMIT WORK AND WAIT?

Thanks in Advance.

Raveesh

Read only

0 Likes
1,699

Hi Raveesh,

you can use

COMMIT WORK AND WAIT

as often as you want to do it.

All SAP notes I have found regarding this issue are, that there are open sub-objects in OO context and they are always caused by a programming error.

In your case I have no idea, what the reascon can be, sorry.

Regards,

Klaus