Skip to Content
0

XSODATA Use generated key in service url call

Dec 09, 2017 at 03:45 PM

75

avatar image

Experts,

Created XS odata with following service

service {
"PROJ.model::CV_PROJDETAIL" as "CV_ProjectDetail" keys generate local "GENERATED_ID" aggregates always;
} annotations { enable OData4SAP; }

And result of uri call in my application got CORRECT results as follows

{"d":{"results":[{"__metadata": {"type":"odata.CV_ProjectDetailType","uri":"/odata/odata.xsodata/CV_ProjectDetail('543859892167869371')"},"C_NAME":"SAP","CR_NUMBER":7},
]}}

But if I try to call GET /odata/odata.xsodata/CV_ProjectDetail('543859892167869371')

I got a "RESOURCE NOT FOUND" error.

Any correction that I can do to make a successful call using the generated id ?

Thanks,

Tanveer

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

1 Answer

Florian Pfeffer
Dec 11, 2017 at 10:15 AM
0

The reason for that can be found in the documentation and was recently also discussed here.

Regards,
Florian

Share
10 |10000 characters needed characters left characters exceeded