cancel
Showing results for 
Search instead for 
Did you mean: 

Forward Workitem - Should remove from first user's Inbox

former_member435508
Participant
0 Kudos

Hi All,

I am forwarding my list of workitems from User A to User B with -  SAP_WAPI_FORWARD_WORKITEM

CALL FUNCTION 'SAP_WAPI_FORWARD_WORKITEM'

            EXPORTING

              workitem_id    = lv_wi_id

              user_id        = sy-uname

              language       = sy-langu

              do_commit      = 'X'

              current_user   = sy-uname

            IMPORTING

              return_code    = lv_rcode

              new_status     = lt_new_status

            TABLES

*             MESSAGE_LINES  =

*             MESSAGE_STRUCT =

              user_ids       = lt_user_ids.

Which is forwarding Workitem to user B but it remains in User A's inbox too...

I also try it with  SWW_WI_FORWARD but its not working...

I need the 'Forward' work as Std 'Forward' functionality (i.e. Need to remove the workitem from inbox of user A)

Can you help ???

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Priya,

If you can see User A work item in SWI5 there is a temporary solution to delete from User A inbox.

Please try below:

SWI5, click on the work item ID/Goto/technical work item display /right click/select change/Execute on logically Delete

former_member435508
Participant
0 Kudos

Hi Jaylaxmi,

Thanks.

But actually this is in report - which I need to handover to the user.

And user can go for N no. of times...

I want the solution in code itself.

Former Member
0 Kudos

What you currently are doing is: forward the item to the current user again.

So please try this:

CALL FUNCTION 'SAP_WAPI_FORWARD_WORKITEM'

            EXPORTING

              workitem_id    = lv_wi_id

              user_id        = lv_target_user_id

              language       = sy-langu

              do_commit      = 'X'

            IMPORTING

              return_code    = lv_rcode

              new_status     = lt_new_status

            TABLES

*             MESSAGE_LINES  =

*             MESSAGE_STRUCT =

              user_ids       = lt_user_ids.


The parameter user_id can stay empty, if you want to forward the item to more than one recipient. In that case, you can use the table USER_IDS. It is not necessary, to fill both fields.



Answers (0)