cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CPI iFlow getting error: The metadata constraints '[Precision=0]' do not allow to format the value

patrik_buransky
Explorer
0 Kudos
192

Hi Folks,

we are using simple iFlow in CPI to create material document in SAP S4HANA Cloud public edition (2SL) with Odata service API_MATERIAL_DOCUMENT_SRV. We tried to change message mapping but it was failing so we reverted it back the previous version but we are still getting the same error:

com.sap.gateway.core.ip.component.odata.exception.ODataV2ResponseParsingException: Caused by:org.apache.olingo.odata2.api.edm.EdmSimpleTypeException: The metadata constraints '[Precision=0]' do not allow to format the value 'java.util.GregorianCalendar[time=17423067770,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=1970,MONTH=6,WEEK_OF_YEAR=30,WEEK_OF_MONTH=4,DAY_OF_MONTH=21,DAY_OF_YEAR=202,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=3,HOUR_OF_DAY=15,MINUTE=44,SECOND=27,MILLISECOND=770,ZONE_OFFSET=0,DST_OFFSET=0]'. in EntitySet A_MaterialDocumentHeaderThe metadata constraints '[Precision=0]' do not allow to format the value 'java.util.GregorianCalendar[time=17423067770,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,l...

We tried to send date with milliseconds, without, only zeros and still failing.

It is failing after request reply to SAP S4HANA system.

patrik_buransky_0-1742824761984.png

We are sending:

{
    "GoodsMovementCode": "02",
    "MaterialDocument": "",
    "MaterialDocumentYear": "",
    "PostingDate": "/Date(17423067770)/"
}

Does anybody know how to fix this issue?

Thanks in advance for your help.

View Entire Topic
patrik_buransky
Explorer
0 Kudos

Hello,

the issue was that SAP changed the metadata (from Odata service API_MATERIAL_DOCUMENT_SRV, old doesn't have precision=0) used in CPI iFlow. When we reactivated the iFlow, the metadata updated, and it stopped working. We had to rework all the code (based on new metadata) in our system that sends post requests to iFlow.

Regards,

Patrik