bo list of values

28
BO List of values Last Updated on Wednesday, 10 October 2012 05:24 Written by Saurav Mitra A list of values contains the data values associated with an object. These data values can originate from a corporate database, or a flat file such as a text file or Excel file. List of Values is a powerful feature that allows users to select from a pick list when setting conditions in a query. Implementation Steps: 1. Open DESIGNER and Import Universe. 2. Selec t a cl ass a nd a specif ic obj ect b y dou ble clic king. 3. Select Properties tab. 4. Gi ve a list name. 5. Cl ic k E di t button. 6. Drag th e selecte d object in th e conditio n pane ,giv e desired o perato r and type the v alues ma nually. 7. Run and Click save and close.

Upload: cognosindia

Post on 03-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 1/28

BO List of valuesLast Updated on Wednesday, 10 October 2012 05:24

Written by Saurav Mitra

A list of values contains the data values associated with an object. These data values can originate from acorporate database, or a flat file such as a text file or Excel file. List of Values is a powerful feature thatallows users to select from a pick list when setting conditions in a query.

Implementation Steps:

1. Open DESIGNER and Import Universe.2. Select a class and a specific object by double clicking.3. Select Properties tab.4. Give a list name.

5. Click Edit button.

6. Drag the selected object in the condition pane ,give desired operator and type the values manually.7. Run and Click save and close.

Page 2: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 2/28

8. Check values by clicking the display button.

9. Save and Export the Universe. When we perform this action a .lov file that gets created in the samefolder where the universe is stored and get exported along with the universe in the repository.

10. Open a Web Intelligence Document and select the exported Universe.11. Select any object along with the object on which .lov file is created in the Query pane.12. Select the object having the LOV in the query filter pane , select an operator (in list) and try to

insert values from a list.

Page 3: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 3/28

13. We will see that the list of values window will just show the values that was previously selected andsaved as a .lov file in the Universe level.

14. Run the query and we will see that only the selected values in the universe level of the object onwhich .lov file is created appears in the result with corresponding mapping of other objectsselected in the query pane.

Using Cascading List of Values (LOVs)

Page 4: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 4/28

Similiarly you can create Cascading List of Values. Cascading List of Values is a Hierarchical LOV selectionmethod which allows users to select highest level of list first followed by the next hierarchical level whensetting conditions in a query.

1. Open DESIGNER and Import Universe.

2. Select Tools-> List of values -> Create Cascading List of values.3. Select some objects of same or different classes from the available pane by pressing Ctrl key and

add them to the cascading list of values Panel by clicking the right arrow key. The hierarchies /priorities can be changed by the up or down arrow key. Allow the user to give some prompt valuesby giving a prompt text.

4. Click Generate LOVs.5. Save and Export the Universe. When we perform this action a .lov file that gets created in the same

folder where the universe is stored and get exported along with the universe in the repository.6. Open a Web Intelligence Document and select the exported Universe.7. Select any number of objects along with the objects on which the cascading .lov file is created in

the Query pane.

8. Select the object having the LOV in the query filter pane , select an operator (in list) and try toinsert values from a list.

9. We will see that the objects with a higher hierarchy in the cascading list will first ask for the valuesfrom the list and then only object with the lower hierarchy can be populated with available values.

Conditional Column Hiding in BO 3.1

Webi Report Followup PostLast Updated on Wednesday, 17 October 2012 03:57

Written by Riddhiman Basu

Since my last post , I have been asked by people about how would I be hiding a column conditionally whenit is not the rightmost column of the table, rather is in the middle.

I will take a similar example as the previous one to illustrate this. However, this time I will base thecondition on an input control rather than a query filter.

Once again, I am using the standard efashion universe. I have developed a report with StoreName , Lines , Margin and Sales Revenue without any filters in the query panel. The report will look asbelow.

Click on the images below to magnify

Page 5: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 5/28

In addition, I will have created an Input Control on the Lines object as follows:

Now, I want that the Margin column will only be displayed, when the ‘Accessories’ value is selected in theInput Control. For all other selections(even ‘All Values’), this column will be hidden. To achieve this, thesteps will be:

1. Click on the Margin column and modify the formula for the column(=[Margin] initially) in the functionpanel as

=I f ( Repor t Fi l t er ( [ Li nes] ) ="Accessori es"; [ Mar gi n] ; [ Sal es r evenue] )

