on 11-11-2010 5:18 PM
Hi gurus,
I'm trying to use UWL API to get all tasks relative to the logged user. I follow this blog:
[http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/16356] [original link is broken];
Here is a detail of my source code:
IUWLService uwlService =
(IUWLService) WDPortalUtils.getServiceReference(
IUWLService.ALIAS_KEY);
UWLContext myContext = new UWLContext();
IWDClientUser user;
user = WDClientUser.getLoggedInClientUser();
IUser loggedInUser = user.getSAPUser();
myContext.setUser(loggedInUser);
IUWLSession mySession =
uwlService.getUwlSessionForWebDynproClient(myContext);
IUWLItemManager itemMan = uwlService.getItemManager(myContext);
QueryResult result = itemMan.getItemsForItemType(myContext,ItemType.UWL_ITEM,null,null);
ItemCollection coll = result.getItems();
List l = coll.list();
Iterator iter = l.iterator();
while (iter.hasNext()) {
Item item = (Item) iter.next();
// External Type is used to filter the notifications according to application
wdComponentAPI.getMessageManager().reportSuccess("ExternalId: "+item.getExternalId().split("@")[0]);
}
The problem is that the number of tasks returned is always the same and it never goes over the 100 results. It seems that there is a filter that stops the results after the 100 tasks...
Thanks
Hi,
you can specify several query properties when calling the API.
For example:
QueryProperties myProps = new QueryProperties();
myProps.setMaxNumberOfItemsToFetch(100);
QueryResult result = itemManager.refreshCacheAndGetItems(myContext, myView, myProps, null);
BR,
Timo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.