Skip to Content
0

Column Store Error - Nested Ifs in calculated column

Oct 14, 2016 at 07:13 PM

91

avatar image

Hi,

Please help me on how to handle Column Store error in the use nested-ifs in calculated column - SAP HANA SPS11. I have two set of different conditions based on the POI being less than a year or more than year to set a flag-column. It throws me an error either on 'right parenthesis needed' or 'column store error'. Giving me real hard time, please help and suggest some alternative solutions too...

Calculated column Expression:

IF(INT("POI") >= 365 AND DATE("ITMTO")<= DATE(NOW()) AND (STRING("CLAIMFLAG_FOR_LAPSEDPOLICIES")!='Y'OR STRING( "_BIC_YCBOSTAT") = '001' OR STRING( "_BIC_YCBOSTAT") = '001') AND INT("CLAIM_COUNT_INT")=0,'NCBNEW_FLAG',

(

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")=1),'NCDA1N_FLAG',

IF((INT"CLAIMCOUNT_NCB_ALLOWED_NO_NCD")= 1 ),'NCDA2N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")=1),'NCDP1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")>1),'NCDA2N_FLAG','NCDP3N_FLAG')

)

)

)

)

)

,( IF(INT("POI") < 365 AND DATE("ITMTO")<= DATE(NOW()) AND (STRING( "_BIC_YCBOSTAT") = '001' OR STRING( "_BIC_YCBOSTAT") = '002') AND (INT("CLAIM_COUNT_INT")=0 AND STRING("_BIC_YCNCDRET")='Y'),'SAMEEXISTING_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")=1),'NCDA1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_NO_NCD")= 1 ),'NCDA2N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")=1),'NCDP1N_FLAG',

IF((INT("CLAIMCOUNT_NCB_ALLOWED_YES_NCD")>1),'NCDA2N_FLAG','NCDP3N_FLAG')

)))

)

)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Marc Bernard
Oct 20, 2016 at 06:14 PM
0

Hi Mathura,

I don't see any issues with the IF. Try to split it into smaller parts (first not nested) that you can test individually.

Best,

Marc

Product Management SAP HANA DW

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes, Marc. I did that. No errors now. Expression is valid, but stil getting run-time error.

Is it advisable to create scripted calculation view in this case as the logic is complex? Please advice

0
Marc Bernard
Oct 24, 2016 at 06:21 PM
0

If the expression if valid, then it should work. Please create an incident report so SAP support can analyze the issue (see http://support.sap.com/incident).

Regards,
Marc
Product Management SAP HANA DW

Share
10 |10000 characters needed characters left characters exceeded