cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Workitem from approving from R3 inbox

Former Member
0 Kudos

Hi,

I want to restrict approving workitem (wd abap application is called) only from portal UWL. users should not approve it from R3 inbox.

Right now when users are trying to open the workitem from r3 inbox, workitem is going into reject state automatically.

I want to show them a message when they try to execute it from R3 inbox.

How can i achieve it.

Regards

Satish

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Satish,

In the method of approval task, you can simply write message statement and then call the EXIT_CANCELLED macro.

For example,

begin_method (dummy Method name> changing container.

message iXXX(<Message class name>).

exit_cancelled.

end_method.

This will display an information message to user when he tries to open the work item from SBWP.

Regards,

Ibrahim Ansari.

Jocelyn_Dart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Satish, Yup it's been done.  I'm assuming you are using a task visualization entry in transaction SWFVISU to point ot the Web Dynpro ABAP application? In which case the UWL completely bypassess the usual BOR/ABAP Class method linked to the task.

So what you want to do to complete the picture is to simply raise an info message "This work item must be executed in the UWL" or similar in the method, and then raise a temporary exception so it doesn't error or complete the task.   Of course if its an asynch task terminated by an event you can just raise the info message because the work item will stay there until the terminating event is raised anyway.

Hope that helps

Jocelyn

Former Member
0 Kudos

Thanks Jocelyn for the reply.

  I'm assuming you are using a task visualization entry in transaction SWFVISU to point ot the Web Dynpro ABAP application?

Yes.

So what you want to do to complete the picture is to simply raise an info message "This work item must be executed in the UWL" or similar in the method, and then raise a temporary exception so it doesn't error or complete the task

In which method should i raise the message?

Regards,

Satish

suresh_subramanian2
Active Contributor
0 Kudos

Hello Satish !

            Have a look at the coding part of the method DUMMY of the class CL_PT_REQ_WF_ATTRIBS and exception tab to get an insight about "This work item must be executed in the UWL" .

Regards,

S.Suresh.

Former Member
0 Kudos

Hi Suresh,

I used the same code in my class, but exception message was not raising.

When will be this dummy method called.

Are there any other setting needs to be done.

Regards,

Satish

suresh_subramanian2
Active Contributor
0 Kudos

Hello Satish !

             Can you share the source code ?

Regards,

S.Suresh.

Former Member
0 Kudos

Hi Suresh,

Here is the code written in dummy method.

method DUMMY.

   MESSAGE e066(hrtim_abs_req).

   RAISE temp_exit_cancelled.

endmethod.

This Dummy method is assigned in Task as in below screenshot.

Regards,

Satish

suresh_subramanian2
Active Contributor
0 Kudos

Hello Satish !

             When the method is executed in SE24 transaction, did it displays the message that

the request cannot be started from the business workplace ?

              Activate the exception, method and class. In addition, the task that would use this method has to be registered in SWFVISU transaction.

Regards,

S.Suresh.

Former Member
0 Kudos

Hi Suresh,

I deleted the method from the task and reassigned it and it started working now.

Regards,

Satish

suresh_subramanian2
Active Contributor
0 Kudos

Hello Satish !

           I'm glad that your problem is resolved.

           Appreciate for the letting the community to know how you made it. Thanks a lot !

Regards,

S.Suresh.