Hi
I am having difficulty writing the script to import a monthly budget hourly rate into each day of the month.
The data i have is:
Division,CostCentre,JobType,Month,Value
010,1103,RN,2019-07,72.89
010,1103,RN,2019-08,68.86
I need the 72.89 for July to be posted against each day of july in another cube the 68.86 into each day of august and so on.
I have written the below but no data is being imported?
sTarget_Version = pTargetVersion;
sTarget_Division = vDivision;
sTarget_Cost_Centre = vCostCentre;
sTarget_Division_CostCentre = vDivision_CostCentre;
sTarget_JobType = vJobType;
sTarget_HourType = 'NA';
sTarget_Month = vMonth;
vDayCountMax = ElementComponentCount('gbl.Date',' ', vMonth);
vDayCount = 1;
IF(vDayCount<10);
sTarget_Date=vMonth|'-0'|STR (vDayCount,1,0);
ELSE;
sTarget_Date=vMonth|'-'|STR (vDayCount,2,0);
ENDIF;
While (vDayCount <= vDayCountMax);
CellPutN(Value, sTargetCube, sTarget_Version, sTarget_Division, sTarget_Cost_Centre, sTarget_Division_CostCentre, sTarget_JobType, sTarget_HourType, sTarget_Date, 'LabourRate');
vDayCount = vDayCount + 1;
END;