Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating Complex ABAP calculation logic to CDS

sunsapblr
Participant
0 Kudos
474

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

3 REPLIES 3

matt
Active Contributor
0 Kudos
77

If they're both Turing complete, then yes. There is a way. But probably you'll have to it manually.

0 Kudos
77

Hi Mathew,

Can you please give more clarification?

Thanks & Regards

Sunil

matt
Active Contributor
77

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.