cancel
Showing results for 
Search instead for 
Did you mean: 

XSODATA Use generated key in service url call

former_member289890
Participant
0 Kudos
792

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

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

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

Regards,
Florian