cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with calculation on association members in a CDS View

charmingshan
Explorer
0 Kudos

I have defined a view with association to Pricing Element interface CDS View. I need condition amounts for different condition types values of which I defined in the condition. In short I am trying to have required condition type as columns for calculation purposes. In the subsequent CDS view when I try to perform any arithmetic operations like _v_zpr0.ConditionAmount + _v_zacm.ConditionAmount it returns 0 if one of the condition amounts is 0. it returns values only all the condition types have values in the condition amount field. How can we make this kind of calculation work like using restrcited KF and Calc KF in SAP BW queries

Any help will be appreciated.

define view ZT_BILITMPRCELMNTS as select from I_BillingDocument    as _BillingDocument
association [0..*] to I_PricingElement as _v_zpr0 on  _v_zpr0.PricingDocument          = $projection.SalesDocumentCondition
                                                            and _v_zpr0.PricingDocumentItem      = $projection.billingdocumentitem
                                                            and _v_zpr0.ConditionApplication      = 'V'
                                                            and _v_zpr0.ConditionType = 'ZPR0'
association [0..*] to I_PricingElement as _v_zacm on  _v_zacm.PricingDocument          = $projection.SalesDocumentCondition
                                                            and _v_zacm.PricingDocumentItem      = $projection.billingdocumentitem
                                                            and _v_zacm.ConditionApplication      = 'V'
                                                            and _v_zacm.ConditionType = 'ZACM'

Accepted Solutions (0)

Answers (0)