Skip to Content

How to integrate SAP Business Workflow and BOPF?

Feb 16, 2017 at 11:39 AM


avatar image


my question is simple: how do you change BOPF objects in background activities of SAP Business Workflow? The problem is that the workflow runtime performs COMMIT WORK which is not conistent with BOPF transaction handling. How do you solve the problem?

I think there are two possible solutions:

  • use the standard transaction manager
  • use the slave Transaction manager

Using the standard transaction manager might problematic since it throws an own COMMIT WORK or ROLLBACK WORK which is not the usual COMMIT WORK/ROLLBACK WORK of the workflow runtime - those commands com later from the workflow runtime. My question is whether this can lead into trouble.

The second solution could be as follows:

Create an object implementing IF_WORKFLOW, call it from the workflow activity and span your own transaction: . In this solution you can control the execution and then create a workflow event that informs the workflow. The only problem might be that you trigger a COMMIT WORK in the background activity before creating workflow events which control the execution of the workflow. Usually I don't do this and use COMMIT WORK of the SAP Business Workflow runtime instead so that everything is done in single LUW. My question is whether this works or will / might lead to problems with the workflow.

I also thought about moving everything into a parallel context by performing updates and transaction handling a function module IN DESTINATION NONE and giving the results back to create events that guide the workflow but I don't know whether this makes everything worse, even if you trigger the BOPF transaction handling also IN DESTINATION NONE using PERFORM ON ... COMMIT (which will lead to other problems).

I know that SAP seems to have a solution for this problem (see¤t_toc=/de/89/8a926b052548beb49841a2732700bb/plain.htm&node_id=10 ) but you won't find implementation details here.

How do you solve this challenge? Or is above mentioned solution working?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Tobias Trapp
Mar 10, 2017 at 08:56 PM

Today I heard an answer from developers who solved the problem. In fact they used the slave transaction Manager in the following way: they perform CALL FUNCTION '/BOBF/TRA_DUMMY_UPDATE_TASK' IN UPDATE TASK and then let the workflow runtime do the COMMIT WORK. Of course the after save phase can't be performed this way. If the save is not possible they throw an exception and let the workflow runtime perform a ROLLBACK WORK.

10 |10000 characters needed characters left characters exceeded
Martin Fischer
Feb 16, 2017 at 12:52 PM

Hi Tobias,

the link to the SAP help is currently not working for me. So I hope you didn't link to my suggestion ;-)

I'm not an workflow expert, but for me the scenario sounds suitable for the slave transaction manager.

Tilmann wrote a blog post about it:

I hope, that helps!



Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes, I think the same. In fact the first link in my question is just a link to the second part of the description of the slave transaction Manager which you mentioned in a link. So the main question is whether doing a COMMIT WORK inside a background method in SAP Business Workflow. Usually I try to avoid this so I don't have much experience with it.

But let's discuss the usage of the slave transaction manager. I thougth about this solution and I have two questions: If the COMMIT WORK is performed by the workflow runtime you can't perform the post save phase. Do you consider this as a problem? I think in many cases this phase is not important. The second question is: What do I have to do when lo_slave_manager->do_save() fails? Do I really have to do a ROLLBACK WORK? If yes, could this lead to problems with the workflow runtime?

Best Regards,

P.S.: Yes, experiences some trouble since yesterday. But the link doesn't a provide solution for this problem. It links to a software solution which is an addon to SAP Business Suite in an own software component so I can't analyze the implementation.