cancel
Showing results for 
Search instead for 
Did you mean: 

error when completing the WI by FM SAP_WAPI_WORKITEM_COMPLETE

Former Member
0 Kudos

Hi Have develop a workflow for PR approval, I created a asynchronous method approverPR with teriminating events like release step created, released etc.

Now we are approving and rejecting PR through webdinpro. when user clicks on approve pr in dynproscreen, we are calling a function module to approve PR and complete workitem , so that notification and workitem go to next level.

to complete the workitem i am using SAP_WAPI_WORKITEM_COMPLETE . but getting error as below.

Error when defining successor for node 0000000018

Please provide your input.

Thanks

Deepanker

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member650566
Active Participant
0 Kudos

Hi Deepanker,

Since you are using asynchronous method, I think ideal way of completing the task is to raise one of the applicable

terminating event.

Then you do not need to call any FM to complete your task. Moreover why you have included release step created as a terminating event?

Regards

Kedar

Former Member
0 Kudos

Hi Kedar,

During the release of PR if Approver just clicked on workitem and did not approve or reject PR and come back then workitem should stay in approves Inbox for action(approve or reject) .

now i am releasing PR in back fround by using BAPI that automaticaly creating events . so your solution works. no need to use fm to complete the workitem.

Thanks.

Deepanker

Former Member
0 Kudos

You can use method PurchaseRequisition.Release if using BOR BUS2105 or else use BAPI BAPI_REQUISITION_RELEASE_GEN to release PR in background.

Regards,

Sangvir

former_member185167
Active Contributor
0 Kudos

Hello,

What sort of workitem are you completing?

Maybe you could use fm SAP_WAPI_DECISION_COMPLETE.

regards

Rick Bakker

Hanabi Technology

Former Member
0 Kudos

Please can you use FM

SAP_WAPI_SET_WORKITEM_COMPLETD

Thanks

Arghadip