cancel
Showing results for 
Search instead for 
Did you mean: 

S4 Cloud API call in SAPUI5 gives error "The combination of changes is not allowed in a change set"

0 Kudos

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,

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

updating tag as S/4HANA Cloud for manufacturing as API belongs to this LOB area

Accepted Solutions (1)

Accepted Solutions (1)

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

JulianoRomanato
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear deepaks13.

How are you? As it was more than 7 days that enda.fennelly has answered your question and you did not commented, I am accepting enda.fennelly answer and closing this question.

Regards.

Juliano Romanato.

Answers (2)

Answers (2)

0 Kudos

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

Enda
Product and Topic Expert
Product and Topic Expert
0 Kudos

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://help.sap.com/docs/SAP_S4HANA_CLOUD/d35113ee62644d3abee1aaec148291d9/d01ff746f7934178ac5c84b1...

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

0 Kudos

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

0 Kudos

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
					}]
				}
			};