cancel
Showing results for 
Search instead for 
Did you mean: 

Link Between OO Workflow and Dynpro

Former Member
0 Kudos

Hello Gurus,

I have got a requirement where in user could be able to add approvers from custom dynpro application after workflow is triggered and is not yet completed.

1) I planned to do it by having the workflow ID and add a new entry to multiline element(IT_APPROVALS) which holds the approvers list on which workflow is looping to get the approvals.

In BOR way, if we use FM SWW_WI_CREATE_VIA_EVENT we get workflow ID as an importing parameter. But In my case it is custom OO workflow and I could not have the workflow ID while triggering via CL_SWF_EVT_EVENT=>RAISE.

How could I get the workflow id of the workflow instance triggered?

Any help is greatly appreciated!

Thanks in Advance!

Regards,

Pavan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you will know the approvers already jat the point of event triggering, why don't you just pass the approvers as event parameter. Probably you knew this already, but in a case you didn't.

Regards,

Karri

Answers (2)

Answers (2)

Former Member
0 Kudos

Sorry! Question is not yet concluded

former_member185167
Active Contributor
0 Kudos

Hello,

Not sure if I understand your scenario completely but I think you should use SAP_WAPI_CREATE_EVENT to create your events. It works for classes as well.

You said something about storing workitem ids in a custom table. Why? There are already plenty of workflow-related tables. Get your information from them. Look at the SAP_WAPI* functions.

regards

Rick Bakker

hanabi technology

former_member183917
Active Contributor
0 Kudos

Hi-

If you need to add new approver, once the workflow got triggered, you can use below way

1. get the top work item id using FM- SAPWAPIWORKITEMS*OBJECT by giving proper key

2. now, you can use FM- SAPWAPIWRITE*CONTAINER to change container values. Remeber, if you are using ECC, then this FM will add entry to the existing container, it will not over write it

Vinoth

Former Member
0 Kudos

@Vinod:

The given FM has worked which gave workflow ID but do you think this method is recommended for ABAP OO Workflow approach i.e upward compatability in future.

@Karri,

The problem can be solved by your approach but to add to the use of workflow ID, I also would like store the Workflow ID in the custom table along with the request details which will be very handy in error tracking.

Regards,

Pavan.