osecome.blogg.se

All in one unit converter
All in one unit converter












all in one unit converter

Target currency from column WAERS of database table TCURCĮxchange rate date for column WAERS of database table TCURRĮxchange rate type from column KURST of database table TCURR, default value: "M"Ĭlient whose rules are used to perform the currency conversion. Source currency from column WAERS of database table TCURC These rules can be edited using transaction OB08. On the basis of the client-specific rules saved in the database tables TCUR. The result has the data typeĬURR with the same technical attributes as theĪctual parameter passed to amount. The function CURRENCY_CONVERSION performs a currency conversion for the value passed to the formal parameter amount. AsĪ prerequisite for the example, the units and their conversion rules must be available in the corresponding database tables. Is also performed using the function module UNIT_CONVERSION_SIMPLE. Here, the target unit is passed to the parameter in question. The program DEMO_CDS_UNIT_CONVERSION accesses the view in a SELECT Source_unit => cast( 'MI' as abap.unit(3) ),Įrror_handling => 'SET_TO_NULL' ) as converted_value, In the event of an error, for example if a conversion between the entered units is impossible, the result is reset to #NOT_REQUIREDĬast( 'MI' as abap.unit(3) ) as original_unit, The target unit must be passed as a parameter. Is a literal that is cast to the required type. The column DEC3 of the database table DEMO_EXPRESSIONS. The following CDS view calls a unit conversion in the SELECT list for The highest precision is achieved on databases that supportĭue to rounding, the result can be different from a unit conversion performed using ABAP methods, such as a standard function module. The precision of the result of the unit conversion depends on the database platform. Null value if "KEEP_UNCONVERTED", the source value is not changed. If "FAIL_ON_ERROR" (default value), an error raises an exception if "SET_TO_NULL", the result is reset to the Default: Content of the client column of the current rowĮrror handling. Optional (if the current data source is client-specific).

all in one unit converter

Target unit from column MSEHI of database table T006Ĭlient whose rules are used to perform the unit conversion. Source currency from column MSEHI of database table T006 The table below shows the actual parameters p1, p2. The unit conversion is performed on the basis of the client-specific rules saved in transaction CUNI and in the database tables T006. QUAN with the length 31 and 14 decimal places.

all in one unit converter

The function UNIT_CONVERSION performs a unit conversion for the value passed to the formal parameter quantity. Which are optional), to which the actual parameters a1, a2. )Ĭonversion functions for converting between units and between currencies in a | CURRENCY_CONVERSION( p1 => a1, p2 => a2. All rights reserved.ĪBAP CDS - Conversion Functions for Units and Currencies SAP NetWeaver AS ABAP Release 751, ©Copyright 2017 SAP AG.














All in one unit converter