If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

TurboIntegrator Process to import same monthly data into each day of month

Started by e260956, 19 Apr 2020 08:13:08 AM

Previous topic - Next topic

e260956

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;

OliverS

What does the log file say if you add this

ASCIIOutput( 'C:\test.txt', vMonth, sTarget_Date, str(vDayCount) );

i think your vMonth or sTarget_Date is wrong.

AJAYC

In the dimension, in the second cube which contains the days of each month, insert a consolidation called "2019-07" and place each day under it.

Then in your TI when you read the "2019-07" column, you can call out and retrieve each child from the new consolidation node and load the data to each within a WHILE loop

Use the ELCOMPN('Dimension_Name','2019-07') to tell you how many children there are, and this will be the maximum count through the loop

Ajay