07-03-2015 12:33 PM
I've got a question about 2 (or even more) commits in report.
Here's my situation:
I am calling BAPI, that modifies database table, e.g. BKPF. Later on I need that new data, so right after calling BAPI I use BAPI_TRANSACTION_COMMIT. Then I use that new data to modify my Z dbtab, so after that I use COMMIT WORK statement.
As I am aware commit statement puts a temporary lock on table which is currently used, so no one else can use it.
Is it ok to use many commits in one program? Or are there any "good behaviours" about using commits?
Also second question. Does MODIFY dbtab FROM wa statement include any commits? I had a situation, when after using that statement on my Z table (without any commits after) it actually modified content of my table.
Thanks for all your answers.
Bartlomiej
07-03-2015 1:36 PM
Hello Bartlomiej!
It is OK to use several commits in one report in common. In particular it depends on business context. If your changes should be performed only together - you should place it in one LUW and use one commit. If the changes may be performed separately or partially - you may use several commits.
MODIFY dbtab FROM wa statement doesn't include any commits itself. I suppose the content of the table in your case was modified as a result of implicit commit.
07-03-2015 1:07 PM
Hi Techies,
In your case 2time calling commit is required after bapi perform we have to do commit other wise database will not update from buffer . second one to update custom table is also justified, some time with commit after modify statement work but it have a chance of failure.
If I am in wrong way , Please guide.
07-03-2015 1:36 PM
Hello Bartlomiej!
It is OK to use several commits in one report in common. In particular it depends on business context. If your changes should be performed only together - you should place it in one LUW and use one commit. If the changes may be performed separately or partially - you may use several commits.
MODIFY dbtab FROM wa statement doesn't include any commits itself. I suppose the content of the table in your case was modified as a result of implicit commit.