Hi All,
I'v tested CDS with currency conversion versus the classical approach with the function module for currency converion on application layer (CONVERT_AMOUNT_TO_CURRENCY). The classical approach seemed to be much faster, so I started testing.
Please find attached the objects used for testin:
- y_cds_test_currconv.txt -> Simple ABAP report with both options
- Y_CDS_TEST_CURRCONV.txt -> The CDS view
I test on a system with AS ABAP 7.4 SP8 + HANA SP 8 and also AS ABAP 7.4 SP8 + HANA SP 9.
There's actually an OSS, but the it's refering to Oracle DB and not HANA DB (2067294).
Native SQL statment (tracing done with ST05)
SETSCHEMA"SAPMDE";
SELECT
"CARRID",
"CONNID",
"FLDATE",
"SOURCE_PRICE",
"SOURCE_CURRENCY",
"TARGET_AMOUNT",
"TARGET_CURRENCY"
FROM
"YTESTCUR" ( "TO_CURRENCY" => 'EUR' ,
"EXC_DATE" => '20150427' ) "YTESTCUR"
WHERE
"MANDT" = '100'
Result
![native_sql.gif]()
Change the CDS and replace the CURRENCY_CONVERSOIN by table field PRICE. (to check if the slow performance is cause by the currency conversion function)
![cds_change.jpg]()
Result run native SQL statement:
![cds_change_result.jpg]()
I have also run the SAP HANA Plan Visualizer, refer the next screenshots.
![visualizer1.jpg]()
![visualizer2.jpg]()
![visualizer3.jpg]()
It seems to me that the currency conversion has some performance issue. Has anybody experienced the same and maybe found a solution?
One final remark: for testing you need to have data in FLIGHT model. (Go to SE38 and run SAPBC_DATA_GENERATOR to generate data)
Thanks in advance.
Best Regards,
Bart