Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Copy data from next year in Planning Business Rule

3588477Feb 1 2018 — edited Feb 2 2018

Hi Planning Experts,

I have a requirement in which I want to copy the historical data from a previous year to the following years. The year is stored in a smartlist "Start Year" in the data set. Following is how the data set looks

pastedImage_15.png

For e.g. for FY02 year i want to copy data from FY02 to FY03 to FY16. If the year is FY03, then copy from FY04 to FY16.

I used the following code to do it. The user variable &vYear is set to FY17 where the entire data for actual resides.

VAR _CopyFromFY02 = 1;

FIX(&vVersion,{rtpLocation},{rtpCompany},{rtpAnalysisCode},{rtpEntity})

FIX ( @RELATIVE("Total Jobs",0 ) )

FIX ( @RELATIVE( "Existing Employees",0 ) )

FIX("Actual")

SET CREATENONMISSINGBLK ON;

"Start Month"

(

 IF (@ISMBR(&vYear) AND &vYear->"IsEmpty" \<> [#missing](https://forums.oracle.com/ords/apexds/domain/dev-community?tags=missing) AND "Start Year" == 3)  /\* Start Year == 3 is FY02. The years are stored as smartlist from FY00 as 1 \*/

      \_CopyFromFY02 = 0;

)

FIX (@REMOVE("FY03":&vYear,&vYear), "Dec":"Nov","BegBalance")

LOOP (1, _CopyFromFY02)

                     "Employee Type" = "Employee Type"->"FY02"->"BegBalance";

                     "Pay Type" = "Pay Type"->"FY02"->"BegBalance";

                        .............................................................................

                          ............................................................................

ENDLOOP

ENDFIX

In the above code, if FY02 is the year, then it should copy from FY03. How can i not hardcode the next year FY03 and include the next year of what the start year is in the data set. Else I need to hardcode for all years from FY00 to FY16

Please advice. Any suggestion would be great!

Thanks,

Pete`

This post has been answered by Ambo on Feb 2 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 2 2018
Added on Feb 1 2018
5 comments
611 views