cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone explain how associations work in ABAP CDS?

srujan_gannamaneni
Participant
0 Kudos

Hi

I am new to CDS modeling and trying to understand how an association exactly work

Please find the below mentioned code and explain me how exactly an association work
depending on where path expressions are used

Regards

Srujan

select from bkpf  association [0..1] to t001t  as _b 
on $projection.mandt = _b.mandt
and $projection.bukrs = _b.bukrs
{
    key bkpf.bukrs ,
    bkpf.mandt,
    bkpf.belnr ,
    bkpf.gjahr ,
    _b.ltext
}
where _b.txtna = 'F_0001_FOOTER'

Accepted Solutions (1)

Accepted Solutions (1)

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos
srujan_gannamaneni
Participant
0 Kudos

Hi Horst,

Its really a very good form to understand basic working of an association.

Thank you so much 🙂

I have one more Question. Is there a way to consume HANA Calculation view in ABAP CDS (Just like how we consume in AMDP)?

Best Regards

Srujan Gannamaneni

horst_keller
Product and Topic Expert
Product and Topic Expert
0 Kudos

No, this is not possible. You must wrap the access to the calc view in an AMDP procedure.

Answers (0)