cancel
Showing results for 
Search instead for 
Did you mean: 

Error occured when using default modifier in CDS

Former Member
0 Kudos

Dear Experts,

when I created a simple CDS document with default modifier  in HANA SP6, I always got failure.

The error message say "Unexpected token"default" at line x,column x".

My CDS document is below.


namespace Hello_XS.db;

@Schema: 'DEMO'

context modifiers {

    entity table1

    {

        key field1 : String(10);

        field2 : String(10) default "dummy";

    };

};

when I activated,I got the below error.

would you please kindly let me know how to solve it? thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry, there is a bug in the developer guide on page 183, it says to use " and you need to use '. Hopefully or Former Member will get it fixed.

The code below activates successfully.

John

context test2 {

    entity table1 

    { 

        key field1 : String(10); 

        field2 : String(10) default 'dummy';

    }; 

};

Former Member
0 Kudos

Hi John,

Thanks a lot for your solution, it works for me.

Answers (0)