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

Cross model copy from old model (Account base) to New Model (Measure base) in SAC

9160ruby
Explorer
0 Kudos
251

Hello Experts,

Context:

We are trying to achieve copy the data from Account based model to Measure base through link function but  are facing some glitch in code.

9160ruby_0-1747129851667.png

Issue:

Code:

The below code is written to served the purpose but it is copying the Default currency data of old model to Local currency of new model. Moreover i don't see where the linkage for the measure can be given as source model doesn't have measure.

Request you to please provide your expert comments on the same.

 

**

MEMBERSET [d/Accounts] = BASEMEMBER([d/Accounts], "Rate", "Quantity", "Input",)

MODEL [Model_Old]

MEMBERSET [d/Date] = BASEMEMBER([d/Date], %DateN%)

MEMBERSET [d/Accounts] = BASEMEMBER([d/Accounts], "Rate", "Quantity", "Input",)

    ENDMODEL

DATA(

 [d/Accounts] = [Model_Old].[d/Accounts],

 [d/Date] = [Model_Old].[d/Date])

= LINK([Model_Old], [d/Version] = %SourceVersion%)

****

 

 

Regards,

View Entire Topic
MoonJun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @9160ruby 

When cross-model copy from the Account model to the Measure model, the default currency value is copied. There is no way to copy from the "Local currency value" of the Account model to the Measure model. 

The workaround solution is to convert from the default currency value to the Local currency on the measure model. 

  • Create one more Measreu with the Default currency. (ex, USD)
  • Copy from the account model default value to the measure "USD".
    • DATA([d/Measures] = "USD", [d/Accounts] = [Model_Old].[d/Accounts], [d/Date] = [Model_Old].[d/Date])
      = LINK([Model_Old], [d/Version] = %SourceVersion%)

  • Currency conversion from "USD" measure to "LC" measure on the Measure model.  

 

I hope this is helpful to you, and if I have misunderstood anything, please feel free to reach out.

Moonjun

9160ruby
Explorer
0 Kudos
Hi @MoonJun, so there is not a single solution provided for the migration client by SAP to allow them to move the data from old model to new model than file upload.
MoonJun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @9160ruby

Unfortunately, there is no single solution to migrate from the Old model to the New model for Local currency value.

Moonjun

9160ruby
Explorer
0 Kudos

Hi MoonJun,

 I have tried the workaround which you have propose but there seems to be decimal difference compare to the old Local Value. I have provided an numbers of old model as well as new .

 

Old modelLCGC
  149519.09940964.1363026
  9351.04452561.9299743
    
New LCAmount in GC
  149519.0989996040964.136302600
  9351.044499702561.92997430
    

 

Is there any possibility that SAC does backend some roundup and hence this is something came up. Request you to provide your opinion to tackle the same

 

Regards,

 

MoonJun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @9160ruby

The LC value in the old model appears to be a 4-decimal-place value, while the conversion rate seems to be a 7-decimal-place value. As a result, the GC value (1.Conversion)  in the old model was calculated with 7 decimal places, and the same 7-decimal-place value was copied (2.Copy - Link) to the GC in the new model. The GC value (3.Conversion) in the new model is computed using the 7-decimal-place LC value and rate, which causes a difference compared to the LC value in the old model. Please refer to the screenshot below for the calculation flow. 

CalculationFlow.png

 

SAC calculates values with 7 decimal places as the default setting.

Regards,

Moonjun

9160ruby
Explorer
0 Kudos
Hi@MoonJun, Yeah i got the same sense as rate is considered "0.2739726" Is there any possibility to perform the rounding after Currency translation to the certain digits.
9160ruby
Explorer
0 Kudos

Hi @MoonJun, Yeah i got the same sense as rate is considered "0.2739726" Is there any possibility to perform the rounding after Currency translation to the certain digits.

MoonJun
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi @9160ruby

You already created a Data action for Currency conversion step, please add one more Script step with the below Advanced formulas script.

MEMBERSET [d/Measures] = "LC"

DATA() = ROUND(RESULTLOOKUP(), 4)
  • Adding Advanced Formulas Step

Rounding.png

Regards,

Moonjun