Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8150

Conversion between System.Decimal and DECFLOAT types

$
0
0

Hi All,

 

I am trying to find an appropriate .NET type best matching DECF16 (eight-byte decimal floating point number, ABAP type a) and DECF34 (sixteen-byte decimal floating point number, ABAP type e) ABAP types. I thought, System.Decimal would be a good candidate for this role. However, when I try to use it for setting a value of a field of type DECF16 in a structure, the following exception is thrown:

 

...

SAP.Middleware.Connector.RfcTypeConversionException: FIELD F_DF16_DEC of STRUCTURE ZSPF_UT_S_001 (SETTER): cannot convert Decimal into DECF16 ---> SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert decimal -20910087939212300000000000000 into DECF16 ---> SAP.Middleware.Connector.RfcTypeConversionException: Cannot convert string "-20910087939212300000000000000" into DECF16 ---> SAP.Middleware.Connector.RfcTypeConversionException: decfloat shared library could not be loaded

    at SAP.Middleware.Connector.RfcDecFloat.InitRfcDecFloat()

   at SAP.Middleware.Connector.RfcDecFloat.StringToDecFloat16(String value)

   at SAP.Middleware.Connector.RfcScalarMetadataDecF16.ConvertString(String value, ref Object currentValue)

--- End of inner exception stack trace ---

    at SAP.Middleware.Connector.RfcScalarMetadataDecF16.ConvertString(String value, ref Object currentValue)

   at SAP.Middleware.Connector.RfcScalarMetadataDecF16.ConvertDecimal(Decimal value, ref Object currentValue)

--- End of inner exception stack trace ---

    at SAP.Middleware.Connector.RfcScalarMetadataDecF16.ConvertDecimal(Decimal value, ref Object currentValue)

   at SAP.Middleware.Connector.RfcScalarMetadata.ConvertObject(Object value, ref Object currentValue)

   at SAP.Middleware.Connector.RfcDataContainer`1.SetValue(Int32 index, Object value)

--- End of inner exception stack trace ---

    at SAP.Middleware.Connector.RfcDataContainer`1.SetValue(Int32 index, Object value)

   at SAP.Middleware.Connector.RfcDataContainer`1.SetValue(String name, Object value)

...

 

Am I missing any dependency? Does anybody know how to solve the problem?


Viewing all articles
Browse latest Browse all 8150

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>