cancel
Showing results for 
Search instead for 
Did you mean: 

Move data from one model to another model using Destination_App script logic.

Former Member
0 Kudos

Hi Everyone,

I am trying to move data from one model to another model using Destination_App script logic.

There are three accounts used in template(Created on first model) namely

Head count (Input Value)

Basic Salary (Input value)

Bonus (Calculated using script logic) - Used script logic before execute *Destination_app script in Default logic

Bonus Values are not moving to second model. But i am able see data for Head count and basic salary in Second model.

Guys help me on this issue.

Regards,

Viswanath

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Yes, show the code and additional info like:

Vadim

Former Member
0 Kudos

Hi,

Below is the code used to calculate Bonus value and able to see data in source model.

*XDIM_MEMBERSET HCP_ACCOUNT = PA_SALARY

*XDIM_MEMBERSET HCP_COSTCENTER = %HCP_COSTCENTER_SET%

*XDIM_MEMBERSET HCP_JOB = %HCP_JOB_SET%

*XDIM_MEMBERSET HCP_VERSION = PLAN

*XDIM_MEMBERSET HCP_RPTCURRENCY = %HCP_RPTCURRENCY_SET%

*XDIM_MEMBERSET HCP_EMPLOYEE = %HCP_EMPLOYEE_SET%

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = %VALUE% * 0.25 ,HCP_ACCOUNT = PA_BONUS)

*ENDWHEN

*COMMIT

Below is the code used for move data to another model.

*XDIM_MEMBERSET HCP_AUDIT_ID = %HCP_AUDIT_ID_SET%

*XDIM_MEMBERSET MEASURES = PERIODIC

*XDIM_MEMBERSET HCP_RPTCURRENCY = %HCP_RPTCURRENCY_SET%

*DESTINATION_APP = HCP_GUIDELINES

*SKIP_DIM = HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION

*WHEN HCP_ACCOUNT.TRANS_GUIDE

*IS "Y"

*REC(EXPRESSION = %VALUE%)

*ENDWHEN

*COMMIT

-Viswanath

former_member186338
Active Contributor
0 Kudos

Hi Viswanath,

Do you have 2 DM packages for 2 scripts you provided?

Do you provide complete code?

Do PA_BONUS account has property TRANS_GUIDE set to "Y"?

How scope is defined?

What is BPC version and SP?

Looks like you don't want to get an answer - you don't read

Vadim

P.S. STOP using useless COMMIT with scope reset in your code!

Former Member
0 Kudos

Hi Vadim,

I am not using DM package to execute Script logic.

Yes, I had provided complete Code. And BONUS calculation and *Destination_app script logic are included in DEFAULT. So it will execute once you save the data in Input template.

Yes, BONUS account member  TRANS_GUIDE set to "Y"

Scope: I want move data from one model to another model.

First model had below dim:

HCP_AUDIT_ID , HCP_RPTCURRENCY, HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION, HCP_COSTCENTER, HCP_JOB, HCP_ACCOUNT


Second model contains below dim:

HCP_COSTCENTER, HCP_JOB, HCP_AUDIT_ID, HCP_ACCOUNT


Patch details:


former_member186338
Active Contributor
0 Kudos

Please provide FULL code of default.lgf and of other script files included.

*XDIM_MEMBERSET in default.lgf - is a very bad practice!

You don't have any SP installed... system needs upgrade!

Vadim

Former Member
0 Kudos

I had included names of script logic (BONUS_CALC.LGF and PLANNING_MOVE.LGF) in DEFAULT.LGF

to execute these scripts On-line.

Below sequence used in DEFAULT.LGF

Below code for Bonus calculation:

*XDIM_MEMBERSET HCP_ACCOUNT = PA_SALARY

*XDIM_MEMBERSET HCP_COSTCENTER = %HCP_COSTCENTER_SET%

*XDIM_MEMBERSET HCP_JOB = %HCP_JOB_SET%

*XDIM_MEMBERSET HCP_VERSION = PLAN

*XDIM_MEMBERSET HCP_RPTCURRENCY = %HCP_RPTCURRENCY_SET%

*XDIM_MEMBERSET HCP_EMPLOYEE = %HCP_EMPLOYEE_SET%

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = %VALUE% * 0.25 ,HCP_ACCOUNT = PA_BONUS)

*ENDWHEN

*COMMIT

Below code to move data from one model (HCP_GUIDELINES) to another model (HCP_PLANNING)

*XDIM_MEMBERSET HCP_AUDIT_ID = %HCP_AUDIT_ID_SET%

*XDIM_MEMBERSET MEASURES = PERIODIC

*XDIM_MEMBERSET HCP_RPTCURRENCY = %HCP_RPTCURRENCY_SET%

*DESTINATION_APP = HCP_GUIDELINES

*SKIP_DIM = HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION

