cancel
Showing results for 
Search instead for 
Did you mean: 

Workitem is not getting deleted from the SAP inbox

Former Member
0 Kudos

Hi all,

I have a requirement for PR approval. Whenever a PR is created, based upon the initator and the release stategy the the approver are found from a ztable. After that a workitem is sent to the corresponding approver.

The approver has two choices he can approver(release) the PR from the workitem or from me54n transaction.

if he Releases the PR from workitem my workflow is working good, but if he releases the PR from me54n i am using a wait step to delete the workitem from his inbox but the workitem is not getting deleted from the inbox.

Kindly help me please

Regards

Balaji K.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Balaji,

I assume you are using a "Wait for Event" step which is in 1 of 2 parallel fork to your approval workitem.

One case where it can fail is if your approval workitem is locked by some user. After you complete processing in ME54N just expand the node of the approval workitem in the technical workflow log and see if there is an error and let us know.

Thanks,

Prasath N

Former Member
0 Kudos

Hi all,

As per Prasath's reply yes i am using wait for event step which is in one of 2 parallel branches of fork of my approval workitem.

While i checked with the technical log there is no error raised. And my version of SAP is 4.7c.

Kindly help me in this issue.

Regards

Balaji K.

Former Member
0 Kudos

Hi Balaji,

What does the log state for the parallel branches. Has the workitem for "Wait for event" got COMPLETED after receiving the event? Or is it still in READY state?

If it is in READY state then it might be waiting for the event still!!! may be due to the reason that it is waiting for a wrong instance of the event. Please check in your log if you have the proper required instance populated in the container element that holds your business object instance.

If it is in COMPLETED state definitely your other approval step should have got "LOGICALLY DELETED". If that is not happening please check once again in the fork step if it mentions "Necesaary braches as 1 of 2 Parallel branches" (you would have checked this...just assure that everything is ok).

SWU_OBUF - This may not be required as this thread is already more than a day old and buffers should have got automatically refreshed.

Thanks,

Prasath N

Former Member
0 Kudos

Hi Prasath,

Thanks for your timely reply. Yes i have checked the log, my wait for event is completed and my log says that the workitem is logically deleted but that is not getting deleted from the inbox that is my problem.

Kindly help me.

Regards

Balaji K.

Former Member
0 Kudos

Hi Balaji,

Logically deleted and still lies in inbox? Hope you are not using UWL (because u need to keep hitting Refresh everytime you return back).

Does the workitem lie even after hitting "REFRESH" button in SBWP? And what is the status of the workflow workitem? Does that turn to "COMPLETED" or is it "IN PROCESS"?

Thanks,

Prasath N

Former Member
0 Kudos

Hi Prasath,

Just now i found one thing in swel ie when ever a PR is created releasestepcreated event is getting triggered and the workitem is place in the corresponding agents inbox. when i released the PR through me54n two events getting triggered one is releasestepcreated and released when checked for released event it says that the previous workitem is logically deleted but when i checked for releasestepcreated event it says that the workitem is in the agents inbox with status ready and when i checked the inbox i got two workitems.

I think i have done some mistake some where in the wait for event step but i couldn't find it.

Kindly help me.

Regards

Balaji K.

Former Member
0 Kudos

Hi Balaji.

<b>when ever a PR is created releasestepcreated event is getting triggered and the workitem is place in the corresponding agents inbox</b>

So the event "releasestepcreated" is the start event for your workflow. Hope i am right in this assumption.

<b>when i released the PR through me54n two events getting triggered one is releasestepcreated and released</b>

Now i think you have used the event "released" in your wait for step event. Hope this assumption is also right.

If the above assumptions are right then the process is happening as follows. First time when a PR is created a new workitem is created and delivered for approval. Now when the Release is done from ME54N the released event closes the current workflow but instantiates a new instance of the workflow that appears in the inbox now.

To make sure if this is the case navigate to the workflow log from your SBWP by clicking the log button for the respective approval workitem. Here see if the status of the workitem is Logically deleted. Also note down the workitem id of the approval workitem. Now goto ME54N and release the PR once again. Come back to ur SBWP and once again check in the log and see if it is the same workitem that was existing previously (bycomparing the workitem id).

Thanks,

Prasath N

Former Member
0 Kudos

Hi Prasath,

The assumption you said all are correct.

As you said i checked, for one workitem in the log it says the provious workitem is logically deleted and one more workitem log says it is in ready status.

Tell me what i have to do now.

Regards

Balaji K.

Former Member
0 Kudos

Hi Balaji,

I see two issues here

<b>1. New instance is getting created when your relaese your PR.</b>

For this you need to find out why two events are getting triggered for your case when PR is released. Is there a place where you configure the events that is to be triggered when creating/releasing the PR? If we can get this place then we need to configure such a way that only "released" event is triggered when releasing the PR.

If this option is not available then an alternative way might be to check if you have any attribute available in your BO to differentiate the status. You can the use this attribute in the start conditions such that the workflow starts only on when PR is not yet released.

<b>2. The logically deleted workitem is still appearing in your SBWP.</b>

I am still puzzled how this is happening. A logically delelted workitem cannot exist in the SBWP inbox of any user. I doubt you may need to search in service market place for this.

Thanks,

Prasath N

Former Member
0 Kudos

Hi Prasath,

Thanks for your reply.

Triggering of both event releasestepcreated and released is a standard one. So there is no configuration needed.

I think i can make the workitem to be logically deleted for both event am i correct.

Regards

Balaji K.

Former Member
0 Kudos

Hi Balaji,

No. I meant that you can restrict the workflow from starting when the PR is released. When a PR is created, for that PR you will have a status maintained in some table right? (I am not sure about the tables and transactions as i have not directly worked in a PR scenario).

What i meant is in your business object which holds this event might have a standard attribute which displays this status. Even if it doesnt exist you can create a custom attribute which will fetch the status of the PR from the required tables whenever your BO is instantiated.

So when the PR is created for the first time the status of the PR in the attribute will be "CREATED" (for example) and when it is released in ME54N the status will be "RELEASED" (for example).

Now you can use this attribute in your start condition for workflow such that your workflow will start when the "releasestepcreated" event is triggered <b>and</b> the value in STATUS attribute is "CREATED". Thus when u release it from ME54N eventhough the event "releasestepcreated" is triggered the worklfow will not start again becuase the STATUS condition fails here.

Hope i am clear.

Thanks,

Prasath N

Answers (2)

Answers (2)

KKilhavn
Active Contributor
0 Kudos

Is there any particular reason you are not using the standard solution which uses an asynchronous method with terminating events for the task?

You are not specifying your SAP release, so I am just assuming you are on the same release that I am sitting by right now.

Former Member
0 Kudos

I will suggest you to create a fork which has 2 Parallel step and one necessary step. Now put the Wait for event ``Release`` step in one branch and the approval step in another. This way it will suffice your requirement.

<b>Reward points if useful</b>