Question

How to list universe objects from a webi report using the Business Objects SDK for XIR2?
Is there is an automated way to do it without the sdk?

With the SDK I've been able iterate through webi report and universe collections but do not see a native way to retrieve either the query objects or the report query.

Was it helpful?

Solution

There is a way to achieve this using BO 4.0 SDK :

// Get the list of webi documents
IInfoStore infoStore = (IInfoStore) enterpriseSession.getService("InfoStore");
String query = "select SI_NAME, SI_ID from CI_INFOOBJECTS "
      + "where SI_KIND = 'Webi' and SI_INSTANCE=0";
IInfoObjects infoObjects = (IInfoObjects) infoStore.query(query);

for (Object object : infoObjects) {
    IInfoObject infoObject = (IInfoObject) object;
    if (getInfoObjectPathAndTitle(infoObject).startsWith("/")) {
      System.out.println("REPORT: " + infoObject.getTitle());

      IDocumentInstance doc = documentInstanceManagementService
          .openDocument(context, infoObject.getID());

      List list = ReportDictionaryHelper
          .getDictionaryObjectsFlatList(context, doc);
      if (list.size() > 0) {
        System.out.println("OBJECTS:");
        for (DictionaryExpression expr:list) {
          System.out.println(expr.getName());
        }
      }

      List vars = ReportDictionaryHelper.getDocumentVariables(context,doc);
      if (vars.size() > 0) {
        System.out.println("VARIABLES:");
        for (Variable var:vars) {
          System.out.println(var.getName());
        }
      }

      documentInstanceManagementService.closeDocument(context, doc);
      System.out.println();
}

But I am looking for a way to do this using BO XI R2 SDK. It does not contains needed apis.

OTHER TIPS

The BusinessObjects repository (database) contains complex data, blobbed in composite table columns.

Repository data decrypted by querying through the CMS; meaning, it cannot be connected to/queried directly i.e. have a universe overlayed and queries thus run directly off it.

The BusinessObjects repository may however be questioned either by submitting simple queries through the 'Query Builder' GUI (accessed via admin Launchpad <= XIR2.x or via the installation servers program menu XI 3.x+ - both have URL’s) OR through Enterprise SDK’s/Web Services.

The data returned is in the form of InfoObjects. InfoObjects are programmatic, object-oriented representations of data held in the repository. InfoObjects may have one or more related objects inset which are projected as tables within tables in a query result, data output however can be manipulated in tools such as MS Excel and converted to tabular format.

Access methods for querying repository InfoObjects are discussed by SAP developers in related forums & blogs, I recommend reading: http://weblogs.sdn.sap.com/pub/wlg/13214 for more information.

I have had to use the administrative query tools (Build a query -- very rudimentary) to pull data from the CMS. One of the things I see in the output is data connections and SQL statements. This is technically not using the SDK (er, you're using their built in access to the InfoStores), but you will probably need SDK documentation to figure out what you're even looking for. Their implementation is pretty crude, and if you get the query wrong, it doesn't tell you what is wrong with it. If you get the query slightly wrong, it may return a 'no records found' statement.

Records returned are multi-level... if an field in the query can refer to another table, you may get one field with the result of the subquery in it. And some of those fields may have subquery results. It's a pain to figure out, but once you can figure the fields, you can extract data (manually) from it.

Using Query Builder, the following query will return the SI_ID values for each report associated with a universe:

SELECT * FROM CI_APPOBJECTS WHERE SI_KIND='Universe'

Using Query Builder, the following query will return WebI report names based on the ID:

SELECT SI_NAME,SI_DESCRIPTION, SI_ID,SI_AUTHOR,SI_PARENT_FOLDER,SI_UNIVERSE,SI_HAS_PROMPTS FROM CI_INFOOBJECTS WHERE SI_ID IN (xxx,xxx,xxx)

I don't see a way to combine the two together to just show universes with reports. Also, I don't see a way to get this data into Business Objects itself as a WebI report.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top