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

COMMIT WORK problem on batch input sessions

Former Member
0 Likes
1,163

Hi,

I've a problem in an ABAP report that I've developed and

have no idea how to solve it easily:

My report just calls another report through a batch input

session that I've created with SHDB. The report called

is a bit complex: it calls several transactions and in

between, performs some commits (with COMMIT WORK) after

changes have been made on custom tables.

The problem is: when I execute my transaction at the first

time, everything goes ok: all tasks are performed by

the called report. But if I try to execute it again the

called report stops after the first COMMIT WORK

is executed.

What is the problem? Is there any system cleanup that I've

to do between report runnings? If not, is there any

alternative solution to do this (rewrite all the code

in my own transaction is excluded due to the transaction

complexity and code maintenance problems).

Any help will be great!

Manuel Dias

2 REPLIES 2
Read only

juan_suros
Contributor
0 Likes
520

I use function "BAPI_TRANSACTION_COMMIT" instead of COMMIT WORK to take advantage of SAP's programming experience. You might try a similar approach. A quick peek inside this function shows me that it uses the <b>COMMIT WORK AND WAIT</b> variant in some cases.

You mentioned the complexity of your data entry process. Have you tried using the "AND WAIT" addition? Your problem may be caused by some sort of record locking collision upon data entry.

Read only

0 Likes
520

If it is a problem with locking then write out the error into a message table so that will at least give you a clue.

Dave