on 05-14-2015 2:33 PM
Hi BPC Team,
I need you advice in logic script for below scenario:
I have 3 Positions with 18 employees.
4 employees are in Position A
8 employees are in Position B
6 employees are in Position C
I have created Position as Dimension, Employee as another dimension with Position as Property.
I have total 10 dimension for this Model and updated Salary level for each positions.
Position A Salary 100000
Position B Salary 125000
Position C Salary 80000
I want script logic to post Each employee with respective salary amount based on Position
4 employees are in Position A Salary of 100000 each
8 employees are in Position B Salary of 125000 each
6 employees are in Position C Salary of 80000 each
Here is the code I am using.
*XDIM_MEMBERSET CHANGE_LEDGER = CL_159
*XDIM_MEMBERSET COSTCENTRE = CC_NONE
*XDIM_MEMBERSET LOCATION = LO_NONE
*XDIM_MEMBERSET PROJECT = PJ_NONE
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET TIME = 2016.INPUT
*XDIM_MEMBERSET VERSION = VE_ACTUAL
//*SELECT(%PERS%,[ID],TIME,"[YEAR] = '%YEAR%' AND LEVEL = 'MONTH'")
*SELECT(%FIN2%,[ID],GRADE,"[ID] =A','B',’C’")
*FOR %FIN2% = %FIN2%
*XDIM_MEMBERSET GRADE = %FIN2%
*XDIM_MEMBERSET ACCOUNTHR = 10000000
//*XDIM_MEMBERSET EMPLOYEE = NO_EMP
*XDIM_FILTER EMPLOYEE = [EMPLOYEE].properties("GRADENO") = "%FIN2%"
//*XDIM_ADDMEMBERSET EMPLOYEE = NO_EMP
*SELECT(%EMP%,[ID],EMPLOYEE,"[GRADENO] = '%FIN2%'")
*FOR %EMP% = %EMP%
*WHEN ACCOUNTHR
*IS *
*BEGIN
*REC(FACTOR = 1,EMPLOYEE =%EMP%, GRADE =%FIN2%)
*END
*ENDWHEN
*NEXT
*NEXT
*COMMIT
Result of this program is logic is posting:
18 employees are in Position A Salary of 100000 each
18 employees are in Position B Salary of 125000 each
18 employees are in Position C Salary of 80000 each
Could you please let me know where I am making mistake.
Regards,
Tej
Hi All,
Solution is to use Run Alloacation.
Regards,
Tej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tej,
try this
*SELECT(%FIN2%,[ID],GRADE,"[ID] =A','B',’C’")
*XDIM_MEMBERSET GRADE = %FIN2%
*XDIM_MEMBERSET ACCOUNTHR = 10000000
//*XDIM_MEMBERSET EMPLOYEE = NO_EMP
*XDIM_FILTER EMPLOYEE = [EMPLOYEE].properties("GRADENO") = "%FIN2%"
//*XDIM_ADDMEMBERSET EMPLOYEE = NO_EMP
*SELECT(%EMP1%,[ID],EMPLOYEE,"[GRADENO] = '%FIN2%'")
*WHEN ACCOUNTHR
*IS *
*FOR %FIN% = %FIN2%
*FOR %EMP% = %EMP1%
*WHEN GRADE
*IS %FIN%
*WHEN EMPLOYEE
*IS %EMP%
*BEGIN
*REC(FACTOR = 1,EMPLOYEE =%EMP%, GRADE =%FIN%)
*END
*ENDWHEN
*ENDWHEN
*NEXT
*NEXT
*ENDWHEN
not sure if you need this statement *XDIM_FILTER EMPLOYEE = [EMPLOYEE].properties("GRADENO") = "%FIN2%" because you build a select on it, try also without it.
Regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roberto,
This logic is not working.
In my HR cube, i have updated Positionwise salary with Employee as NO_EMP.
Now i want script to read that record and post employeewise salary based on employee dimension property Gradeno(which is Position ID).
The logic you mentioned will give no results, becuase in
*WHEN EMPLOYEE
*IS %EMP%
Cube value exist only for NO_EMP.
So i have tested with
*SELECT(%FIN2%,[ID],GRADE,"[ID] =586','588',’589’")
*XDIM_MEMBERSET GRADE = %FIN2%
*XDIM_MEMBERSET ACCOUNTHR = 10000000
*XDIM_MEMBERSET EMPLOYEE = NO_EM
*SELECT(%EMP1%,[ID],EMPLOYEE,"[GRADENO] = '%FIN2%'")
*WHEN ACCOUNTHR
*IS *
*FOR %FIN% = %FIN2%
*FOR %EMP% = %EMP1%
*WHEN GRADE
*IS %FIN%
*WHEN EMPLOYEE
*IS NO_EMP
*BEGIN
*REC(FACTOR = 1,EMPLOYEE =%EMP%, GRADE =%FIN%)
*END
*ENDWHEN
*ENDWHEN
*NEXT
*NEXT
*ENDWHEN
System is creating each position for all emplolyees of Select Statment.
Problem is with *REC(FACTOR = 1,EMPLOYEE =%EMP%, GRADE =%FIN%)
Record Statment destination employee has to be only employees which belong to respective Position.
Could you please help me out with this. Sending the screenshot of Logic results
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.