Skip to content

ERPConnect.AbapPackedNumber

Namespace: ERPConnect
Assembly: ERPConnectStandard20.dll

public readonly struct AbapPackedNumber

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods

ToDecimal(in ArraySegment<byte>, in int)

Currently we don't support all values for defined total lengths > 28. We throw an exception, only if the actual value exceeds the supported range. We only consider fully supported decimal places for range checking (no optimization for ± 7.9228 * 10^28). If we would like to support more values, we would need to store the raw BCD bytes in a struct or class, like we do for the ERPConnect.UtcLong type, and convert to string. (unless a type that supports all values is added to .NET in the future)

public static decimal ToDecimal(in ArraySegment<byte> bcdBytesSegment, in int decimalsCount)

Parameters

bcdBytesSegment ArraySegment<byte>

decimalsCount int

Returns

decimal

ToDecimal(in string)

public static decimal ToDecimal(in string abapString)

Parameters

abapString string

Returns

decimal


Last update: January 4, 2024