Ansicht
Dokumentation
ABENSQL_SCRIPT_CURR_CONV_ABEXA - SQL SCRIPT CURR CONV ABEXA
BAL Application Log Documentation TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
SAP HANA, Currency Conversion with SQLScript
This example demonstrates how a built-in HANA SQL function is called in SQLScript.
Source Code
Description
If possible, the example program calls the AMDP method CONVERT of the AMDP class CL_DEMO_SQLSCRIPT_CURR_CONV.
The SQLScript implementation of this method uses the built-in SQL function CONVERT_CURRENCY to convert the amounts in the column amount in the database DEMO_PRICES to a currency entered by the user.
If the current database is not an SAP HANA database, the method ABAP_CONVERT is called as an alternative.
This method uses the function module CONVERT_TO_LOCAL_CURRENCY. Here, the table to b converted is first read to an internal table in AS ABAP and must be written again after the conversion.
Note
See also
- The built-in SQL function CURRENCY_CONVERSION wraps the HANA function CONVERT_CURRENCY. The program DEMO_ASQL_FUNC_CURR_CONV shows how the same function as above can be achieved by using an ABAP SQL SELECT that calls the SQL function.
- The built-in CDS function CURRENCY_CONVERSION wraps the HANA function CONVERT_CURRENCY. The program DEMO_CDS_FUNC_CURR_CONV shows how the same function as above can be achieved by using a CDS view that calls the CDS function.
A complete code relocation using a subquery in the ABAP SQL statement MODIFY is only possible if no table logging takes place.
Addresses (Business Address Services) General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 2794 Date: 20240424 Time: 020217 sap01-206 ( 37 ms )