Irfan's World

November 17, 2012

What you should know about Stored Procedure Universe in BI 4.0 ?

As we all know there are many advantages of using stored procedures, they are always in my problem resolving kit, as a last resort I have to use it to create one of the complex report that needs to be delivered  as Web Intelligence report. Apart from providing many advantages like transaction control, speed, complex logic support, security and data access, they are powerful enough to deliver complex reports.  My all time favorite tool is to use Universe, I have to use stored procedure to develop a report that takes data from multiple excel files including few database tables,  one other thing I would like to mention is the data from excel file changes everyday.  Luckily Business Objects supports stored procedure universes and I have used it to deliver this requirement.

I would like to bring my experience to all my readers who are interested in learning what stored procedure universe can offer to a developer or an end-user. I would like to point out what is possible and what is not possible with Stored Procedure universe and I hope it should give a clear understanding when one can utilize it.  I am using BI 4.0 with Oracle 11g database.

What is a Stored Procedure?: Sets of SQL statements that are saved as executable files in a database fully parsed.
What is a REF Cursor?: A pointer to a work area in which a result set is stored.

What are the other requirements needed at first place ?

  • Create package that defines the REF CURSOR. This REF CURSOR must be strongly bound to a static pre-defined record structure.
  • The procedure must have a parameter that is a REF CURSOR type.
  • The REF CURSOR parameter must be defined as IN OUT (read/write mode).
  • The stored procedure can only return one ResultSet
  • Test and run the stored procedure in an SQL Tool like TOAD or SQL*PLUS

Once all of the above requirements have been met, verify that the database driver that you are using works with that version of Oracle.

I am using SCOTT schema from Oracle.  Following is a package emp_package declaration for a strongly typed cursor in Oracle using EMP table.  REF CURSOR emp_row_type returns a result set of type emp%rowtype


Following is a structure of the stored procedure, it shows how to use or refer emp_row_type REF CURSOR data type declared in the emp_package.


The name of the stored procedure is getEmployeesByDepartment, It accepts a parameter value for a department column and returns the data from the EMP table. We will use this stored procedure to build a universe in Business Object. First create a secure connection that connects to the database and also make sure you have selected the checkbox ‘Click here to choose stored procedure universe’ as shown in the screenshot below. This will indicate that it is a stored procedure universe


If stored procedure has parameters, it will now ask to enter information for the Parameter, Prompt Label and what it should do on ‘Next execution’ ?. If you see the screenshot below it shows value column, prompt label and Next execution drop down box. Click OK to save and close this window.


Once all the information is provided, it will display a table in the universe pane as shown below, this table contains all the columns that will be returned by the stored procedure. In this example, I have created a class named Employee with two measure objects like Sal(Salary) and Comm(Commission).  Similar to an ad hoc universe one can use the stored procedure without an issue.  There are no joins, no contexts in the universe, all the business layer logic is stored in the stored procedure itself. 


You can save the universe and export it to the repository.  Now, you can use this stored procedure universe to develop Web Intelligence reports.  You can drag and drop the objects similar to any other Universe. There are few things that are not possible in query panel.  You cannot create additional prompts or add additional criteria in query panel. You can refresh and view the returned data from the database.


Now use the Universe to create a Web Intelligence report.  I have selected all the columns that were returned by the stored procedure.


What is possible in a Stored Procedure Universe ?

    You can change the data type of an object
    You can set object properties of an object
You can do the check integrity of stored procedure universe
    You can use stored procedure objects in result pane while creating report.
You can apply sort on an object if required.
You can apply access restriction for a user or group.
You can set a prompt value if the stored procedure accepts a prompt.

What is not possible in a Stored Procedure Universe ?

     You cannot use a stored procedure object in the criteria pane in query panel of Web Intelligence report.
     You cannot change the definition of a Universe object, it is disabled or grayed out by default.
     You cannot create a pre-defined filter using a stored procedure Universe object, it is disabled or grayed out in the Universe.
    You cannot INSERT another stored procedure in a stored procedure universe.
    You cannot INSERT a table in the stored procedure universe.
    You cannot call a stored procedure from a Derived Table in Universe.
    You cannot apply INDEX AWARENESS on stored procedure Universe objects.
    You cannot create custom or new objects that were created for certain purpose based on stored procedure objects.

In conclusion I would say that there are limitations of using Stored procedure universe, lot of things not possible at the Universe Level and the universe becomes like a read only Universe. There is a little control on the Universe side which is changing a connection such as ODBC to Native.  Would use this feature only as last resort.  If you have any comments please share it through the comments section below.


June 30, 2012

SAP BI 4.0 – Central Management Server ports

Filed under: Live Traffic, SAP BI 4.0 Administration — Tags: — Irfan @ 10:16 am

In BI 4.0 Central Management Server (CMS) uses two different ports:

a) Name Server Port

CMS by default uses port 6400 to communicate with Designer, WebI Rich Client, Information Design Tool, Business View Manager, application server(s) and may be firewall internal to the organization. In other words CMS listens for the requests on this port, this port is referred as name server port. When the BI server starts all the other BI services will register with CMS on name server port, CMS then sends its request port # to other service to communicate after its registration with CMS.

If the name server port is changed then all the BI services that needs to communicate with CMS has to know on which port the CMS is running to register themselves.

b) Request port
Each BI server binds to a request port, for example the Web Intelligence Processing Server  select its request port number dynamically when the server starts or restarts, unless it is configured to use a specific port number. This port is used by CMS to communicate with the Web Intelligence Processing Server.

For CMS the name server port and request port must be different otherwise the server will not start. If you by mistake set these ports with the same port # and saves it, the next time when the BI server restarts then CMS will not start because of port conflict. It may throw this error in CCM.   (@IRFANCLSTR is the cluster name)



To resolve the port conflict follow the following steps: 

  stop the SIA in CCM
  go to properties and startup tab
  click the central management server
  click properties and delete the request port shown below.   


Click OK and restart the SIA.

In conclusion, do not assign the same port # for CMS in CMC Launchpad as it is not advisable. You can also assign static ports to each of the BI services in BI 4.0 stack but that is all together a different topic.


February 18, 2011

How to display a database column values in a single cell in Web Intelligence Rich Client ?

In this post, I would like to show you how to display an object value in a single cell separated by a delimiter in a WebI report.

I have a table name called Account in Xtreme database and it has the following values,  the requirement is to display all the account names in a single cell in the report.



This requirement can be fulfilled if we have access to Universe Designer in which three following objects needs to be created with the syntax shown, I am using SQL Server as my database.

    Column Value
    Actual Object Name – Single Line

1) Create a ColumnValue object as below:


2) Create a Delimiter object as below:


3) Create a Account Name object as below:

This step needs two things, make sure the definition of the object looks like below plus the qualification should be a measure with projection as SUM



Objects qualification and projection


All the ground work is done, now I will use the object in a sample report.  Let’s see what it returns ?


The report output is shown below…. voila !!!


That is all for today.Wave

Create a free website or blog at