Closed tiagoquaini closed 5 years ago
Hi, can you share the metadata xml file? Thanks!
Hi,
We are using the default change master service. I believe the metadata is the same as the one available on the API Business Hub: https://api.sap.com/api/API_CHANGEMASTER/overview
Thanks, Tiago
Can you provide us the response from your system for the following request (of course with any sensitive data removed!):
<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster$top=1
.
Especially relevant would be the format of the content of the ChangeNumberLastChgdDateTime
field, as it seems that your system returns a Calendar
while our VDM expects a Double
value.
Please see below the response from the request. Indeed the ChangeNumberLastChgdDateTime
is comming up as a date time rather than a double.
Is there any action or workaround that our team can use to overcome this?
Thanks!
{
"__metadata": {
"id": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')",
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')",
"type": "API_CHANGEMASTER.A_ChangeMasterType",
"etag": "W/\"datetimeoffset'1972-04-01T00%3A00%3A00.0000000Z'\""
},
"ChangeNumber": "555555",
"ChangeNumberStatus": "1",
"AuthorizationGroup": "",
"ChangeNumberFunction": "",
"IsTechnicallyReleased": "",
"ChangeNumberReleaseKey": "0",
"ReasonForChangeText": "",
"ChangeNumberDescription": "MOC APPLICATION TEST",
"ChangeNumberValidFromDate": "\/Date(1555977600000)\/",
"ChangeNumberCreationDate": "\/Date(1555977600000)\/",
"ChangeNumberCreatedByUser": "SCP_RFC",
"ChangeNumberLastChangedDate": null,
"ChangeNumberLastChangedByUser": "",
"IsUsedForDataDefinition": false,
"ChangeNumberIsMrkdForDeletion": false,
"ChangeNumberLastChgdDateTime": "\/Date(70934400000+0000)\/",
"to_AlternativeDate": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_AlternativeDate"
}
},
"to_ChangeMstrObjectMgmtRecord": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_ChangeMstrObjectMgmtRecord"
}
},
"to_ChangeMstrObMgReDocInfoRecd": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_ChangeMstrObMgReDocInfoRecd"
}
},
"to_ChangeMstrObMgReMaterial": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_ChangeMstrObMgReMaterial"
}
},
"to_ChangeMstrObMgReMatlBOM": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_ChangeMstrObMgReMatlBOM"
}
},
"to_Characteristics": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_Characteristics"
}
},
"to_Classification": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_Classification"
}
},
"to_ObjTypeAssignment": {
"__deferred": {
"uri": "<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/A_ChangeMaster('555555')/to_ObjTypeAssignment"
}
}
}
Okay, just to verify where this behavior comes from: Can you tell me what the Type
property in the ChangeNumberLastChgdDateTime
field of the metadata of your specific system file specifies? You can get this via
<host>/sap/opu/odata/sap/API_CHANGEMASTER;v=0002/$metadata
The type is Edm.DateTimeOffset
:
<Property sap:label="Time Stamp" Name="ChangeNumberLastChgdDateTime" Type="Edm.DateTimeOffset" sap:quickinfo="UTC Time Stamp in Long Form (YYYYMMDDhhmmssmmmuuun)" Precision="7" ConcurrencyMode="Fixed" />
Okay, as a workaround this blog post will help you generate your own VDM based on the $metadata
you retrieved from your system (which apparently is not the same as published on the API Business Hub).
To understand the actual problem a bit further: What kind if System do you call? Cloud or On-Premise? And which version?
Thanks Christoph! Our S4 is On-Premise and is on 1809 FPS1 version.
Okay, I will try to dig deeper into this issue and will come back to you once I have more information.
In the meantime I hope you can continue working with the workaround mentioned above!
Yes, the workaround enabled us to continue our development. Thanks!
This has been fixed with the latest release of S/4HANA Cloud
Hello colleagues,
I am working with the Change Master API and we are having some issues regarding class cast exceptions. The exception stack trace is below:
This happens whenever a GET is executing and all properties of the change master are selected. Also, when we create a new change master, the same error occurs.
We are using
scp-neo
SDK in version2.14.0
.Could you please assist us on this issue?
Thanks, Tiago