Skip to Content

Using CDS Table function/AMDP

Hi Experts

I have created a CDS cube which has Company Code and GL Account as dimensions and EndingBalance as Measure. Now we need one more field called Average Monthly balance(which is calculated using a SAP Standard ABAP FM). To do it at the database level is it possible to wrap this as a CDS Table function implemented using AMDP method. If so can you direct me to sample code snipped where we call the ABAP FM Inside the AMDP Method.

(I did look up similar queries but did not find anything that had a code snippet for calling an ABAP FM. If there is one and i have missed it pls to post the link). Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Oct 22, 2019 at 03:53 AM

    Hello Meera R Corera,

    CDS functionalities are part of Database layer, their purpose is to reflect the definition of an SQL View.

    An ABAP FM belongs to the application Layer.

    Hence it is not possible to for a database layer to call the FM from application layer.

    Regards!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 06:35 PM

    You cannot call an FM inside an AMDP. Rewriting the code in hana SQL inside the AMDP is the only option.

    BR,

    Mahesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.