on 07-08-2015 8:33 PM
Hello Exports,
Previously with Applet SPC we used method "saveSPCAsCSVFile" to download the SPC results as CSV file but the same method doesn't work with i5SPC.
Please advise if there is any other method probably something new is introduced in i5 SPC to achieve the same, I have tried searching and looking at different methods with not much luck.
Regards,
Adarsh Sidnoor
Hi Adarsh,
I guess there is no direct method available as such in i5SPC chart as per the SAP MII help.
i5SPCChart Methods - SAP Manufacturing Integration and Intelligence - SAP Library
However, you can give a try with the below code snippet -
//Declare the chart object
var oChart = new com.sap.xmii.chart.hchart.i5SPCChart("SaiVellanki/i5SPCChart_Display", "SaiVellanki/i5SPC_Query");
oChart.setChartWidth("640px");
oChart.setChartHeight("400px");
oChart.getChartTemplateObject().setProperty("ID","i5SPCChartSample");
oChart.draw("div1");
//Save SPC results in CSV
var B = com.sap.xmii.common.util.MIIi5Util.initializeCommonPropertiesForDataExport(oChart,true);
if(com.sap.xmii.common.util.MIIi5Util.isNullOrEmpty(oChart.getChartObject().getNumberFormat())){
B[com.sap.xmii.common.util.DateTimeConstants.NUMBER_FORMAT]="0.00"
}
else{
B[com.sap.xmii.common.util.DateTimeConstants.NUMBER_FORMAT]=oChart.getChartObject().getNumberFormat()
}
var C = com.sap.xmii.common.util.Modes.QT_CSV_MODE;
var A = com.sap.xmii.common.util.GenericConstants.I5SPCSERVICE_URL+"&"+com.sap.xmii.common.util.QueryConstants.QUERY_TEMPLATE+"="+oChart.queryTemplate.getQueryObject().getQueryTemplateName()+"&"+com.sap.xmii.common.util.GenericConstants.DISPLAY_TEMPLATE_INDICATOR+"="+oChart.getDisplayTemplate()+"&"+com.sap.xmii.common.util.GenericConstants.SHOW_SPC_RESULTS_INDICATOR+"=true&"+com.sap.xmii.common.util.GenericConstants.CONTENT_TYPE+"="+C;
com.sap.xmii.common.util.MIIi5Util.exportSPCData(A,B,C);
Regards,
Sai Vellanki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
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.