cancel
Showing results for 
Search instead for 
Did you mean: 

UWL submitUserCustomAction

Former Member
0 Kudos

Hi All,

Creating a custom UWL view to Approve and Reject leave request. Have created two custom actions as below:

<Action name="approveAction" groupAction="yes" handler="FunctionModuleActionHandler" returnToDetailViewAllowed="yes" launchInNewWindow="no">

<Properties>

<Property name="IM_COMMAND" value="EXECUTE_APPROVE"/>

<Property name="IM_REQUEST_ID" value="${item.externalObjectId}"/>

<Property name="FunctionModule" value="PT_ARQ_REQUEST_EXECUTE"/>

</Properties>

<Descriptions default="Approve Leave Request"/>

</Action>

<Action name="rejectAction" groupAction="yes" handler="FunctionModuleActionHandler" returnToDetailViewAllowed="yes" launchInNewWindow="no">

<Properties>

<Property name="IM_COMMAND" value="EXECUTE_REJECT"/>

<Property name="IM_REQUEST_ID" value="${item.externalObjectId}"/>

<Property name="FunctionModule" value="PT_ARQ_REQUEST_EXECUTE"/>

</Properties>

<Descriptions default="Reject Leave Request"/>

</Action>

They work when I create two additional column (radio buttons) with a submitUserDecisions, but I do not want to use this method, I would prefer to use a multi select view with the action.

<View name="MyLeaveView" selectionMode="MULTISELECT" .......

<Actions>

<Action name="Approve" reference="approveAction"/>

<Action name="Reject" reference="rejectAction"/>

</Actions>

However the actions do not appear at the top of the view only in the preview panel for each item. How can I make them appear at the top of the view and action all selected lines?

OK, another question. How can I allow a default action (which is launchWebDynpPro) to be active on one view but not active on another view. I have set the default action of the view to

defaultAction="none"

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

piyush_kumar6
Active Contributor
0 Kudos

Hi Brian,

Without creating check-box or radio button its not possible to

achieve mass approval of uwl tasks.

If you are not creating the check box or radio button the function/method

created by you using FunctionModuleActionHandler will not execute the

RFC for any task item as it will not get any user decision either approve or reject.

If you still want to approve/reject all task without selection the check box or

radio button there is one alternate

you need to write one RFC where you will have to pass logged in user id and in

abap side you can approve or reject all task assigned to the user id and finally call

the rfc from uwl by creating method of type FunctionModuleActionHandler .

But there is one drawback with option -- after approving/ rejecting all the task

in background it will perform the required function but task will not disappear

from uwl at the same point of time. In this case you will have to refresh the uwl

manually or wait for auto refresh.

Regards,

Piyush

Former Member
0 Kudos

Hi Piyush, thankyou for you helpful answer, thought that might be the case.

If I use the radiobutton solution, I will also create a third column with "no action", this will allow users to take no action on a line item or if they accidently changed their mind after they had selected "accept" or "reject", but have two question:

How can I set the "no action" radiobutton as default i.e. auto selected for all line items when the user opens the UWL.

How can I perform no action (I want nothing to happen on that line item) when the user submits the lines items - I have tried setting the handler="IViewLauncher" where the iview is set to null, but this give an error. I could use the FunctionModuleActionHandler and pass a "No_ACTION" parameter, however this would require changes to the Functional Module.

Also have you ever had to disable the defaultAction on one view but not on another? This was the second part of my question, I want to disable the ability to select individual on the mulit approve/reject view, but still allow the ability on the default view.

Thanks

Brian

piyush_kumar6
Active Contributor
0 Kudos

Hi Brian,

I have tried all most every thing for auto select for Radio Button as well as for Check Box but its not available.

As you know we create Radio Button and Check Box in XML file not in JSP/HTML pages, The DTD definition

available for UWL XML is not having any such attribute for auto select. So XML parser available in EP will not parser

if we write basic XML code for auto select for Radio Button and Check Box , which will result in Error.

If we talk about No Action then there is no need to create 3rd column for No Action if user is not selecting

any Radio Button and Check Box for approve/ reject then that task item will remain in uwl only.

2nd part of your question :

Yes we can disable defaultAction for a particular view without affecting default view and we define defaultAction

in ItemTypes not in view.

In view we just use the default action name with display attribute of type Link. By default Subject defaultAction will

work on Subject attribute for view.

Regards,

Piyush

Former Member
0 Kudos

Thanks for the reply, sorry took a while. Thought trying to set default radio button was not possible, I also tried all combinations. Will try disabling the link in the custom view and retain it in the default view later this week.

Thanks

Brian

Answers (0)