DataSpread Java meathod

Post Reply
santu469
Posts: 9
Joined: Tue Jun 07, 2011 11:37 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

DataSpread Java meathod

Post by santu469 » Mon Mar 26, 2018 9:09 am

Hi All,

We built a excel and TI based solution for users to submit their records for spreading in our application. We process those records through Multi Threading. I am trying to achieve the same through the TI java functionality. So far I am able to trigger proportional spread using Java but Relative proportional spreads cannot be achieved that way. I see a method: ti.DataSpread(String arg0, String arg1, String arg2, double arg3, double arg4, String arg5); I am curious if any one implemented this method in Java and if it can be used to trigger Relative Proportional spread. I am not able to understand the arguments that it is expecting. I couldn't find any documentation too on this method. Any guidance will help. Here is the sample java class:

package my.scripts;

import com.ibm.cognos.tm1.javati.TM1UserThread;
import com.ibm.cognos.tm1.javati.ti.TIFunctions;

public class MyTestTI {
public static double MyTestTI(String[] args) {

TIFunctions ti = TM1UserThread.getTIFunctions();
try {
ti.DataSpread("", "", "", 0, 1460, "SpreadCube", "Elem1","Elem2","Elem3","Elem4","Elem5");
// ti.CellPutProportionalSpread(1460, "SpreadCube", "Elem1","Elem2","Elem3","Elem4","Elem5");
}
catch (Exception e)
{
ti.CellPutS(e.toString() ,"SpreadCube", "Elem1","Elem2","Elem3","Elem4","Comment"););
}
return 1;
}
}


Our goal is to provide users a interface to trigger batch spreading instead of them going to each intersection from front end and spread. We only need Proportional and Relative Proportional spread types. As I mentioned earlier, we did achieve it in a different route but had to trigger the spread through a scheduled chore and users have to wait for at least 15 min for their records to be processed.

Post Reply