on 03-27-2015 5:34 PM
Is there a way to retrieve a list of reports for specific category programmatically using the Java SDK?
I started with this earlier message but wasn't able to to find any example of how this would work using the SDK.
Current Code:
// Get a list of available categories
try {
query = new String("SELECT * FROM CI_INFOOBJECTS WHERE SI_PARENTID=45");
logDebug("Checking Categories Folder: " + query);
infoObjects = (IInfoObjects) infoStore.query(query);
} catch (SDKException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (infoObjects.getResultSize() == 0){
throw new SAPException("No Categories found");
}else{
//Retrieve reports for each category
for (int i = 0; i < infoObjects.size(); i++) {
IInfoObject infoObject = (IInfoObject) infoObjects.get(i);
// process folder
try {
//Query for all reports with current category
// NEED HELP HERE
} catch (SAPException exception) {
logError(exception.getMessage());
}
}
On Line 18, get list of all children of the category folder: String searchQuery = "query://{SELECT * FROM CI_INFOOBJECTS WHERE SI_PARENTID = " + infoObject.getID() + "}";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
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.