on 11-09-2022 2:57 AM
Hi,
I am trying to use S4 cloud APIs to create header and item, but I get an error "{"code":"PP_ODATA_API_WKC/016","message":"The combination of changes is not allowed in a change set".
The APIs I am using are
to create an interval -- /A_WorkCenterCapacityInterval_2
to create a shift in interval - /A_WorkCenterCapacityInterval_2(CapacityInternalID='{CapacityInternalID}',CapacityActiveVersion='{CapacityActiveVersion}',IntervalEndDate=datetime'{IntervalEndDate}')/to_CapacityShift
I also tried to pass shift detail in API /A_WorkCenterCapacityInterval_2 (structure below) instead of calling API for "to_CapacityShift" but I get the same error.
Any help will be appreciated.
Regards,
Hi deepaks13
I think a ticket needs to be opened so the issue can be checked directly
Please check the KBA https://launchpad.support.sap.com/#/notes/1296527 about how to do this.
Please include in the ticket the complete payload and steps to reproduce the error
Please use the Component area PP-BD-WKC as the API belongs to his .
Thank you
Enda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks jfromanato001
I had raised a ticket with SAP and was waiting for the response. As per SAP, this is a limitation with Work Center API odata v2 and they have suggested to use Odata v4.
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi deepaks13
Are you using S/4HANA Cloud or S/4HANA ?
Without the full payload for the API its not clear why the message 'The combination of changes is not allowed in a change set' is raised
The documentation for the API API_WORK_CENTER ( S/4HANA Cloud ) is available at the links below
https://api.sap.com/api/WORKCENTER_0001/overview
Please check it , and the sample payloads it provides . ( for example Deep Create of Work Center Header )
Best Regards
Enda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Enda, thanks for your response.
As per the sap help documentation, deep create is not available in newer version of Work center capacity interval API. However, the request payload in API hub has the shift details in capacity interval API and I followed that which gave me the error. Below is my payload details.
var interval = {
"CapacityInternalID": "10000006",
"CapacityActiveVersion": "1",
"IntervalEndDate": "/Date(1667779200000)/",
"IntervalStartDate": "/Date(1667779200000)/",
"CapacityNumberOfShifts": "1",
"to_CapacityShift": {
"results": [{
"CapacityInternalID": "10000006",
"CapacityActiveVersion": "1",
"IntervalEndDate": "/Date(1667779200000)/",
"WeekDay": "1",
"AvailableCapacityShift": "1",
"IntervalStartDate": "/Date(1667779200000)/",
"ShiftStartTime": "PT06H00M00S",
"ShiftEndTime": "PT18H00M00S",
"ShiftDefValidityStartDate":"/Date(1667779200000)/",
"ShiftDefValidityEndDate": "/Date(1667779200000)/",
"CapacityNumberOfCapacities": 4,
"CapacityBreakDuration": 1800
}]
}};
Regards,
Deepak
I just tried with older version of API as well but that also gives the same error. -
Payload is
var interval1 = {
"WorkCenterInternalID": "10000006",
"WorkCenterTypeCode": "A",
"CapacityCategoryAllocation": "512",
"CapacityInternalID": "10000006",
"CapacityActiveVersion": "0",
"IntervalEndDate": "/Date(1667779200000)/",
"IntervalStartDate": "/Date(1667779200000)/",
"to_WorkCenterShift": {
"results": [{
"WorkCenterInternalID": "10000006",
"WorkCenterTypeCode": "A",
"CapacityCategoryAllocation": "512",
"CapacityInternalID": "10000006",
"CapacityActiveVersion": "0",
"IntervalEndDate": "/Date(1667779200000)/",
"WeekDay": "1",
"AvailableCapacityShift": "1",
"IntervalStartDate": "/Date(1667779200000)/",
"ShiftDefValidityStart": "/Date(1667779200000)/",
"ShiftDefValidityEnd": "/Date(1667779200000)/",
"ShiftStartTime": "PT06H00M00S",
"ShiftEndTime": "PT12H00M00S",
"CapacityBreakDuration": 1800,
"CapacityNumberOfCapacities": 4
}]
}
};
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.