cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving a list of reports for a specific category

Former Member
0 Kudos

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());

  }

  } 

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

On Line 18, get list of all children of the category folder: String searchQuery = "query://{SELECT * FROM CI_INFOOBJECTS WHERE SI_PARENTID = " + infoObject.getID() + "}";