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.
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.
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
- 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
The process flow between the various components for this business
scenario is illustrated in the "swim-lane" diagram below:
As diagrammed, the process flows between the components as follows:
- Input Information
- The user enters some information into an iView in the portal,
and request results.
- 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.
- Average Demand
- An OLAP query is executed against an InfoCube in BW to request
- Lead Time
- An InfoSet Query is executed against a BW InfoObject to request
the lead time.
- Collect Information
- The BI Java SDK application collects the information returned
as results from BW.
- Perform Calculation
- The BI Java SDK application calculates economic order quantity
and optimal reorder point based on formulas you defined.
- Output Results
- The iView reads the results of the calculations made by
the SDK, and presents the numbers and a graph of the cost
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:
Your basic steps to implement this scenario are as follows:
- Define your formulas for the calculation of economic order quantity
and optimal reorder point.
- Activate the necessary metadata objects from the BI Business Content.
- Load the necessary data into your BI system.
- Using the BI Java SDK, create a Java application that does the following:
The figure below shows what it might look like to work with the BI Java
SDK within the NetWeaver Developer Studio:
- 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
Once you're done with your application, all you have to do now is deploy
- 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
for step-by-step instructions on how to build servlets that access,
manipulate, and display OLAP and relational data.