cancel
Showing results for 
Search instead for 
Did you mean: 

Can not create boolean Calculated Column

Verakso
Participant
0 Kudos

I wonder if I either do something wrong, or perhaps it is just not supported.

I am just trying to make this simple Calculated Column in my Calculation View

It doesn't matter if the formula is


if("TotalVltdStockQuantity">0,1,0)

or


if("TotalVltdStockQuantity">0,'true','false')

both is returning this, when I click »Validate Syntax«

But when I click »OK« on the Calculated Column, the window closes, but the Calculated Column is not created - why?

Accepted Solutions (1)

Accepted Solutions (1)

Verakso
Participant
0 Kudos

Finally and update!

After have raised this issue with SAP, it has finally been resolved in HANA SP11.

So, in SP11 it is possible to use the Boolean datatype.

And it works !

Took some time, but worth the wait

Answers (3)

Answers (3)

0 Kudos

Hi

According to SAP Help Portal it is not stated that boolean is not supported

https://help.sap.com/saphelp_hanaplatform/helpdata/en/20/a1569875191014b507cf392724b7eb/content.htm

If you search boolean there you should fine the information. Is this different from what you are asking here?

Cheers

Kingsley

Verakso
Participant
0 Kudos

Yes!

Because if you try to use Boolean in the SAP HANA Studio as I initially described, the Boolean is not supported, even though the link to the SAP Help Portal indicates that is should be possible,

Therefore the I raised this an error, with steps to reproduce the problem.

Verakso
Participant
0 Kudos

As found out, then it seems that Boolean is not a sported data type in HANA (at least not in Calculated Columns on a Calculation View).

This becomes very clear, if you use the Web IDE instead of the HANA Studio.

So if not supported, the options should not be available in HANA studio either

Regards
/Thomas

lucas_oliveira
Advisor
Advisor
0 Kudos

Hi Thomas,

Same happening to me (SP10 system and studio).

Studio is dumping a null pointer exception stack trace when I try to do that:


java.lang.NullPointerException: while trying to invoke the method com.sap.ndb.studio.model.data.type.PrimitiveType.getName() of a null object returned from com.sap.ndb.studio.model.data.type.PrimitiveType.get(java.lang.String)

  at com.sap.ndb.studio.view.ui.nodes.actions.CreateCalculatedColumn$1.doExecute(CreateCalculatedColumn.java:107)

  at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)

...

So this seems to be a HANA Studio bug. Could you please open an SAP incident for that (component HAN-STD-DEV)?

(Edit: Btw, I tried that from HANA Studio 2.1.11 - latest one available. )

Edit 2: My bad, for 2.1.11 you get the calculated column created but still the model gets inconsistent.


Invalid attribute value 'BOOLEAN' for attribute 'datatype'(scenario -> cubeSchema -> calculationScenario (modelingtests/CV_BOOLEANTEST) -> calculationViews -> projection (Projection_2) -> viewAttributes -> calculatedViewAttribute (ISBOOL) -> datatype (CLASSTYPEIP))

The following errors occurred: The scenario XML is not valid (2112)

Details (Errors):

- scenario -> cubeSchema -> calculationScenario (modelingtests/CV_BOOLEANTEST) -> calculationViews -> projection (Projection_2) -> viewAttributes -> calculatedViewAttribute (ISBOOL) -> datatype (CLASSTYPEIP): Invalid attribute value 'BOOLEAN' for attribute 'datatype'.


Thanks,

Lucas de Oliveira

Verakso
Participant
0 Kudos

Hi Lucas

Thanks for your effort, and I forgot to mention that my version of HANA studio is 2.1.6, but the issue is still the same,

I would happily open a SAP incident on this, unfortunately I am currently a bit stuck, since I can't find a HANA in the list of systems I am allowed to report on

Regards
/Thomas