cancel
Showing results for 
Search instead for 
Did you mean: 

cancel and keep workitem in ready state in user decision step

Former Member
0 Kudos

Hi,

In a user decision step,there is a default option 'Cancel and keep the work item'.

Now clicking on this option, the workitem goes into "Inprogress state"

whereas i want to keep the workitem in "ready state" after i click on the option 'Cancel and keep the work item'.

I am trying to modify the Process method of Decision Object type to incorporate this funcationality by using FM "SAP_WAPI_PUT_BACK_WORKITEM.

but im getting the error that this FM cannot be used at runtime.

Place where im trying to call this FM:

After the FM'SWU_PROCESS_MANUEL_DECISION'

I am getting the value of RESULT.

If result is SPACE or sy-subrc is not 00 then i am calling this Fm which takes Wi_id of the userdecision as input.

Kindly help

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Monika

I Need small clarification regarding Workflow. as you are facing the same problem i am also facing.i am using custom workflow itsself i am calling the custom screen. while user click back with out taking any action at the time i want to keep his workitem in his inbox. how to achieve, Please advise

Thanks & Regards

K.Gunaseekar.

Former Member
0 Kudos

Hi guna,

For your requirement you have to just check one check box in your task confirm end processing.

And for your kind info monia k is not facing the same problem like you please go through it you can realise that.Right??

Regards,

Purvesh Patel.

Former Member
0 Kudos

hello,

In your custom method,you can use the macro 'exit_cancelled 'to keep the work item in the inbox.

Former Member
0 Kudos

In the Business Workplace(SBWP) or in the transaction Code SWIA by providing the workitem id you will find a button Replace Manually which will change the status of the workitem to Ready state. There are some SAP_WAPI FMs that can be used. Check from SE37.

Thanks

Arghadip

Former Member
0 Kudos

i am aware of the replace in SBWP also about SWIA and the FMs which do this but my requirement is to know where to use this FM in the method .

I need to change the status on click of the option cancel and keep workitem in user decision

Please go thorugh my requirement once and then reply.

regds

Former Member
0 Kudos

I think we are trying to help you and you should be a little polite!!!!.

You can try to use the WI_RESULT task container elment to achieve your purpose.

Thanks

Arghadip

Former Member
0 Kudos

Im sorry but i havnt understood why you felt so offended.

i have only requested to go through my problem query.

No offence meant to anybody please.!!!

Former Member
0 Kudos

Hi,

Let me ask you this. Why you need to have this in "Ready" state, Not in "IN PROCESS" state. Anyway, the witem is still there in the user's inbox, and if you have any deadline monitoring, then this is also taken care with "Cancel and keep xxxx". So, i think, functionally you'll still be better with the existing functionality.

And, with all this, if you are still trying to change, then i think it's NOT possible. If i understand correctly, you are trying to use the FM "SAP_WAPI_PUT_BACK_WORKITEM" within the PROCESS method. And, if you understood the functionality of how this works, you are trying to set the status of the SAME witem for which you are executing the PROCESS method.

THe way i understand the behind-the-scenes process, once you make a decision and save, this method is the one which in turn sets the witem status. And within that, you CANNOT capture the status as it is yet to be posted to the Witem tables.

Probably, after this decision step, use a different background task with the above FM to set the witem status to "Ready", BUT NOT IN THE SAME METHOD of PROCESS.

Also, it's not advisable to change this std. method.

Hope this helps you. Reply,if you need more info.

venu

Former Member
0 Kudos

hi Venu,

thank you so much on this.

I have been able to achieve this through FM "SAP_WAPI_SET_WORKITEM_STATUS"

Rgds

Former Member
0 Kudos

Just curious,

You mean to say, you were able to modify the PROCESS method to use the FM SAP_WAPI_SET_WITEM_STATUS ?

or, in the same method, it's not possible as i told you and you used another bckground method to set it, AFTER the user decision step ?

Thanks

venu

Former Member
0 Kudos

hello Venu,

I modified the PROCESS method to call this FM inside it at the point where cancel and keep option is called.

surjith_kumar
Active Contributor
0 Kudos

Hi,

Once you open the user decision work item, this will come to INPROCESS state, if you click the 'Cancel and keep the work item' it will never come to ready state, it always in INPROCESS state .

This you canu2019t change, this helps initiator or workflow admin to find whether the work-item is processed by Approver or not.

Example: if a work-item received by 4 people if one person opened it, only he can approve. Or else he can forward it to anyone, this state you canu2019t change.

Regards

Surjith Kumar

Former Member
0 Kudos

Hi,

I am sure the state can be changed but am not sure about the approach that i should follow .

Regards,