on 05-19-2015 3:15 AM
Hi BPC Team,
I need you advice in logic script for below scenario:
I have 3 Positions with 9 employees.
3 employees are in Position 586
5 employees are in Position 588
1 employees are in Position 589
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 with all other dimensions DUMMY even Employee as NO_EMP
Position 586 Salary 100000
Position 588 Salary 125000
Position 589 Salary 80000
I want script logic to post Each employee with respective salary amount based on Position
3 employees are in Position 586 Salary of 100000 each
5 employees are in Position 588 Salary of 125000 each
1 employees are in Position 589 Salary of 80000 each
*XDIM_MEMBERSET CHANGE_LEDGER = CL_NONE
*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 = ACTUAL
*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%'") --> System picks 9 employees
*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. i.e 9 employees for position 586. 588 and 589, Which is wrong.
Problem is with *REC(FACTOR = 1,EMPLOYEE =%EMP%, GRADE =%FIN%)
I am expecting EMPLOYEE to have [EMPLOYEE].[GRADENO] = %FIN%.
Record Statement destination employee has to be only employees which belong to respective Position.
My *REC statement destination dimension employee depends on Grade ID, which is a Property in Employee as GRADENO.
Regards,
Tej
Hi Tej,
Not 100% clear!
Please provide full info:
"I have total 10 dimension for this Model and updated Salary level for each positions with all other dimensions DUMMY even Employee as NO_EMP"
What do you mean by DUMMY? May be CL_NONE, CC_NONE, etc...?
Please provide the full list!
Vadim
P.S. And your POSITION is GRADE dimension?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vadim,
I am working on HR model.
Here is the details attached.
Employee Dimsension
Position Dimension
Salary Positionwise upload file to Employee Model.
Once al these data in BPC,
I want script logic to create salary entries in Employee Model for each employee based on their position.
I am using the below script, which is not giving the required resutls?
*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(%FIN2%,[ID],GRADE,"[ID] ='586','589','588'")
*FOR %FIN% = %FIN2%
*XDIM_MEMBERSET GRADE = %FIN%
*XDIM_MEMBERSET ACCOUNTHR = 10000000
//*XDIM_MEMBERSET EMPLOYEE = NO_EMP
*XDIM_FILTER EMPLOYEE = [EMPLOYEE].properties("GRADENO") = "%FIN%"
*XDIM_ADDMEMBERSET EMPLOYEE = NO_EMP
//*SELECT(%EMP%,[ID],EMPLOYEE,"[GRADENO] = '%FIN2%'")
*FOR %EMP% = EMPLOYEE
*WHEN EMPLOYEE
*IS NO_EMP
*WHEN GRADE
*IS %FIN%
*BEGIN
*REC(EXPRESSION = 1*([EMPLOYEE].[NO_EMP],[ACCOUNTHR].[10000000]),EMPLOYEE=%EMP%,GRADE=%FIN%)
*END
*ENDWHEN
*ENDWHEN
*NEXT
*NEXT
*COMMIT
This is the result in UJKT
I will explain you an idea, and you will do the rest yourself
You have some values stored for each grade with some dummy other members.
For each grade you want to copy this value to all employees having the property GRADENO - this grade.
Use FOR/NEXT loop to loop all required grades.
Inside loop use *RUNALLOCATION like:
*FOR %GR%=586,589,588
*XDIM_MEMBERSET ...=... //XDIM's have to be repeated in each loop
*XDIM_MEMBERSET GRADE=%GR%
*RUNALLOCATION
*FACTOR=1 //just to copy
*DIM EMPLOYEE WHAT=NO_EMP; WHERE=[GRADENO]=%GR% //where by property!
...
*ENDALLOCATION
*NEXT
Vadim
Hi Vadim,
Thanks man, it worked, but error like this is coming
UJK_EXECUTION_EXCEPTION:Runtime error Could not generate the object; the class \PROGRAM=
So i have to reduce the size of my Allocation value or has to use your other suggested solution of RUNLOGIC_PH BADI.
Need your expert advice in this too.
I need to update the Below record from
CHANGE_LEDGER | EMPLOYEE | LOCATION | PROJECT | RPTCURRENCY | VERSION | TIME | COSTCENTRE | ACCOUNTHR | GRADE | SIGNEDDATA |
CL_159 | NO_EMP | LO_NONE | PJ_NONE | LC | VE_ACTUAL | 2016.INPUT | CC_NONE | 10000000 | 586 | 170250 |
CL_159 | NO_EMP | LO_NONE | PJ_NONE | LC | VE_ACTUAL | 2016.INPUT | CC_NONE | 10000000 | 587 | 199301 |
To this entry
CHANGE_LEDGER | EMPLOYEE | LOCATION | PROJECT | RPTCURRENCY | VERSION | TIME | COSTCENTRE | ACCOUNTHR | GRADE | SIGNEDDATA |
CL_159 | 10000179 | LO_NONE | PJ_NONE | LC | VE_ACTUAL | 2016.INPUT | 749 | 10000000 | 586 | 170250 |
CL_159 | 10002853 | LO_NONE | PJ_NONE | LC | VE_ACTUAL | 2016.INPUT | 748 | 10000000 | 587 | 199301 |
With Run Allocation logic i have succsfully got employee record.
Now to update the cost centre, is there any way we can update in same Run Allocation.
I have used below logic which is not working and giving below records.
Script Used to update Cost center as per employee master data
*XDIM_MEMBERSET CHANGE_LEDGER = CL_159
*XDIM_MEMBERSET LOCATION = LO_NONE
*XDIM_MEMBERSET PROJECT = PJ_NONE
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET TIME = 2016.INPUT
*XDIM_MEMBERSET VERSION = VE_ACTUAL
*XDIM_MEMBERSET ACCOUNTHR = 10000000
*WHEN EMPLOYEE
*IS *
*WHEN GRADE
*IS *
*WHEN COSTCENTRE
*IS CC_NONE
*REC(FACTOR = 0, COSTCENTRE = "CC_NONE")
*REC(FACTOR = 1, COSTCENTRE = EMPLOYEE.COSTCENTER)
*ENDWHEN
*ENDWHEN
*ENDWHEN
*COMMIT
Can we use
*DIM COSTCENTRE WHAT CC_NONE WHERE [ID] = "[EMPLOYEE].[COSTCENTER]
or
the way i am updating the data is correct?
Regards,
Tej
User | Count |
---|---|
5 | |
5 | |
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.