28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

a. To map the source to the target column, select the required source from the dropdown list.<br />

b. To assign a default value to the constant column, enter the value in the Constant Value field. For more<br />

information, see Constant Column [page 123].<br />

c. Select the required data type.<br />

d. Enter the length and scale as required.<br />

e. Choose OK.<br />

Constant Column<br />

In a union view, a Constant Column is created if there are any target or output attributes for which there are no<br />

mappings to the source attributes. The default value for the constant column is NULL.<br />

Note: The target attribute is mapped to all the sources.<br />

For example, you have two tables with similar structures, Actual Sales and Planned Sales, corresponding to the<br />

sales of products. You want to see the combined data in a single view, but differentiate between the data from the<br />

two tables for comparison. To do so, you can create a union view between the two tables and have a constant<br />

column indicating constant values like A & P, as shown below:<br />

Actual Sales<br />

Sales Product<br />

5000 A1<br />

2000 B1<br />

Planned Sales<br />

Sales Product<br />

3000 A1<br />

6000 B1<br />

The result of this query can be as follows:<br />

Actual Planned Indicator Sales Product<br />

A 5000 A1<br />

P 3000 A1<br />

A 2000 B1<br />

P 6000 B1<br />

6.2.8 Assigning Variables<br />

You use this procedure to assign variables to a filter at design time for obtaining data based on the values you<br />

provide for the variable. At runtime, you can provide different values to the variable to view the corresponding set<br />

of attribute data. You provide values to the variables either by entering the values manually, or by selecting them<br />

from the Value Help dialog.<br />

Note: You can apply variables to attributes of analytic and calculation views.<br />

The following types of variables are supported:<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Analytic Model<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 123

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!