Show TOC

Function documentationiSPCChart Methods Locate this document in the navigation structure

 

You can use scripting methods to return information from an SAP Manufacturing Integration and Intelligence (SAP MII) statistical process control (SPC) chart.

Features

All chart properties are accessible through get and set methods. To retrieve a chart attribute, use the get method. However, to retrieve a Boolean value, use the is method followed by the attribute name. You can define values using the set method.

The following table lists common methods to use with SPC charts:

Method

Use

deleteComment()

Deletes an existing comment from the chart.

int getLowerPointByID(String sID)

Same as int getUpperPointByID(String sID), but for the lower chart.

int getUpperPointByID(String sID)

Returns the point number for an ID in the upper chart.

For example, enter BATCH0005 as the ID, and it returns 6 as the point number.

iSPCChartComponent getChartObject()

Obtains a reference to the underlying chart display object (the iSPCChartComponent class). For more information, see iSPCChart Component Methods.

setLowerSelectedPoint(int nPoint)

Selects a point in the lower SPC chart.

setLowerSelectedPointByID(String sID)

Same as setUpperSelectedPointByID(String sID), but for the lower chart.

setUpperSelectedPoint(int nPoint)

Selects a point in the upper SPC chart.

setUpperSelectedPointByID(String sID)

Selects a point in the upper SPC chart by ID and not point number. The ID is the ID column mapping which appears in the SPC results details on the context menu.

showSPCDetail()

Opens a new screen with details of the SPC calculation data set, including raw data, in HTML.

showSPCXMLDetail()

Opens a new screen with details of the SPC calculation data set, including raw data, in XML.

updateComment()

Updates an existing comment.

void doPrint()

Displays an HTML page containing a GIF representation of the current chart that can be printed.

void saveSPCAsCSVFile()

Saves the SPC calculation data set.

void showLowerChartAlarms()

Opens the alarm window for the lower chart.

Note Note

This method is valid only for iSPC charts.

End of the note.

void showLowerChartAttributes()

Shows the attributes screen for the lower chart.

void showLowerChartComments()

Shows the comments for the lower chart.

void showLowerChartPoints()

Shows the lower chart data points.

void showSummaryStatistics()

Shows the relevant statistical calculations for the chart type.

void showUpperChartAlarms()

Opens the alarm screen for the upper chart.

Note Note

This method is valid only for iSPC charts.

End of the note.

void showUpperChartAttributes()

Shows the attribute window for the upper chart.

void showUpperChartComments()

Shows the comments for the upper chart.

void showUpperChartPoints()

Shows the upper chart data points.

void updateChart(boolean bReloadData)

Updates the chart contents. If the associated query is time-based, the refresh() method updates the start and end date based on the current time less the duration divided by the duration units. The updateChart method does not change the start and end dates.

Like all SAP MII applets, the SPC chart supports the basic applet methods. For more information, see Applet Methods.

Example

To change the subgroup size using JavaScript, use the subgroup size property, which has a data type of integer. Since subgroup size is a chart object property, you can use the applet.getChartObject method to retrieve the chart component. To set the subgroup size to five, use the set keyword in front of the property name and use the correct data type:

<iSPCChartComponent>.setSubgroupSize(5)

To retrieve the current value, the same syntax applies, except you use the get keyword:

int getSubgroupSize()

To retrieve the subgroup size into a variable within a script function, you can use the following syntax:

<varname> = <iSPCChartComponent>.getSubgroupSize()