Show TOC

Business ScenarioLocate this document in the navigation structure

Purpose

Why Use the BI Java SDK? What benefits does it bring you and what sort 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.

Aim

You are a Java developer with data modeling experience, and your IT team has given you a business question to address. You want to integrate your solution into SAP's SAP NetWeaver landscape and thereby deploy a Java application seamlessly onto the Web Application Server, to provide all authorized Enterprise Portal users with a simplified view in any Web browser.

Everything you need to achieve this aim is included with SAP NetWeaver 7.0 EHP1.

Business Task

Your business case deals with a classic inventory problem: calculating the optimal 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 (optimal 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 NetWeaver BI 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.
  • BI does not offer the inherent simulation capabilities you need. Although BI offers variable usage in formulas and the deployment of Business Planning and Simulation (BPS), these approaches seem to be too complex for a rather simple business problem.
  • You are a Java developer, and you wish to benefit from the capability and flexibility of custom application design as well as the ease of integration and deployment of SAP NetWeaver.
  • You want to integrate data from relational, non-SAP data sources with SAP data in an application
Prerequisites

You use the following components that are supplied with SAP NetWeaver:

  • BI Java SDK
  • BI JDBC Connector
Process Flow

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

The process flows between the components as follows:

  1. Input Information

    The user enters information into an iView in the Enterprise Portal and request results.

  2. Request Information from BI

    An application created by the BI Java SDK receives the request and initializes the communication to BI.

    The application then requests some basic information from BI, as described in the following steps.

  3. Average Demand

    An OLAP query is executed against an InfoCube in BI to request the average demand.

  4. Lead Time

    The lead time is requested using an SQL query on a non-SAP data source that contains the relevant information.

  5. Collect Information

    The BI Java SDK application collects the information returned as results from BI.

  6. Perform Calculation

    The BI Java SDK application calculates optimal order quantity and optimal reorder point based on formulas that you have 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.

Result

Users receive figures - based on what they entered in the iView - for the optimal order quantity and optimal reorder point.  Users now know, 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 costs), as a function of the order quantity.

The iView might look something like this:

Implementation

To implement this scenario, you need to perform the following basic steps:

  1. Define your formulas for the calculation of the optimal order quantity and optimal reorder point.
  2. Activate the required metadata objects from the BI Business Content.
  3. Load the required data into your BI system.
  4. Using the BI Java SDK, create a Java application that performs the following steps:
    • Connects via the BI Connector to a query in a BI InfoCube
    • Connects via the BI JDBC Connector to the non-SAP system
    • Executes queries in InfoProviders and on the non-SAP system
    • Receives data from InfoProviders and the non-SAP system
    • Performs calculations based 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 integrated development editor Eclipse:

    Once your application is finished, you simply have to deploy it:

  5. Deploy the BI Java Connectors on the SAP NetWeaver Web Application Server.
  6. Deploy the Java application as an iView on the SAP NetWeaver Enterprise Portal.

More Information:

  • Refer to the Examples page in the BI Java SDK documentation set for examples of Java source code that illustrate each of the SDK's APIs. Using this page, you can also view the corresponding result sets as HTML tables.
  • See the Getting Started chapter in the Developer's Guide included in the BI Java SDK documentation set for step-by-step instructions on how to build servlets that access, change, and display relational data.