Search code examples
reportingbusiness-objectswebi

SAP Universe design tool - how to create a dimension with fixed value in each class of a universe


I have several class in my universe containing objects (dimensions, measures) pointing on fields of a database table.

For instance the objects of the class "Grant" pointing on the table "Grant_T" and the objects of the class "Procurement" pointing on the table "Procurement_T".

I would like to create a dimension "Type" containing a fixed value in each class. For the class "Grant" it should be "Grant" and for the class "Procurement", it should be "Procurement".

I need this field for my different reports because when I do an UNION (query panel in Web Intelligence) on the different classes, I need to differentiate the results . I don't know how to create a dimension with a fixed value (not pointing to a database table field).

When I tried this formula

="Grant" 

enter image description here

It's not working. The same with:

='Grant'

Apparently, the system needs to point on a field of the database table. But there is no field there allowing me to differentiate the type of the class.

Is it possible to do that? Could you please help me to find a solution?

Thanks for your help.


Solution

  • Assuming you're using a database with standard SQL, the object's definition can simply be:

    'Grant'
    

    This will work in a WebI report, although it will generate a parse error in UDT ("Object not associated with a table", or something like that). The error can be ignored, but if you want to be able to parse successfully, click the "Tables" button and select the Grant_T table.

    You don't need an equals sign in universe object definitions, only for WebI formulas.