cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAC Advance Formula Error while copying data from one model to other model

VikasB
Active Participant
0 Likes
993

Hello,

I want to copy data from one model A to another planning model B with MODEL and LINK command. With this I also want to populate dimensions of Model B using properties of Model A dimension. I am using following script but it gives me error of Scope redirection.

//-----------------------------------------------------------------------------------
//Set Configurations Definitions for the Advanced Formulas.
//-----------------------------------------------------------------------------------
CONFIG.TIME_HIERARCHY = FISCALYEAR
CONFIG.GENERATE_UNBOOKED_DATA = OFF
//-----------------------------------------------------------------------------------
//The data region against which the formulas will be executed.
//-----------------------------------------------------------------------------------
MEMBERSET [d/Measures] = ("MDP")
MEMBERSET [d/FISCAL_MONTH] = BASEMEMBER([d/FISCAL_MONTH].[h/FYP], %FISCAL_YEAR%)
MEMBERSET [d/DATA_SOURCE] = ("UPLOAD_PTA_SLS")
//MEMBERSET [d/ACCOUNT] = "CGRETSL"
//-----------------------------------------------------------------------------------
//Calculation and Data Writing
//-----------------------------------------------------------------------------------
// Link PTA Actuals Model to transfer data
MODEL [SaFARI - PTA Actuals]
ENDMODEL
 
// Copy Data to Planning model and assign properties of Base Code to Estimate Code, Factory and Product to respective dimension
DATA(
    [d/Measures] = "MDP", 
[d/ESTIMATE_CODE] = [SaFARI - PTA Actuals].[d/BASECODE].[p/EST_CODE],
[d/FACTORY] = [SaFARI - PTA Actuals].[d/BASECODE].[p/FACTORY],
    [d/SaFARI_PRODUCT] = [SaFARI - PTA Actuals].[d/BASECODE].[p/PRODUCT]
 
) = LINK(
    [SaFARI - PTA Actuals],
    [d/Version] = "public.Actual",
    [d/Measures] = "MDP"
)
 
------
Below are the error messages I get with this code.
- There is violation of scope redirection in the calculation expressions.
- The dimension [SaFARI - PTA Actuals].BASECODE] is not allowed to be used with linked model because it is shared dimension.
 
Appreciate any help on this. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

@VikasB 

If [d/BASECODE] is common between 2 models why are you qualifying it with model name. May be try as below.

 

DATA(
    [d/Measures] = "MDP", 
[d/ESTIMATE_CODE] = [d/BASECODE].[p/EST_CODE],
[d/FACTORY] = [d/BASECODE].[p/FACTORY],
    [d/SaFARI_PRODUCT] = [[d/BASECODE].[p/PRODUCT]
 
) = LINK(
    [SaFARI - PTA Actuals],
    [d/Version] = "public.Actual",
    [d/Measures] = "MDP"
)
VikasB
Active Participant
0 Likes

Hi N1kh1l,

I do not want Basecode in Model B since it is not used for planning and reporting further. I just need to populate properties of it to the dimension in other model. 

N1kh1l
Active Contributor
You can use a cross model data copy and map the dimensions of Model B (target) to properties of dimension in Model A source. You will find the option in Mapping rule to do so. You dont even need the LINK syntax then.
VikasB
Active Participant
0 Likes
With Cross model copy, I can only map one property per dimension. There is no possibility of mapping multiple properties of single dimension. Also I need advance formula because I have some additional logic based on version to copy number of periods.
raviv7
Explorer
0 Likes

Hi @VikasB ,

 

Facing the same issue. Have you fixed this error ? If yes, Could you share the solution.

Answers (0)