on ‎2021 Jul 02 9:41 AM
Hi all,
I'm trying to use Convert_currency function in my CAP application but I can't find a way to do it.
Please let me know how to use this function and others.
Regards
LeoVu
Request clarification before answering.
Hello All,
I have similar requirement to do currency conversion from currency A to currency B using Exchange rate type. I am working on CAP project and not finding any API in API hub for this. Could you please confirm how to handle this.
quy_vungoc87 - Did you manage to resolve currency conversion in CAP application? Let me know how you have handled it?
Kind regards,
Deepti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To my knowledge so far no API way exists to use these DB specific function in CAP.
But you can go the way to use it via a HANA Native HANA Artifact, meaning encapsulate your logic to use the currency conversion function in e.g. a table function and make it usable within CAP. Details are described in the CAP documentation (see link before).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should try this code to convert SQL function into currency
Create a table and populate it with two example currency amounts.
CREATE ROW TABLE sample_input (price DECIMAL(15,2),
source_unit NVARCHAR(4),
target_unit NVARCHAR(4),
ref_date NVARCHAR(10)
);
INSERT INTO sample_input VALUES (1.0, 'SRC', 'TRG', '2011-01-01');
INSERT INTO sample_input VALUES (1.0, 'SRC', 'TRG', '2011-02-01');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.