*WHEN HCP_ACCOUNT.TRANS_GUIDE

*IS "Y"

*REC(EXPRESSION = %VALUE%)

*ENDWHEN

*COMMIT

former_member186338
Active Contributor
0 Kudos

Try this code as default.lgf (without any *XDIM_MEMBERSET...):

*WHEN HCP_VERSION

*IS PLAN

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = %VALUE% * 0.25 ,HCP_ACCOUNT = PA_BONUS)

*ENDWHEN

*ENDWHEN

*DESTINATION_APP = HCP_GUIDELINES

*SKIP_DIM = HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION

//copy bonus if PA_SALARY for PLAN is changed

*WHEN HCP_VERSION

*IS PLAN

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = [HCP_ACCOUNT].[PA_BONUS],HCP_ACCOUNT = PA_BONUS)

*ENDWHEN

*ENDWHEN

//copy other

*WHEN HCP_ACCOUNT.TRANS_GUIDE

*IS "Y"

*REC(EXPRESSION = %VALUE%)

*ENDWHEN

Vadim

Former Member
0 Kudos

Hi Vadim,

Thanks for the code.

I have used below code as per your suggestion;

//Calculating Bonus, Social Insurence and Unemployment tax.

*WHEN HCP_VERSION

*IS PLAN

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = %VALUE% * 0.25 ,HCP_ACCOUNT = PA_BONUS)

*REC(EXPRESSION = %VALUE% * 0.10 ,HCP_ACCOUNT = PA_SOCINS)

*REC(EXPRESSION = %VALUE% * 0.10 ,HCP_ACCOUNT = PA_UNEMPLOYTAX)

*ENDWHEN

*ENDWHEN

*DESTINATION_APP = HCP_GUIDELINES

*SKIP_DIM = HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION

//copy  if PA_SALARY for PLAN is changed

*WHEN HCP_VERSION

*IS PLAN

*WHEN HCP_ACCOUNT

*IS PA_HEADCOUNT

*REC(EXPRESSION = %VALUE%)

*WHEN HCP_ACCOUNT

*IS PA_SALARY

*REC(EXPRESSION = %VALUE%)

*REC(EXPRESSION = [HCP_ACCOUNT].[PA_BONUS],HCP_ACCOUNT = PA_BONUS)

*REC(EXPRESSION = [HCP_ACCOUNT].[PA_SOCINS],HCP_ACCOUNT = PA_SOCINS)

*REC(EXPRESSION = [HCP_ACCOUNT].[PA_UNEMPLOYTAX],HCP_ACCOUNT = PA_UNEMPLOYTAX)

*ENDWHEN

*ENDWHEN

*ENDWHEN

Actually i am able see data for Head count only in Destination model.

So, Bonus, SOCINS, UNEMPLOYTAX accounts values are not copying to destination model.

But i can see data in Source model.

Note: Calculating are deriving perfectly.

-Viswanath

former_member186338
Active Contributor
0 Kudos

Some strange code in WHEN - why do you put *WHEN HCP_ACCOUNT second time?

Try the following, it will work correctly:

*WHEN HCP_VERSION

*IS PLAN

  *WHEN HCP_ACCOUNT

  *IS PA_SALARY

    *REC(EXPRESSION = %VALUE% * 0.25 ,HCP_ACCOUNT = PA_BONUS)

    *REC(EXPRESSION = %VALUE% * 0.10 ,HCP_ACCOUNT = PA_SOCINS)

    *REC(EXPRESSION = %VALUE% * 0.10 ,HCP_ACCOUNT = PA_UNEMPLOYTAX)

  *ENDWHEN

*ENDWHEN

*DESTINATION_APP = HCP_GUIDELINES

*SKIP_DIM = HCP_EMPLOYEE, HCP_PAY_GRADE, HCP_POSITION

*WHEN HCP_VERSION

*IS PLAN

  *WHEN HCP_ACCOUNT

  *IS PA_HEADCOUNT

    *REC(EXPRESSION = %VALUE%)

  *IS PA_SALARY

    *REC(EXPRESSION = %VALUE%)

    *REC(EXPRESSION = [HCP_ACCOUNT].[PA_BONUS],HCP_ACCOUNT = PA_BONUS)

    *REC(EXPRESSION = [HCP_ACCOUNT].[PA_SOCINS],HCP_ACCOUNT = PA_SOCINS)

    *REC(EXPRESSION = [HCP_ACCOUNT].[PA_UNEMPLOYTAX],HCP_ACCOUNT = PA_UNEMPLOYTAX)

  *ENDWHEN

*ENDWHEN

Vadim

Former Member
0 Kudos

Thanks Vadim for your help.

It is working fine now.

Regards,

Viswanath

Answers (1)

Answers (1)

akos_beres
Contributor
0 Kudos

Viswanath,

can you share the code? Can you see the bonus values in the source application?

Akos