Editing Objects Properties

Objective

After completing this lesson, you will be able to Editing objects properties.

Qualification, Data Type, Aggregation

For Excel, Text and Free-Hand SQL data sources, you previously changed your object properties in the Query Panel. As this Query Panel was replaced to make it unique for all data sources, you now change these properties after having run your query.

Changing the properties in this way has also been extended to other data sources. The precise properties that can be changed depend on the data source and are listed in the following table:

Once the query has been run, select an object in the Main Side PanelObjects tab. The properties of object are displayed in the Build Side PanelObject Properties tab. You can modify these properties and click Apply to validate your changes. The Objects tab is updated to reflect these changes.

Changing the qualification, the type, or the aggregation of an object coming from an Excel, Text and Free-Hand SQL data sources purges the corresponding query.

You can also modify some properties of an object coming from Universes, Web Intelligence Documents, SAP HANA, SAP BW or OData locally, i.e., without having to do it in the data source.

To distinguish local change you made from the semantic defined by the data source, an icon is displayed beside the object to highlight that it has been modified compared to its data source. Hover the mouse over the object to show its previous and new values. Unselect the Display Info icon checkbox in the View Modes and Settings menu to hide this icon. In the Object Properties tab, the Reset button is available beside each changed property. Click it to restore the previous values or click the Revert button on the bottom of the tab to reset them all. In both cases, click Apply to validate your changes.

The context of such changes is the data source: all queries based on this data source benefit from them.

Display Format

You can define a display format for numeric or date/time values directly on the object rather than defining it for each table or chart in which it is used.

In Design mode, select an object in the Main Side PanelObjects tab. In the Build Side PanelObject Properties tab, click the Edit Format link to open the Display Format dialog box. Assign a format to this object and click OK.

A preview sample using this format is displayed in the Build Side PanelObject Properties tab. To harmonize the user interface, the same Edit Format link that opens the Display Format dialog box is also used when defining a formatting rule.

The format defined at object level is not only used for tables and charts, but also for input controls that use this object.

The display format applying in order of priority to a value is the one defined in:

  • 1. A formatting rule, if any.
  • 2. A table or a chart, if any.
  • 3. An object, if any.
  • 4. A universe, if any, in case the object is defined in a universe.

Display Format Dialog Box

The Display Format dialog box has been overhauled to better manage custom and assigned formats.

To create a custom format, select an existing (predefined or custom) format, and click Add Custom Format. The selected format is used as a model for the new custom format. In the New Custom Format dialog box, select the data type in the Type drop-down menu. Depending on your selection, you may enter the tokens that define values for:

  • Positive, negative, null, or undefined values, if the selected data type is Number.
  • Positive or undefined values, if the selected data type is Date/Time.
  • True, false, or undefined values if the selected data type is Boolean.

It is not yet possible to edit a custom format, but you can:

  • Hover the mouse over a custom format to display its definition in a tooltip.
  • Explicitly unassign a format from the selected formatting rule, table, chart, or object by selecting the No Format is Explicitly Assigned radio button.
  • Delete custom formats that are no longer used by clicking the Delete button beside a custom format in the Custom category. If this button is not displayed, the custom format is still used in the document and cannot be deleted.

New Numeric Display Formats

You can use the following new tokens to create custom formats for numeric values:

Format TokenDescription
COMPACT

To shorten numbers by keeping significant figures and using an abbreviated, locale-specific suffix: K for 1000, M for 1,000,000….

LONG_COMPACT

To shorten numbers by keeping significant figures and using a locale-specific suffix displayed in full name.

CURRENCY

To display the value as a currency and apply the locale’s rules for monetary values.

ACCOUNTING_CURRENCY

To display the value as a currency and apply the locale’s rules for accounting values.

CURRENCY_COMPACT

To display the value as a currency with an abbreviated metric suffix.

[MIN_DEC:n]

Used with COMPACT, LONG_COMPACT and CURRENCY_COMPACT to define the minimal number of decimals to display. It is equal to 0 by default.

[MAX_DEC:n]

Used with COMPACT, LONG_COMPACT and CURRENCY_COMPACT to define the maximum number of decimals to display. It is equal to MIN_DEC by default.

[CURRENCY:c]

Used with CURRENCY, ACCOUNTING_CURRENCY and CURRENCY_COMPACT to define the monetary symbol to display. It is ¤ by default.

The returned values depend on the user’s preferred viewing locale and follow the Unicode standards of this locale (suffix rules and translations, accounting rules…) The currency symbol cannot depend on this locale without leading to changes in values. It must therefore be explicitly set through [CURRENCY:c].

For example, the value -12,345 is displayed:

Custom FormatEnglishFrench
COMPACT-12K-12 k
COMPACT[MIN_DEC:2]-12.35K-12,35 k
COMPACT[MAX_DEC:5]-12.345K-12,345 k
LONG_COMPACT[MIN_DEC:2]-12.35 thousand-12,35 mille
CURRENCY-¤12,345.00-12 345,00 ¤
CURRENCY[CURRENCY:€]-€12,345.00-12 345,00 €
ACCOUNTING_CURRENCY[CURRENCY:€](€12,345.00)(12 345,00 €)
CURRENCY_COMPACT[CURRENCY:€]¤-12K-12 k €
CURRENCY_COMPACT[CURRENCY:€]¤-12K-12 k €

These formats can also be used in the Formula Language through the FormatNumber function that formats numeric values. For example: FormatNumber([Margin]; "COMPACT[MIN_DEC:2][MAX_DEC:4]").

Time Zone Conversion

By default, Web Intelligence considers a date/time in the UTC time zone. When creating custom formats for date/time values, you can use a new token, [TIMEZONE:t] in which t corresponds to a time zone name. The date/time is converted and displayed into this specified time zone. More than 500 time zones are supported, and their list is available in the Custom Formats | SAP Help Portal.

For example:

  • HH:mm:ss[TIMEZONE:Etc/GMT+11]
  • DATETIME[TIMEZONE:Europe/Paris]

This new token can also be used for more advanced time zone conversion via two Formula Language functions: FormatDate and ToDate.

If the data type of your date/time value is string, you first need to parse it with ToDate by specifying its time zone and getting this date/time in UTC. Once you have a date/time in UTC, use FormatDate and specify the target time zone to convert the date/time in this time zone.

For example, to convert data/time values in the Europe/Paris time zone returned by the object [MyTime] whose data type is string into US/Pacific time zone, you may use the following steps:

  • date [TimeParis] =ToDate([MyTime];"dd/MM/yyyy hh:mm:ss[TIMEZONE:Europe/Paris]")
  • string [TimePac] =FormatDate([TimeParis];"dd/MM/yyyy hh:mm:ss[TIMEZONE:US/Pacific]")

If the data type of your value is date, Web Intelligence considers its time zone as UTC. You need to turn it into a string to parse it with the correct time zone and get the real date/time in UTC. Once the date/time is in UTC, you can use FormatDate to transform it in the target time zone as previously described.

Watch this video to learn how to edit an object's properties:

Log in to track your progress & complete quizzes