Skip to Content
0
Oct 30, 2018 at 04:20 PM

xsodata nullable date issue while access record

211 Views Last edit Oct 31, 2018 at 08:42 AM 3 rev

I am consuming calculation view and creating xsodata , that xsodata is implemented in on-premise gateway system using below solution

http://www.saplearners.com/how-to-consume-hana-xs-odata-service-using-sap-netweaver-gateway/

all other entity I am able to access and working fine but when I am access entity which is type date in hana and have value null then in that case I am getting error that particular attribute have the wrong value , this issue come because of nullable property , we need to set it as nullable true, in normal segw we can do it but in xsodata I am not aware of how to set this property of particular attribute

<Property Name="myname" Type="Edm.DateTime" Nullable="false" Precision="7" />

also I have searched other sap blog and found below code

service {

"_SYS_BIC"."calculation view1"

as"entity1"

with ( "att1")

key ("att1");

"_SYS_BIC"."calculation view2"

as" entity2"

key ("att2");

}

settings {

support null;

metadatacache-control"no-store";

contentcache-control"max-age=3600,must-revalidate";

}

but this is also not working can any body please tell me how to get null value from xsodata service special for datetime field

we have similer question below

https://answers.sap.com/questions/223959/how-to-set-nullable-true-in-xsodata-metadata-for-a.html

Thanks,

Jay