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 issue in Call function in update task

Former Member
0 Likes
2,510

Hi,

I have a requiremnt in which i have to commit work in single SAP LUW.

I use Call function in update task to execute on commit work.

If code in my Call function in update task gives error, i should rollback the entire process.

I tried using rollback in call function in update task leading in dump because rollback cannot be used in update task.

How do i rollback..

Thanks,

Phani

7 REPLIES 7
Read only

Former Member
0 Likes
1,502

Any updates? on the above

Read only

0 Likes
1,502

Use SET UPDATE TASK LOCAL before your SAP LUW starts. For more info check help on [Local Update|;

Read only

0 Likes
1,502

How do i rollback the sap luw if error occurs in call function in update task?

Thanks,

Phani

Read only

0 Likes
1,502

Any update on the above?

Read only

0 Likes
1,502

Perform as SAP standard update task FM, raise an error of type 'A' abort update process.

(better perform checks before commiting)

Regards,

Raymond

Read only

0 Likes
1,502

I would like to capture the error?please advice me how this can be achieved..

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,502

Hello Phani,

You don't need to handle the ROLLBACK explicitly. If any error occurs during the UPDATE TASK an implicit ROLLBACK occurs. The error details are logged into the table VBLOG.

Also remember in an update FM you can't use any statements which trigger a database commit e.g., ROLLBACK WORK, COMMIT WORK etc.

Further read on the F1 help for 'IN UPDATE TASK'.

BR,

Suhas