cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with workitems like to "approve" or to "reject" using uwl-api?

Former Member
0 Kudos

Hi all,

I am currently trying to write a WebDynpro-Application, which accesses the enterprise portal UWL by using uwl-api.

I am currently fetching all the UWL-workitems, but I am not able to "approve" or "reject" them.

Does anybody have a code snippet, how to access and approve or reject an workitem?

Thank you for your help in advance!

Kind regards, Patrick.

Accepted Solutions (0)

Answers (1)

Answers (1)

imthiaz_ahmed
Active Contributor
0 Kudos

It depends a lot on how the approval process is taken care in the WI. But if it uses standard decision making, then use FM SAP_WAPI_DECISION_COMPLETE

Regards, IA

former_member185879
Active Contributor
0 Kudos

Hi,

There is a FM to complete the workitem. The current will be received from UWL and pass it to the FM below. so, that it will complete the current workitem and move the workflow.

SAP_WAPI_WORKITEM_COMPLETE.

Regards

SM Nizamudeen

Former Member
0 Kudos

Hi all,

to use a FM might be one way to work with workitems.

But this implies, that I am accessing the FMs directly from the R/3, where the workitems are created in.

In my scenario, the single point of access / interface, should be the UWL in the enterprise portal, because there might be uncountable backend systems connected to the enterprise portal, which I don't "see".

So, the only way to handle the workitems, has to be using the JAVA uwl-api, accessing the workitems from the enterprise portal uwl and working with them directly. Unfortunately I am not able to do this at the moment and so it would be nice, if there is someone who can post some code snippets for doing this.

Nevertheless, thank you for help!

Kind regards, Patrick.

Former Member
0 Kudos

Hi,

You cannot "complete the items from UWL". The UWL shows you the items from backend systems (unless you are using some adhoc workflows or GPs in portal, etc.), so if you want to complete a work item, you MUST complete it in the backend. There are multiple ways to complete items from backend, and the correct way depends on the type of the work item and the workflow in question.

Regards,

Karri

Former Member
0 Kudos

Hi Karri,

I think we both are right.

If you take a look at the uwl-api: https://help.sap.com/javadocs/NW04S/current/uw/index.html you can see, that there is IUWLItemManager, and with this manager, you can "performActions" on UWLItem, so it is possible to work with items using the UWL-api.

At the end of the day, in the background, you are right...the necessary workitems and their functions are called, but I don't want to access them directly.

Hope, that my problem is understood now correctly.

Kind regards, Patrick.

Former Member
0 Kudos

Well, I agree with you. But I would still say that if you want to perform the actions of the items, it will require that the UWL configuration has been done in a specific way for the different tasks. And this specific way is highly depended on the backend workflow/task. There are for example certain action handler for raising events. So for example if your workflow task is waiting for events (approved/rejected/etc.) in the backend, it is possible to raise these events from UWL. And I guess that with your ItemManager it is possible to handle this kind of situation.

I doubt that there are many people in this forum who have ever done anything like this.

What kind of XML configurations you have for the different workflow tasks for UWL?

Regards,

Karri