2. This formula will strip the Margin values from its formatting. So now select the column, right click andchoose Format Number. In the Format Type, select Currency as $ as below. Then click ok.

Page 6: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 6/28

3. Next click on the header of the Margin column and modify the formula for the cell(=NameOf([Margin])

initially) as

=I f ( Report Fi l t er ( [ Li nes] ) ="Accessori es"; NameOf ( [ Margi n] ) ; NameOf ( [ Sal es r evenue]) )

4. Now click on the Sales Revenue column and modify the formula for the column(=[Sales revenue]initially) as

=I f ( Repor t Fi l t er ( [ Li nes] ) ="Accessori es"; [ Sal es r evenue] ; "hi de")

5. Now click on its header and modify the formula of the cell(=NameOf([Sales revenue]) initially) as

=I f ( Repor t Fi l t er ( [ Li nes] ) ="Accessor i es"; NameOf ( [ Sal es r evenue] ) ; "hi de")

Page 7: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 7/28

6. Now create an alerter and put the condition as Cell Contents Equal to hide

7. Click on Format and set the font color, background color as colorless and border as none

8. Save the Alerter, click on the Sales Revenue Column and apply this alerter. Similarly apply on its header

Page 8: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 8/28

9. Now select any other value from the Input Control. The Margin column will be hidden

10. Now select ‘Accessories’ again. The Margin column will appear

Page 9: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 9/28

So what I have effectively done is moved the Sales Revenue column left and hidden the original SalesRevenue column based on the same condition. As a result, the Margin column appears to vanish andreappear based on Input Control selection

Note: ReportFilter ) function is used to capture the selections in an Input Control or Report Filter used in a

Webi Report. The reason I have used this function instead of the actual value, as in the previous case is,

there is an option for selecting All Values. If I had based the logic on values of Lines , the selection of ‘All

values’ would have looked like

If you are using the condition based on a query filter on Lines, you will be able to use the values in theformula as in the previous example.

About t he Aut hor Riddhiman Basu is currently employed as a Business Objects developer in a multinational company and

has experience in working on BO XI R2, R3.1 and SAP BO 4.0 versions of Business ObjectsIf you have any doubt or question on above, please Ask your question here . We will surely help you out!

If you want to learn more about SAP BusinessObjects, visit our SAP BusinessObjects Tutorial page .

Page 10: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 10/28

What is Derived Table in SAPBusinessObjects

Last Updated on Friday, 17 February 2012 16:39

Written by Adhir Kirtikar

A Derived Table is a logical table created in Business Objects Universe using an SQL query. A derived tablein a universe is analogous to a view created in database with a SELECT statement.

How to Implement Derived Table

1. Open/Import a universe.

2. Click Insert -> Derived Tables OR right click on an empty space in the universe canvas and clickderived Tables.

3. Write the SQL statement which is to be used for the derived table in the "Enter SQL Expression"

area. Name the derived table with an appropriate name.

Page 11: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 11/28

4. If the SQL of the derived table contains any calculation, enter a valid alias for that column. e.g.SELECT calculated_column AS CAL_COL FROM TABLE

5. Click "Check Syntax". If the SQL gives error, debug it. If the SQL parses correctly, click OK.6. The Derived Table can be seen in the universe canvas with columns as named in the SQL query.

These columns can be dragged to the "Universe Window" (on left side of the canvas) to createObjects of the derived table.

Page 12: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 12/28

7. Link the derived table with the database tables if required using appropriate joins and contexts.

Advantages of derived table:ß It can be created using an SQL statement with complex expressions, joins and prompts which are

not possible to create in BO Universe using normal approach.ß It acts just like a normal table in the universe and can be used to join with other database tables

and derived tables present in the universe.

Page 13: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 13/28

ß Multiple levels of nested derived tables can be created, in which, one derived table is used inanother derived table query.

ß Since a derived table is based in a universe and is not dependent on any DDL, there’s no need forany interaction from the DBA or ETL team for its creation.

ß Changing the structure of the derived table is as easy as changing the SQL statement it is made up

of.

Disadvantages of derived table:

ß Derived tables do not store data and hence every time a report using this table is run, the wholeSQL query is executed. This may cause poor performance of the report.

ß If the database tables used in the derived tables are huge and the query is complex, it may causememory issues on the server.

ß Since the derived table is a logical table, indexes cannot be used for faster data retrieval.

Points to remember:ß Use Derived Tables as a last resort since it slows down the execution of reports.ß Use only when an urgent (but temporary) fix is required and ETL implementation of this fix will take

