on ‎2018 Sep 03 5:24 PM
Dear All,
I have a requirement to fetch DocumentOutputRequest from Sales Quote , this is nothing but the Output Tab from SalesQuote which has the details of the Sent Quote.
Now We need to create or use a oData service so that our DataWarehose can access that data.
So first of all, there is no standard oData Service for this ( Which is surprizing ), Secondly the object is available when you dont create "Data Workbench Enabled" Odata service.. X(
So then I started creating custom ODataService for this,
I did following.
1. Selected Root so that I Can pass ID
Like : https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection?$filter= ID eq '1885'&$format=json
So I get below response
{
"d": {
"results": [
{
"__metadata": {
"uri": "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')",
"type": "cust.CustomerQuote",
"etag": "W/\"datetimeoffset'2018-09-03T11%3A12%3A27.6887360Z'\""
},
"ObjectID": "00163E6DB29B1ED8AB8AAF91D03B532A",
"ETag": "/Date(1535973147688)/",
"ID": "1885",
"UUID": "00163E6D-B29B-1ED8-AB8A-AF91D03B532A",
"DocumentOutputRequestDocumentOutputRequest": {
"__deferred": {
"uri": "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/DocumentOutputRequestDocumentOutputRequest"
}
}
}
]
}
}
<br>
As you can see i recived the URI : https://myXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/DocumentOutputRequestDocumentOutputRequest
So I jumped with a joy which was short lived.
So I opened nother window of Postman(tool i use to test odata)
https://myXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/DocumentOutputRequestDocumentOutputRequest?$format=json
and again jumped with Joy by seeing below response
{
"d": {
"results": {
"__metadata": {
"uri": "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/DocumentOutputRequestDocumentOutputRequestCollection('00163E6DB29B1ED8AB8AE08A3921F4B4')",
"type": "cust.DocumentOutputRequestDocumentOutputRequest"
},
"ObjectID": "00163E6DB29B1ED8AB8AE08A3921F4B4",
"ReferenceObjectNodeID": "00163E6DB29B1ED8AB8AAF91D03B532A",
"ReferenceObjectNodeTypeCode": "3807",
"ReferenceObjectTypeCode": "30",
"UUID": "00163E6D-B29B-1ED8-AB8A-E08A3921F4B4",
"DocumentOutputRequestItem": {
"__deferred": {
"uri": "https://myXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/DocumentOutputRequestDocumentOutputRequestCollection('00163E6DB29B1ED8AB8AE08A3921F4B4')/DocumentOutputRequestItem"
}
}
}
}
}<br>
So now the moment of truth I reached the DocumentOutputRequestItem which is what was required.
But now it gave me errorwith the URI which it gave me to fetch DocumentOutputRequestItem .
So I used URI https://myXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/DocumentOutputRequestDocumentOutputRequestCollection('00163E6DB29B1ED8AB8AE08A3921F4B4')/DocumentOutputRequestItem
And Response :
<?xml version="1.0" encoding="utf-8"?> <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <code/> <message xml:lang="de">Geschäftsobjektattribut für Eigensch. ETag nicht gefunden; Dienst anpassen.</message> </error>
Something Etag issue , and no clue what went wrong.
Has anyone encountered this kind of issue with C4C OData?
Kindly help.
Regards, Dhruvin
Request clarification before answering.
Recived answer and correction from SAP in incident.
Whenever any oData service custom / standard is missing Etag , we have raise incident and they can add the same in backend.
Regards,
Dhruvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dhruvin,
We see you have created a Custom OData service to achieve your requirement.
ETag is basically a property for date/time. This cant be created of updated
<PropertyName="ETag"Type="Edm.DateTimeOffset"sap:creatable="false"sap:updatable="false"sap:filterable="true"
Please check if you can add it your custom OData service. If not then you can report an incident to us and then we can check the custom service created by you
Regards,
Anurag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anurag,
Thanks a lot for your inputs , I already created incident 3101113746.
And Please check if you can add it your custom OData service. If not then you can report an incident to us and then we can check the custom service created by you
It is already there! thats what i checked , but the it still gives me error message.
Hi Anurag,
Today i thought let me recheck it the issue of Eatg!
and i guess i know the root cause.
So https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection?$filter= ID eq '1885'&$format=json
This recieves a response with a Eag,
{
"d": {
"results": [
{
"__metadata": {
"uri": "XXXX",
"type": "cust.CustomerQuote",
"etag": "W/\"datetimeoffset'2018-09-03T11%3A12%3A27.6887360Z'\""
},
"ObjectID": "00163E6DB29B1ED8AB8AAF91D03B532A",
"ETag": "/Date(1535973147688)/",
"ID": "1885",
"UUID": "00163E6D-B29B-1ED8-AB8A-AF91D03B532A",
"DocumentOutputRequestDocumentOutputRequest": {
"__deferred": {
"uri": "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/DocumentOutputRequestDocumentOutputRequest"
}
}
}
]
}
}
So my first service has the Etag good hence the concurrent request is working.
but
https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/CustomerQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/DocumentOutputRequestDocumentOutputRequest
Doesnt yield any Etag see below!,
{
"d": {
"results": {
"__metadata": {
"uri": "XXXX"
},
"ObjectID": "00163E6DB29B1ED8AB8AE08A3921F4B4",
"ReferenceObjectNodeID": "00163E6DB29B1ED8AB8AAF91D03B532A",
"ReferenceObjectNodeTypeCode": "3807",
"ReferenceObjectTypeCode": "30",
"UUID": "00163E6D-B29B-1ED8-AB8A-E08A3921F4B4",
"DocumentOutputRequestItem": {
"__deferred": {
"uri": "https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/cust/v1/testop/DocumentOutputRequestDocumentOutputRequestCollection('00163E6DB29B1ED8AB8AE08A3921F4B4')/DocumentOutputRequestItem"
}
}
}
}
}
and I think this is the rootcause.
Funny thing is i am also not able to add Etag on my own,
See below.


anant.acharya : Is there any 1 from OData - Rest framework whom i can tag?
Thanks a lot 🙂 as alway!
Regards, Dhruvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Dhruvin,
I have forward this question to concerned team, waiting for reply.
Regards
Anant
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.