on 2019 Jun 07 9:40 AM
Hi experts,
I´m facing a problem when consuming a REST service using the SAP PI RESTAdapter.
I have used the "Custom XML/JSON Conversion Rules" so the numbers are sent without quotation t the service, but this configuration is also causing an unexpected problem, when a value like "100.00" arrives to the adapter in that field, it gets rounded automatically to "100".
I know this would be just fine in the 99% of the cases, but this REST Service fails if the decimals are not present 😞
I have configured the channel like this:
The payload just before the REST conversion looks like this (decimals present):
But after the XML/JSON conversion it turns to this:
¿Does anyone know if this is avoidable? I don´t want the adapter to trim/round the .00 decimals
¿Is this any different in newer versions of this adapter?
Thanks in advance.
Mikel
Request clarification before answering.
Hi Mikel,
The values available are
1. numeric
2. decimal
3. float
4. double
But, i have tried all previously and it doesn't work.
99.99 will remain 99.99
99.90 will become 99.0
99.00 will become 99
As the numbers did not affect the end application's logic as any valid number like 99.98 , 66.78 were retained and 0s had no meaning for end application so we went ahead with it.
If it really matters for you to not live without the 0s after decimal you may log a sap ticket and try else JAVA may help you 🙂
Regards,
Vikas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you try this :
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.