Hello Experts,
System Details:
MII 15 SP03 Patch 4 and NW 7.4
UI 5 Software Component:
UISAPUI5_JAVA 1000.7.40.8.0.20140828175800
Development Components of SCA UISAPUI5_JAVA
ui~five : 7.4008.20140806095041.0000
sc~uisapui5_java : 7.4008.20140806095041.0000
In addition, the application is overall built using jQuery 1.10.1 and jQuery UI 1.10.3 plugins for User Interface development ( we are migrating from MII 14 to MII 15 and would like to replace the Applet SPC to UI5 SPC, the application was developed during early version of MII 14 so we did not use the built in SAPUI5 libraries)
I have created an i5SPC display template and have set the Specification limits, passed the values, setup the Alarms, variety of Color coding for different Limits and so on... basically prepared my Display template with various settings and color coding for limits.
Scenario description:
1) On First Run, the Query Template returns the resultset, the SPC is drawn perfectly fine on the screen with no issues.
2) On Second Run, this time my Query returns No data ( this is very natural that sometimes queries may not have any results) in this case the SPC shows as No Data which is also good.
3) Now on the Third Run, my query returns the results but this time SPC fails to render it properly.. it loses all the colors we had set in display template, the alarms, Colors for different specification limits etc. it loses as if previously when there was no data the SPC lost all the settings that was made on Display Template and couldn't get it back when results were returned on this third run.
I tried removing the destory method or making the Object blank etc etc.. but none made much difference... One of the solutions I am thinking of is to set all the Display Properties in code explicitly each time I draw the SPC but I think this defeats the purpose of having DisplayTemplate.
Please advise with following:
1) Am I missing any piece of code?
2) What is the correct approach of generating the SPC whenever my Inputs to Query change, Do I need to destroy the object and re-draw it or can I just update the existing object? If so please advise how to do it? ( I tried few things but no luck so decided to destroy and recreate the object)
3) Does it sound like a bug within SPC
Below are some screenshots to depict my explanation and the high level code piece used for drawing the SPC
// SelectedSPCType = 1 : X-BAR, 2: Histogram function DrawFeatureSPCChart() { SelectedSPCType = $("input:radio[name='spc_type']:checked").val(); var DisplayTemplate = "" , QueryTemplate = "<Query Template Path>"; if(SelectedSPCType === "1") { DisplayTemplate = "<Display Template Path for XBAR SPC>"; }else if(SelectedSPCType === "2") { DisplayTemplate = "Display Template Path for Histogram SPC"; } if (typeof i5spc_feature !== "undefined" && i5spc_feature !== null) { i5spc_feature.destroy(); } i5spc_feature = new com.sap.xmii.chart.hchart.i5SPCChart(DisplayTemplate, QueryTemplate); i5spc_feature.setChartWidth("500px"); i5spc_feature.setChartHeight("240px"); i5spc_feature.getQueryObject().setParameter("Param.1", Selected_OrderNo); i5spc_feature.getQueryObject().setParameter("Param.2", Selected_WorkCenter); i5spc_feature.draw("feature_spc_chart"); }
Run 1: Query Returns results and SPC is awesome
Run 2: When Query Returns NO Data, SPC says no Data
Run 3: When Query Returns results with Data after second run and we can see that SPC is white washed and lost all the display properties that was originally set.
Any advises are very much appreciated...
Regards,
Adarsh Sidnoor
Message was edited by: Adarsh Sidnoor