2018 Jun 18 9:42 AM
Hi,
Is there any way to migrate the complex calculation logic from ABAP to CDS?
CDS Table function with AMDP cannot be considered as there is no db related calculation.
Also, is there any way to perform the moving average in CDS?
Regards
Sunil
2018 Jun 18 10:08 AM
If they're both Turing complete, then yes. There is a way. But probably you'll have to it manually.
2018 Jun 19 6:31 AM
Hi Mathew,
Can you please give more clarification?
Thanks & Regards
Sunil
2018 Jun 19 7:11 AM
Anything you can write in a Turing complete language can be written in any other language.
ABAP is Turing complete. So if CDS is Turing complete, then yes, you can migrate one to the other.
My guess is that CDS is not, so it might be possible to migrate or it might not be.
SQL Script probably is Turing complete, so you most likely can migrate to that. https://answers.sap.com/questions/419209/are-sqlscript-and-hana-sql-turing-complete.html
Note, even if you can migrate, that doesn't mean it will necessarily be easy or pretty or efficient.