I get an error trying to use a layered CDS definition in a UDF (message below).
My type declaration in the hdbdd-file looks something like this:
...
type Base {
MANDT : String(3);
KOKRS : String(4);
};
type Xtra {
BUKRS : String(4);
SEGMENT : String(10);
};
type Useful {
BaseFields : Base;
XtraFields : Xtra;
};
The function like this:
FUNCTION mySchema"."myPack::myFunction"
RETURNS "mySchema"."myPack::myDef.Useful"
...
RETURN SELECT MANDT, KOKRS, BUKRS, SEGMENT from ...
The error message is: "Could not create catalog object: return type mismatch; Attribute name "Useful.MANDT" different from Attribute name: "MANDT" ....
Obviously this works:
type Useful {
MANDT : String(3);
KOKRS : String(4);
BUKRS : String(4);
SEGMENT : String(10);
};
Is it not possible to use this type of layered declarations?