time.ß Use only when there’s a requirement for a prompt to be embedded in the table structure.ß Use only when the BO universe methods are incapable of creating an implementation with complex

joins and calculations.

Top 5 BusinessObjects BO) ScenarioBased Questions

Last Updated on Monday, 18 June 2012 09:41

Written by Riddhiman Basu

In this tutorial, we will look into some of the fundamental and widely asked scenario based questions inBusinessObjects (BO) interviews. Let's get started.

Scenario 1:

Page 14: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 14/28

Suppose in a Univer se st r uct ure w e have t abl es as shown i n t he

di agram below . Ta bl es A,B and C ar e in cont ext ABC and C,E and

F are in cont ext CDE Now i f t her e is a r equir ement which

r equir es a j oin bet ween Tab le E and Tab le B, w e can defi ne a

new cont ext BCDE. But what is t he easiest way t o impl ement

th i s?

Define a shortcut join between tables B and E. To do this, join the tables normally. Then open the joineditor and check the box shortcut join.

Page 15: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 15/28

The join will show as a dotted line between the two tables. This kind of a join does not create loop andcannot be placed in any context. The shortcut join between Table B and Table E will only work whenobjects from both the tables are selected in the query panel of report.

Scenario 2:

We have obj ect s f r om 3 t ables A,B and C in t he query panel of a

r eport . Among t hem C is a lookup t able whi ch holds values wi t h

r espect t o keys. T able B holds t he f oreign key t o t he t able C. A

f i l t e r condi t ion i s appl i ed t o Table C in Query Level . T he

r esul t ing Query is :

SELECT A. a, B. bFROM

A, B, C

WHERE A. bf k=B. pk

AND B. cf k=C. pk

AND C. val =’ XXX’

Now, w e defi ne Pr imar y key and f oreign key relat ions f or T ables

B and C. Suppose t he surr ogat e key corr espondi ng t o val ‘ XXX’ is

12 . How wi l l t he query change af t er i mplement ing t h i s index

awareness?

The resulting query will be:

SELECT A. a, B. b

FROMA, B

WHERE A. bf k=B. pk

AND B. cf k=12

The table C will be eliminated from the Query and the foreign key to C in table be will be equated to 12,the key corresponding to ‘XXX’. The join with C will be eliminated.

Page 16: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 16/28

Scenario 3:

A User named User1 w ant s a pr i vi lege of r unni ng a BO Repor t f or

40 mins and r e t r iev ing a repor t wi t h row l imi t 40 ,000 . However,in t he SQL par amet ers of t he univer se, t he r ow l i mit i s set t o

10,000 and t he execut ion t ime l i mit i s set t o 10 mins. How can

you giv e t he user t he r equir ed r i ght s?

Go to Tools -> Manage Security Click on Mange Access Restrictions. Create a new restriction. In theControls tab of the restriction, set the row limit to 40,000 and execution time limit to 40 mins.

In the Main Window, apply this restriction to User1

Scenario 4:

In a repor t we have a t ab le l ike t h i s:

Di m A Di m B Measur e 1

Page 17: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 17/28

AA 12 100

BB 34 50

CC 21 40

DD 43 90

EE 45 200

FF 54 75

There i s a repor t f i l t e r appl i ed on t h i s b lock which rest r ic t s bo t h

DIM A and DIM B in t he t abl e, i .e only select val ues of DIM A, DIM

B and t he cor r espondi ng measures f r om t he query a r e di spl ayed

in t he t able. Anot her column needs t o be added which wil l

calculat e t he aver age f or each row b ased on t he sum of Measure

1 in t he t ab le (not a l l va l ues in repor t ) . What would be t he

fo rmula?

For this we will require the sum of Measure 1 in the table, which can be achieved only by In Block keyword.

The formula will be

Sum( Measur e 1) / Sum( Measur e 1 I n Bl ock)

Scenario 5:In t he embedded sheet of an Xcelsius dashboar d, w e have dat a

l ike :

Fi el d A Fi el d B Fi el d C Fi el d D

Xxx Tyu 100 98

Xxx Yyy 45 76

Xxx Dev 56 87

Yyy Wes 78 13

Yyy Ri d 200 106

Page 18: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 18/28

In t he dash board, we need a select or on Field A f or a char t

which wil l pl ot t he values of Field C and Field D against al l Field

B val ues against one Field A. How can we achieve t hat ?

