cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic Question

former_member269849
Participant
0 Kudos

Hi exprets ,

I have an AST member that should be repeated over time

I did it with this script the KPI is an inputed value.

*SELECT(%LASTTID%,[TIMEID],TEMPS,ID=%TEMPS_SET%)  //get TIMEID of last upload

*SELECT(%Y%,[YEAR],TEMPS,ID=%TEMPS_SET%)   //get Year of last upload

*SELECT(%TARGET%,[ID],TEMPS,TIMEID>%LASTTID% AND YEAR=%Y% AND CALC=N)

//%TARGET% will contain remaining periods

*XDIM_MEMBERSET TEMPS=%TEMPS_SET%

*WHEN TV_COUTS_CHARGES.ACCTYPE

*IS AST

*FOR %T%=%TARGET%

*REC(EXPRESSION=%VALUE%,TEMPS=%T%)

*NEXT

*ENDWHEN

*COMMIT

and then this value should be send to another cube with destination app, the problem here is that the value that is send is just the I wrote in a the specific month not for all months .

here is the script of destination app

*DESTINATION_APP = Ressources_humaines

*SKIP_DIM =Nature

*SKIP_DIM =Famille

*RENAME_DIM TV_COUTS_CHARGES=TV_KPI_RH

*WHEN TV_COUTS_CHARGES

*IS CA002

*REC(FACTOR=1 , TV_COUTS_CHARGES = KPIRH003)

*ENDWHEN

*COMMIT

the problem here is the repeated values aren't sent to the desnation cube . how could I resolve that .

thank you .

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

You have to replicate code from the first script:

*SELECT(%LASTTID%,[TIMEID],TEMPS,ID=%TEMPS_SET%)  //get TIMEID of last upload

*SELECT(%Y%,[YEAR],TEMPS,ID=%TEMPS_SET%)   //get Year of last upload

*SELECT(%TARGET%,[ID],TEMPS,TIMEID>%LASTTID% AND YEAR=%Y% AND CALC=N)

*XDIM_MEMBERSET TEMPS=%TEMPS_SET%

*WHEN TV_COUTS_CHARGES.ACCTYPE

*IS AST

*FOR %T%=%TARGET%

*REC(EXPRESSION=%VALUE%,TEMPS=%T%)

*NEXT

*ENDWHEN

*DESTINATION_APP = Ressources_humaines

*SKIP_DIM =Nature

*SKIP_DIM =Famille

*RENAME_DIM TV_COUTS_CHARGES=TV_KPI_RH

*WHEN TV_COUTS_CHARGES

*IS CA002

*FOR %T1%=%TARGET%

*REC(EXPRESSION=%VALUE%,TEMPS=%T1%,TV_COUTS_CHARGES = KPIRH003)

*NEXT

*ENDWHEN

Vadim

former_member269849
Participant
0 Kudos

Thank you so much Vadim for your very kind help.

regards .

Fatima

Answers (0)