Skip to Content


Dear Experts,

Can we use ASSOCIATION inside AMDP methods or only JOIN is permissible ? In other case, Table Function being a CDS artifact when implemented by an AMDP method, can it perform any operations other than returning a result set ? In which type of requirements shall we use a Table Function implemented by and AMDP method ?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Posted on Nov 05, 2019 at 05:37 AM

    Hello Shubham Banerjee,

    Kindly go through the below Link, I have explained the concepts.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 05:47 AM

    Hi Shubham,

    1. AMDP primarily uses SQLSCRIPT as language. As far as i know, 'ASSOCIATION' syntax won't be allowed in SQL script.

    2. AMDP is used to get filtered data from database. It was introduced to enable code push-down which happens when script executes at DB level. You can perform calculations as well, but all calculations and extraction should happen in one step.

    3. CDS table functions has its own uses ( passing parameters to get result). AMDP has its own use cases ( code push down). CDS table functions are used with AMDP if you want to push select-options to DB level. SQL script has no concept of select-options/ranges. Below blog:

    I am sure there is more to above information. Looking forward to other answers.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 06:16 AM

    Hello Shubham Banerjee,

    To keep it Simple,

    1) CDS Objects has Advantages over traditional Data base objects.

    2) AMDB methods has advantages over traditional methods.

    Now when two Objects that has advantages over traditional objects combine together and yield results imagine how fruitful they can be.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 05, 2019 at 06:08 AM

    Hi Gaurav Karkara,

    Really appreciate your effort for sharing such a useful link. I have gone through the link before and still came up with the doubt as I had two confusions with the same,

    1. If we are using SELECT-OPTIONS, then why don't we call an AMDP straight in an ABAP report and get the desired result set out of a method using CL_SHDB_SELTAB=>COMBINE_SELTABS.

    2. If we want to use a CDS feature along with a SELECT-OPTION, then we are basically follow the following order,

    a. create a TABLE FUNCTION with parameters and implement in an AMDP method.

    b. we call the TABLE FUNCTION from a report and pass the SELECT-OPTION values as a string using CL_SHDB_SELTAB=>COMBINE_SELTABS.

    c. ultimately we'll be calling an AMDP method which supports only SQL Script and we are not able to use any Open SQL features.

    My doubt is, then why do we involve the Table Function, instead we can follow step 1 straight forward.

    Please help me to understand and do clarify me if I am doing a mistake in understanding something.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Shubham,

      I believe it would be best if you go through the post shared by Satish. Please go through the links and others' answers as well. That should help you to answer these questions.

      If that much information is not enough, i suggest you to create some objects yourself and try.

      If you still have doubts, please comment here. I will be happy to answer.


  • Posted on Nov 05, 2019 at 06:32 AM

    Hi Both,

    I found a post that indicates as following. If the same is permissible, then it's the solution of my doubt.

    1. Create a TABLE FUNCTION, B with Parameters and without SELECT-OPTIONS and implement the same in an AMDP method.

    2. Inside the AMDP method use Database Table A as the data source.

    2. Create a CDS view and use the TABLE FUNCTION as a data source or as one of the data sources. Also perform JOIN/ ASSOCIATION between A and B in the CDS if needed.

    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.