on 2025 Mar 24 2:09 PM
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.
We are sending:
Does anybody know how to fix this issue?
Thanks in advance for your help.
Request clarification before answering.
Hi @patrik_buransky ,
When testing, try without the PostingDate field as it's optional, or alternatively, include the PostingDate as '2025-03-25T00:00:00'. Both options should be valid solutions.
Additionally, I've observed that the PostingDate is being sent as '17423067770', which corresponds to 'Tue Jul 21 1970 15:44:27.770'. Ideally, it should be sent as '1742306777000', which represents 'Tue Mar 18 2025 14:06:17.000'.
Kind regards. Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thanks for you reply, It's just testing example, we tried a lot of dates and nothing is working. Just to add we are using Java SAP SDK to send post request, so we add there some date and it will convert it to e.g. /Date(1742306777)/. We tried to send 1742897967575, but still the same error. And when we try it without posting date it's refused with an error com.sap.gateway.core.ip.component.odata.exception.OsciException: Internal Server Error : 500 : HTTP/1.1
Thanks,
Patrik
User | Count |
---|---|
30 | |
21 | |
16 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.