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: 

update was terminated!

former_member210158
Active Participant
0 Kudos

hi all,

i developed a bapi based on the requirements to process the multiple records for which i called a bapi bapi_transaction_commit

internally to commit every record which is good.

now im getting this error: 

 

Express document "Update was terminated" received from author "    "in SE37

this error is occuring only when commit is called..

guys need suggestions.

thanks & regards,

chinta

1 ACCEPTED SOLUTION

former_member210158
Active Participant
0 Kudos

Thank you all for your support,

the issue we faced here was resolved.

what we did:

we cleared the memory dump in the working directory, which we had.

it was some memory issue.

thank you once again. im marking this chain as resolved.

thanks & regards

chinta

8 REPLIES 8

former_member184675
Active Participant
0 Kudos

Hi,

Check the System Logs and Update status in SM21 and SM13 TCODES.

The problem is in your code. Check it again or post it here.

BR,

Andrei Sosea

0 Kudos

i have seen the status there so, what should i update. i cant give any number there, can i.

i used commit bapi earlier also, i found no issues then.

pls do suggest.

regards,

chinta

0 Kudos

Hi,

I guess the Update Status should be in red, so double click on the Update Record Line, selected the Red Marked Module Name (Function) and click on the Debugging button, it will show you the source code where you had a problem.

Also click on the Header button to get more details about the error.

q1.

Are you using any INSERT commands in your BAPI ? If yes, check if the syntax has "ACCEPTING DUPLICATES" otherwise it triggers a short dump in case of duplicate keys.

q2.

The Update Status Terminated error usually occurs when a program/FM that runs in background terminates in short dump.

Are you using any FM that work with GUI ? (like GUI_DOWNLOAD), because they can't work in background .

Andrei

0 Kudos

no syntax saying accepting duplicates.

and i used two bapis class create and class change so if the record already exists it wd get updated.

i dont think we have a question of duplicates here.

Private_Member_49934
Contributor
0 Kudos

Where are you calling this commit? is it called in update task or some exit or badi?

if yest then you need a workaround

0 Kudos

no not in user exit or badi. i dont have them.

i used commit in my code only after i executed class_create.

regards

chinta

former_member214878
Active Participant
0 Kudos

Dear Sathis,

As there is no direct solution for your problem, but you could retest everything in 360 degree and could reach up to the solution ------


Sorry for long reply. But felt worth of writing ........................


We will start from the scratch ......First of all 1. Why there could be a problem?  2. What are the possible cause? 3. How to rectify?

1. Why there could be a problem?
--> The error which u are getting is clearly saying the SAP has rolled back the database operation because there were fatal error in a transaction execution. This is usually comes when the exit code is getting executed inside.
--> This is an typical example of the error when actual commit is happening on the DB level, means actual write operation is getting placed on DB in layman words. Or it could be the possibility that some other processing of another screen is getting executed before you actually commiting your BAPI..... Clue is Screen processing (PBO of screen) inclusively forces a BAPI Commit. So u might be commiting BAPI once but its getting posted inside twice.
So duplicate records might occur and BAPI is getting rolled back.
--> Which means when the WP is trying to insert a new record in a DB it found the same primary key do exists ..... So it rolled back the DB ways.

2. What are the possible cuse?

1. Duplicate entries.
2. Error in code written so BAPI is getting rolled back.

3. Twice execution of COMMIT_WORK. Check the differnce between simple COMMIT_WORK and BAPI_TRANSACTION_COMMIT.
4. Number range issue. (** Go for it for just checking this is also a possible cause of this)

3. How to rectify?

1. Check Short dump ST22. There could be a clue.
2. Check if the commit work is getting triggered before you are actually commiting it.
3. Check the number range and see if the duplicate is there alredy in a database.
4. Check SM13 and SM14 to see where exactly in a code level error happened. If its giving any FM name then debug that FM and see the standard code and try to debug it. These T-Codes will give u the idea about where exactly the update (V1 or V2) got failed.

I think turning your reaserch with what might be the cause might lead you the solution.

Cheers




former_member210158
Active Participant
0 Kudos

Thank you all for your support,

the issue we faced here was resolved.

what we did:

we cleared the memory dump in the working directory, which we had.

it was some memory issue.

thank you once again. im marking this chain as resolved.

thanks & regards

chinta