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

Rollback for database updates FMs

Former Member
0 Likes
898

Hi,

I'm using function modules : ISU_DB_EVER_UPDATE & FKK_ACCOUNT_UPDATE for updating the tables FKKVKP & EVER respectively. These FMs seem to perfrom a commit before leaving. I've to update multiple records. But if there's an error while updating, say, 4th record the chnages made to the first 3 records have to be reverted back.

Right now records are being updated one by one in the table.

Does anyone know a way through this problem?

Thanks...

Hi,

I'm using function modules : ISU_DB_EVER_UPDATE & FKK_ACCOUNT_UPDATE for updating the tables FKKVKP & EVER respectively. These FMs seem to perfrom a commit before leaving. I've to update multiple records. But if there's an error while updating, say, 4th record the chnages made to the first 3 records have to be reverted back.

Right now records are being updated one by one in the table.

Does anyone know a way through this problem?

Thanks...

5 REPLIES 5
Read only

Former Member
0 Likes
792

hi,

put a flag to check if all teh records are correctly proccessed. finally u do commit work explicitly else roll back if teh flag is initiated.

theja.

Read only

Former Member
0 Likes
792

Hi Munish,

see if the fms have a parameter on setting which, the commits are not made(Something like simulate/test run).

Pass that flag and commit when all updates are succesful.

Regards,

ravi

Read only

Former Member
0 Likes
792

The Fm ISU_DB_EVER_UPDATE doesn't have any flag like that & for FKK_ACCOUNT_UPDATE I'm not being able locate it.

One more thing, these tables are to be updated one after the other. So if there's any error, changes are to be reverted back on both of these tables.

Thanks...

Read only

Former Member
0 Likes
792

It would be best to use a BAPI for this if you can find one. That way you should be able to run a test of all the updates before actually doing them.

What release are you on?

Rob

Read only

Former Member
0 Likes
792

Hi,

I'm on 4.6.

I'm trying to find the BAPI.

Thanks..