01-11-2019 5:35 PM
Hi Everyone,
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 !
Thanks,
Sachin
01-15-2019 6:31 PM
The Date can be casted to String first -> String to NUMC-> Integer. Check the table for casting at SAP help..
01-17-2019 9:53 AM
Alternatively ,We can pass the last day of Month field explicitly using parameterized CDS views.