2024 Jul 12 10:37 AM - edited 2024 Jul 12 10:41 AM
Hello experts,
has anyone in this community ever implemented this API? I kindly ask for your assistance. I'm facing an error when posting a request to create a class header, however I'm able to perform a get entity set to read the existing class headers.
API: https://api.sap.com/api/OP_API_CLFN_CLASS_SRV/overview
I'm currently using a S4HANA on premise 2022 FPS01. I already tried the same API in a more recent system but unfortunately, I got the same error message.
URL Request:
(...)sap/opu/odata/SAP/API_CLFN_CLASS_SRV/A_ClfnClassForKeyDate
HTTP Method:
Post
JSON:
{
"ClassType": "300",
"Class": "API_test1",
"ClassStatus": "1",
"ClassGroup": "",
"ClassSearchAuthGrp": "",
"ClassClassfctnAuthGrp": "",
"ClassMaintAuthGrp": "",
"DocNumber": "",
"DocumentType": "",
"DocumentPart": "",
"DocumentVersion": "",
"SameClassfctnReaction": "X",
"ClassStandardOrgName": "",
"ClassStandardNumber": "",
"ClassStandardStartDate": null,
"ClassStandardVersionStartDate": null,
"ClassStandardVersion": "0",
"ClassStandardCharcTable": "",
"ClassIsLocal": true,
"to_ClassCharacteristic": [
{}
],
"to_ClassDescription": [
{
"Language": "EN",
"ClassDescription": "API_test1",
"to_Class": {}
}
],
"to_ClassKeyword": [
{}
],
"to_ClassText": [
{}
]
}
Status:
405 Method Not Allowed
Error details:
"errordetails": [
{
"ContentID": "",
"code": "CX_SADL_ENTITY_CUD_DISABLED",
"message": "Creating operations are disabled for association '_CLASS', source entity 'API_CLFN_CLASS~A_CLFNCLASSDESCFORKEYDATE'",
"propertyref": "",
"severity": "error",
"transition": false,
"target": ""
},
{
"ContentID": "", "code": "/IWBEP/CX_MGW_BUSI_EXCEPTION", "message": "An exception was raised",
"propertyref": "",
"severity": "error",
"transition": false,
"target": ""
}
]
Thank you,
Best Regards
Request clarification before answering.
Try removing the "to_class": {} association that it is complaining about in, and probably best to remove the other associations with no data.
"to_ClassDescription": [
{
"Language": "EN",
"ClassDescription": "API_test1",
"to_Class": {}
}
],
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.