BI Java SDK: A Business Scenario

Why use the BI Java SDK? What benefits does it bring you, and what sorts of business cases can be solved using the SDK? On this page, we illustrate the answers to these questions with a simple real-world business scenario using the BI Java SDK.


The Objective

You are a Java developer with data modeling experience, and your IT team has given you a business question to address. You'd like to integrate your solution into SAP's NetWeaver landscape, deploying a Java application seamlessly onto the server, for ease of viewing from any Web browser for all authorized portal users.

All you need to accomplish this objective is included with SAP NetWeaver.

Business Question

Your business case deals with a classic inventory problem: calculation of economic order quantity and optimal reorder point. For a given product, the purchase manager needs answers to the following questions:

  • How many units should I order in one single batch (economic order quantity)?
  • When is the right time to order (optimal reorder point)?
  • What is my cost structure, and how does this vary with changes in input costs?

Why Use the BI Java SDK?

You decide to implement the scenario using the BI Java SDK primarily for the following reasons:

  • The information stored in SAP Business Intelligence (BI and earlier BW systems) is available only in disparate objects, and the team does not have the time or budget to quickly develop an additional InfoProvider in this particular case.
  • SAP BI does not offer the inherent simulation capabilities you need. While it offers variable usage in formulas and the deployment of Business Planning and Simulation (BPS), these approaches seem like overkill for a rather simple business problem.
  • You are a Java developer, and you wish to leverage this ability and the flexibility of custom application design together with the ease of integration and deployment of SAP NetWeaver.
  • You'd like to integrate data from both relational and multidimensional (OLAP) data sources into one application.

What You Will Need

You'll use the following components, delivered with NetWeaver:

  • BI Java SDK
  • BI XMLA Connector - to access a BW InfoCube
  • BI SAP Query Connector - to access a BI system InfoSet

 

Process Flow

The process flow between the various components for this business scenario is illustrated in the "swim-lane" diagram below:

process flow

As diagrammed, the process flows between the components as follows:

  1. Input Information
    • The user enters some information into an iView in the portal, and request results.

  2. Request Information from an SAP BW system
    • An application created by the BI Java SDK receives the request and initializes the communication to BW.
    • The application then requests some basic information from BW, as described in the next steps.

  3. Average Demand
    • An OLAP query is executed against an InfoCube in BW to request average demand.

  4. Lead Time
    • An InfoSet Query is executed against a BW InfoObject to request the lead time.

  5. Collect Information
    • The BI Java SDK application collects the information returned as results from BW.

  6. Perform Calculation
    • The BI Java SDK application calculates economic order quantity and optimal reorder point based on formulas you defined.

  7. Output Results
    • The iView reads the results of the calculations made by the SDK, and presents the numbers and a graph of the cost structure.

The Result

As a result of the user's input in the iView, he or she receives figures for economic order quantity and optimal reorder point. The user now knows, for example, that one batch of orders should contain 316 units, and a new order should be placed as soon as the inventory falls below 243 units.

In addition to the figures, the iView also displays a graph which shows the changes in the cost structure (annual cost), as a function of the order quantity.

The iView might look something like this:

iview in enterprise portal

 

Implementation

Your basic steps to implement this scenario are as follows:

  1. Define your formulas for the calculation of economic order quantity and optimal reorder point.

  2. Activate the necessary metadata objects from the BI Business Content.

  3. Load the necessary data into your BI system.

  4. Using the BI Java SDK, create a Java application that does the following:
    • Connects via the BI XMLA Connector to a query in a BW InfoCube
    • Connects via the BI SAP Query Connector to an InfoSet query based on a BW InfoObject
    • Executes queries against the InfoProviders
    • Receives data from the InfoProviders
    • Performs calculations on the results
    • Formulates the results and sends the data to the Portal for display in an iView

    The figure below shows what it might look like to work with the BI Java SDK within the NetWeaver Developer Studio:

    bi java sdk in eclipse

    Once you're done with your application, all you have to do now is deploy it:

  5. Deploy the Java application as an iView onto the portal.

 

For Additional Information

  • Refer to the Examples page for examples of Java source code that illustrate each of the SDK's APIs. From this page, you can also view their result sets rendered into HTML tables.
  • See the Getting Started chapter in the Developer's Guide (developer's guide pdf) for step-by-step instructions on how to build servlets that access, manipulate, and display OLAP and relational data.