相关文章推荐
想出国的豆腐  ·  Storage Migration ...·  1 年前    · 
旅行中的砖头  ·  jQuery ...·  1 年前    · 

Hello Experts,

we have a problem while using a Edm.DateTime as key in URI while sending GetEntity request to the GW Server.

We've defined a Edm.DateTime field in the Service builder as a key for an entity. While calling GetEntitySet operation, we can get the data correctly. The GW server generates also URI for it.

- <entry>

<id> http://myserver:8000/sap/opu/odata/CONET/IMMOBILIENVERTRAG_SRV/RealEstateContractConditionSet(CONDITION_TYPE='0010',VALID_FROM=datetime'2012-01-01T00%3A00%3A00',IDENT_KEY='1000%2F1000000',OBJECT_TYPE='IS ')</id>

<title type="text">RealEstateContractConditionSet(CONDITION_TYPE='0010',VALID_FROM=datetime'2012-01-01T00%3A00%3A00',IDENT_KEY='1000%2F1000000',OBJECT_TYPE='IS')</title>

<updated>2014-09-12T11:21:43Z</updated>

<category term="IMMOBILIENVERTRAG_SRV.RealEstateContractCondition" scheme=" http://schemas.microsoft.com/ado/2007/08/dataservices/scheme " />

<link href="RealEstateContractConditionSet(CONDITION_TYPE='0010',VALID_FROM=datetime'2012-01-01T00%3A00%3A00',IDENT_KEY='1000%2F1000000',OBJECT_TYPE='IS')" rel="self" title="RealEstateContractCondition" />

- <content type="application/xml">

- <m:properties xmlns:m=" http://schemas.microsoft.com/ado/2007/08/dataservices/metadata " xmlns:d=" http://schemas.microsoft.com/ado/2007/08/dataservices ">

<d:CONDITION_TYPE>0010</d:CONDITION_TYPE>

<d:EXTERNAL_PURPOSE>A</d:EXTERNAL_PURPOSE>

<d:CALC_RULE>D</d:CALC_RULE>

<d:UNIT_PRICE>6</d:UNIT_PRICE>

<d:VALID_FROM>2012-01-01T00:00:00</d:VALID_FROM>

<d:VALID_TO>9999-12-31T00:00:00</d:VALID_TO>

<d:IDENT_KEY>1000/1000000</d:IDENT_KEY>

<d:Status />

<d:XCONDTYPEM>Basic rent</d:XCONDTYPEM>

<d:XMCONDPURPOSEEXT>Actual Rent</d:XMCONDPURPOSEEXT>

<d:XMCALCRULE>Object Measurement</d:XMCALCRULE>

<d:OBJECT_TYPE>IS</d:OBJECT_TYPE>

</m:properties>

</content>

</entry>

- <entry>

The problem is, when we use this URL http://myserver:8000/sap/opu/odata/CONET/IMMOBILIENVERTRAG_SRV/RealEstateContractConditionSet(CONDITION_TYPE='0010',VALID_FROM=datetime'2012-01-01T00%3A00%3A00',IDENT_KEY='1000%2F1000000',OBJECT_TYPE='IS ')

in the GW client, we got always a error:

Invalid format (return structure): Property Name 'VALID_FROM', Property Value '00000000'.

Meanwhile, in another project, we use an Edm.DateTime field as a filter parameter to select a range of values. It works very well.Here is the URL:

/sap/opu/odata/CONET/IMMOBILIENGEBUILDING_SRV/RealEstateBuildingSet?$filter=Responsible eq 'Kugelberg' and Stichtag eq datetime'2013-01-01T00:00:00'

We are really confused with the behavior of the GW runtime.

BTW: in the error log, we found out that the error occurs in the /IWCOR/CL_DS_EP_WRITER_XML Class, method: WRITE_ENTITY_PROPERTIES, row: 55.

Appreciate a lot for any tips in advance.

best regards

Xiang

Attachments
gw_error.png (97.3 kB)