Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3177

Re: update statement is not working in some cases

$
0
0

Hi

 

Yes ok I'm mistake, I've forgotten the COMMIT closed the LUW

 

but it's not a probelm about the lock

 

A logical lock can't avoid to update a record  if it is updated by statement like INSERT, UPDATE or MODIFY, of course if other program or user update the same objects, the effect will be the last modification will be seen in database.

 

In a BAPI, all updating processes are usually called in UPDATE TASK, so after calling a BAPI a COMMIT has to be called in order to run those processes (and so it should be better no COMMIT is called in a BAPI)

If an error occurs in the BAPI, the ROLLBACK should be called in order to delete those processes.

 

 

But In this situation the ROLLBACK is useless, because if UPDATE fails there's no modification to be rolled back.

 

I've corrected a program with a problem like that, I mean with a conflict between COMMIT and ROLLBACK, I'll try to remember it


Viewing all articles
Browse latest Browse all 3177

Trending Articles