on 09-11-2007 9:52 AM
Hi All,
iam facing problems while retrieving records assigned to a workflow, am able to get the Record Ids of a work flow. Now am trying to retrieve Records using RetrieveRecordsByIdCommand , am getting run time exception. Please check the code and suggest if any modification have to be made.
RetrieveRecordsByIdCommand retRecById= new RetrieveRecordsByIdCommand(connPool);
retRecById.setSession(session);
retRecById.setIds(workId);
ResultDefinition resultDefinition = new ResultDefinition(tId);
retRecById.setResultDefinition(resultDefinition);
// retRecById.getResultDefinition();
RecordResultSet recResultSet = retRecById.getRecords();
try {
retRecById.execute();
System.out.println("SESSION Execute");
} catch (CommandException e) {
String errMsg = "Failed to authenticate the repository session!";
System.out.println("SESSION Not Execute");
throw new RuntimeException(errMsg);
}
// Run Time Expception //
java.lang.NullPointerException: Parameter 'lookupId' must not be null
at com.sap.mdm.valuetypes.LookupValue.<init>(Unknown Source)
at com.sap.mdm.data.commands.RetrieveRecordsByIdCommand.execute(Unknown Source)
at sap.mdm.GetWorkflows.main(GetWorkflows.java:177)
Exception in thread "main"
Pls provide Solution
Thanks
Praveen K
Hi Praveen,
you must specify what to retrieve from the found records in the resultDefinition. For example:
resultDefinition.setSelectFields(fields);
where fields is an array for field ids.
For complete examples see:
http://help.sap.com/saphelp_mdm550/helpdata/en/46/281bc8218b14dbe10000000a155369/frameset.htm
Kind regards,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would guess that your workId is null. Check that it has a valid value before running these lines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.