This can be achieved using filtered rows. In the Selector Properties, select Insertion Type as filtered rowsand map the Labels by selecting all values of Field A(including the duplicates).

The labels will display unique values and when a particular value is selected, all rows corresponding to thevalue of Field A will be selected as output. The chart component needs to be mapped to the output thisselector.

Page 19: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 19/28

BO Linked UniverseLast Updated on Wednesday, 10 October 2012 05:26

Written by Saurav Mitra

Linked Universes are universes that share the same components such as parameters, classes, objects and joins. When universes are linked, one plays the role of derived while other the core universe.

Types of Universe

1. Core Universeß Universe to which other universes are linked.ß Represents a reusable library of components.ß Can be a kernel or master universe depending on the way the core universe components are

used in the derived universe.2. Derived universe

ß Contains a link to the core universe

Page 20: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 20/28

ß Link allows the universe to share the common components

Universe Approach

1. Kernel Universe Approachß If the linked universe is a kernel universe, then components can be added to the derived

universe.ß Any changes made to the kernel universe are automatically reflected in all the derived

universes

2. Master Universe Approachß If the linked universe is a master universe then the derived universe contains all the

components of the core universe.ß No new classes and objects are not added to the derived universe but are hidden according

to the user needs.ß The components visible in the universe are always a subset of the master universe.ß Any changes made to the kernel universe are automatically reflected in all the derived

universes

3. Component Universe Approach

Page 21: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 21/28

ß Merging two or more universe into one universe.

Below a new universe is made by merging universe 1 and universe 2.

Advantages of Linked Universe

ß Reduced development and maintenance time as any changes made to the core universe arepropagated to the derived universe.

ß Centralize often used components in core universe, and include them in all the new universes.ß Facilitate specialization by splitting the responsibility between database administrator for core

universe and specialized universe for more functional universe.

Points to remember-Linked Universe

ß Linked universes share the same data account.ß

Linked universe must be in the same repository.ß Core universe must be exported and re-imported at least once.ß You have the authorization of linking.ß Only one level linking is allowed.ß The two universe structures must allow joins to be created between a table in one universe to a

table in another universe to avoid Cartesian products.ß Contexts must be redetected.

Steps to create a Linked universe

We have two universe say Link_SMS and Link_Voice

ß Step 1: Link_SMS universe

Page 22: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 22/28

Page 23: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 23/28

ß Step 4: After Linking the Core universe components appear dimmed in the derived universe.

ß Step 5: Save the derived universe and export both the core and the derived universe to the samerepository.

Page 24: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 24/28

ß Conditional Column Hiding in BO 3.1 Webi Report

ß Last Updated on Wednesday, 17 October 2012 03:27ß Written by Riddhiman Basuß In several reporting scenarios, BO developers may require to hide columns in a block based on

specific conditions. This article will illustrate an example for doing this.ß We will be using the standard efashion universe. We have developed a report with Store Name,

Lines, Quantity Sold and Sales Revenue with a filter Lines=Accessories in Query panel. The reportwill look as below.

ß Click on the images below to magnify

ß

ß Now, I want that the Sales Revenue column will only be displayed, when the Lines is ‘Accessories’.For all other lines, this column will be hidden. To achieve this, the steps will be:

ß 1. Click on the Sales Revenue column and modify the formula for the column(=[Sales Revenue]initially) in the function panel as:

ß =I f ( [ Li nes] =”Accessori es”; [ Sal es Revenue]; hi de)

Page 25: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 25/28

ß

ß 2. Click on the header of the column and modify its formula as:ß =I f ( [ Li nes]="Accessori es"; NameOf ( [ Sal es Revenue]) ; "hi de")

ß

ß 3. Now create an alerter and put the condition as Cell Contents Equal to hide

ß

ß 4. Click on Format and set the font, background and the borders as colorless

Page 26: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 26/28

ß

ß 5. Now refresh the report and change the filter to anything other than Accessories (I have takenSweaters). The sales revenue column will no longer be visible

Page 27: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 27/28

ß

ß 6. Now again refresh the report and put the filter as Accessories, the column will become visibleagain

ß

ß The conditional hiding may be based upon various conditions (like Report Filter, Input Controlbased etc) where the formula for the column will change a bit. However the implementation of thealerter will remain the same.

Page 28: BO List of Values

8/12/2019 BO List of Values

http://slidepdf.com/reader/full/bo-list-of-values 28/28