cancel
Showing results for 
Search instead for 
Did you mean: 

work item is disappears in SAP inbox.

Former Member
0 Kudos

Dear all,

I am facing the problem with workflow error.

For approvers to approve the orders

1. Approve

2 Reject

3. Back buttons were designed in the customized screen

Whenever click on the u201CBACKu201D button, work item is disappears in SAP inbox.

Could you please help me on this issue.

Thanks & regards,

Prasad.

Accepted Solutions (0)

Answers (4)

Answers (4)

sudhahar_ramachandran
Active Participant
0 Kudos

Use macro exit_cancelled inside the method if your condition is not satisfied.

Former Member
0 Kudos

Hi

Is it a FORM step in the workflow or a USER DECISION step?

If its a FORM step, i'm not sure why you use customized BACK buttons.

I have a form step in a workflow and use a copy of task TS70008114. With the copied task i get the same framework, i.e. the BOR object DYNP_FORM, with the two APPROVE and REJECT buttons in top. Each time this form is displayed to the user he/she can also hit F3 and that is exactly the functionality you need to just keep the workitem in the inbox.

Maybe it too late for you to go back to this solution, but it sure looks like the easiest way to me.

If it's a USER DECISION you can use a loop step as suggested above, though the user decision also has the standard option to break-of and keep work-item in inbox.

Kr

Robert

Edited by: R. den Hoedt on Aug 26, 2009 3:19 PM

Former Member
0 Kudos

The problem that you have is that you are using a decision step in the WF. Once a decision is made, the WF needs to evaluate the choice in order to move on. One option you have is to redesign your workflow. If the user presses Approve or Reject the workflow continues along the appropriate path. If you press BACK, you need to have the WF loop back to the same user.

Derrick Banks

Banks & Company, LLC

bpawanchand
Active Contributor
0 Kudos

may be you are not using the Decision task ,

But before that can you please let us know what is the Screen , where you are displaying the screen or, when ever you execute the workitem then the screen will be dispayed.

If when ever the workitem is executed then the screen will be displayed, and you want to keep the worktiemuntil he taske any decision on the workitems

then you can make use of the FM SAP_WAPI_PUT_BACK_WORKITEM

Former Member
0 Kudos

Hi Pawan,

my customized screen :

If execute work item from INBOX,

Customized screen will displayed and we need to some text (then click approve or reject or back buttons).

If click BACK button, work item is disappears from my inbox.

Requirement is work item is should there in INBOX.

Your suggested FM: SAP_WAPI_PUT_BACK_WORKITEM

Where I need to call and either module pool or business object or workflow ?And what code I need to add?

Please suggest me.

Thanks & Regards,

Prasad.

bpawanchand
Active Contributor
0 Kudos
I need to call and either module pool

Yes you have to call in the Module pool under the okcode for BACK. and make sure you can import the workitem into the module pool program. pass the same workitem ID to the FM

Former Member
0 Kudos

Hi Pavan,

i wrote the code in module pool program.

if sy-ucomm = 'BACK'.

get parameter id 'WID' field lv_wid. " workitem id

CALL FUNCTION 'SAP_WAPI_PUT_BACK_WORKITEM'

EXPORTING

WORKITEM_ID = lv_wid

  • IMPORTING

  • NEW_STATUS =

  • RETURN_CODE =

  • TABLES

  • MESSAGE_LINES =

  • MESSAGE_STRUCT =

.

SET SCREEN 0.

LEAVE SCREEN.

but it giving the error message is " Method SWW_WI_BACK not allowed for type F".

please suggest.

Thanks & regards,

Prathap kumar K.