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: 

In background job how commit & rollback work works?

amol_chaudhari5
Explorer
0 Kudos

Hello Friends,

My requirement is, to fetch all sales order items based on some condition and load them into one table say OCC1 in job J1. Now the second requirement is to upload the job information J1 with job name, user name, end date in second table say OCC2 in job J2.

My question is if there is some error I found while processing job 2 I have to rollback entire work which means I have to remove all records those I have inserted in to table OCC1. Can any one suggest me how to handle such problem? Some how I am able to create two job and update the tables. However, what about rollback work? Whether there is an implicit commit work after every background job? I am working on SAP 4.6C version.

Thanks,

Amol C.

2 REPLIES 2

Former Member
0 Kudos

If J1 is a separate LUW, you will not be able to remove the entries from OCC1 using a rollback in J2. You will have to delete them.

Rob

naimesh_patel
Active Contributor
0 Kudos

I think by using just ROLL BACK work it will not rollback your first job's data.

You need to make some mechanism which can delete the data from OCC1 if the J2 got error.

Regards,

Naimesh Patel