on 05-08-2014 10:14 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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!
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:
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
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
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
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
Viswanath,
can you share the code? Can you see the bonus values in the source application?
Akos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
15 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.