I have designed CDS view for a Sales Report.
The output has fields like Company Code,Fiscal Year,Period,Target Quantity,Actual Quantity
I am getting the quantity from a custom table which is month/period wise.
The requirement is to calculate the Pro-rata Quantity as on current date.
For example.:For January - Quantity = 100 so as on 11/01 the Quantity would be = (100/<last day of the month>) * current date.
I got the date using the $session variable with sub-string function but that is not getting casted to a number type.
Also , could not find a function to get the last day of the month.
I think this should be possible, Please share your insights !