Skip to Content
avatar image
Former Member

ABAP CDS views with Associations

Hello Experts,

I was going through the following SAP Documentation to learn use of ABAP CDS views with association:

http://help.sap.com/abapdocu_751/en/abencds_f1_association.htm

Can anyone of you experts please explain in a bit detail with examples on what is the purpose of publish associations in second example shown in above URL?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 23, 2017 at 03:40 PM

    Hi Debarshi,

    I see two purposes for the same..

    1 This association in the projection can be reused in other CDS views(Say CDS2) which uses this CDS view . The CDS2 need not declare the join condition again but has access to all the fields inside this assocation.

    2 If you are using this CDS view for mapping with GW, then you use this CDS view assocations as the basis for GW assocation and navigation

    BR

    Arshad

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 23, 2017 at 04:39 PM

    You can publish them for usage in other views or in Open SQL.

    Furthermore, you can annotate associations that are published in the SELECT list.

    Example for usage in Open SQL: http://help.sap.com/abapdocu_751/en/index.htm?file=abenopen_sql_path.htm

    Horst

    Add comment
    10|10000 characters needed characters exceeded