Skip to Content
-1
Apr 23 at 06:33 PM

Can the metadata property sap:variable-scale be set in SAP Gateway (SEGW)?

103 Views Last edit Apr 24 at 09:16 AM 4 rev

I'm looking to implement validation of the JPY currency in SAPUI5 (v1.77.2).

In my input component, a decimal point is allowed, which should be an error. I've validated to show the error, but unfortunately a decimal point is always included in my input, whatever I enter.

I think this is because, in my SAP Gateway ServIce, the property in question (Price) has a Scale of 2.

I've looked into smartField in place of an Input....

Code: Smart Field of Currency type - validation example - Samples - Demo Kit - SAPUI5 SDK (ondemand.com)

I noticed the Price in the metadata also had a Scale Setup, but also a property of sap:variable-scale="true" which I think could be a clue. I don't have this property setup in SAP Gateway and therefore my own metadata.

How is the sap:variable-scale setup in SAP Gateway through the SEGW transaction?