YTD routine in update or transformation rules
I'm currently on BI 7.0. I have an ODS that contains a monthly balance key figure. When moving this data to an infocube, I'd like to create a YTD key figure based on that monthly balance. I have 0FISCYEAR, 0FISCPER, and 0FISCPER3 time characteristics in my ODS and infocube.
Can someone provide me an ABAP code sample that I could use in my transformation routine that could calculate the YTD value based on the monthly balance key figure?