This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Integrating SAP MII v12.1 with SAP ERP QM
Applies to: SAP ECC 4.6c and newer | SAP MII v12.1
For more information, visit the Manufacturing homepage.
Summary This article provides some insight on how to integrate your MII v12.1 software with the SAP ERP QM module via JCo. This will allow in-depth SPC material based inspection lot analysis for single and multiple inspections lots. This document provides both an overview of the process steps and screens along with detailed steps on how to build your content within MII and a pre-built example project of all of the content.
Author: Salvatore Castro
Company: SAP Labs, LLC
Created on: 16 June 2009
Author Bio Salvatore Castro of SAP Labs has a Bachelors Degree in Computer Engineering and a Masters Degree in Computer Science both through the Rochester Institute of Technology. He is a member of the MII Product Management group under John Schaefer and came aboard SAP through the Lighthammer acquisition.
Table of Contents Overview .........................................................................................................................................................5 Prerequisites ...................................................................................................................................................5 Process Flow...................................................................................................................................................6 Functional Architecture ...................................................................................................................................7 Notes to the Reader ........................................................................................................................................9 Result ............................................................................................................................................................10
Plant Material List .............................................................................................................................................13 Purpose.........................................................................................................................................................13 Prerequisites .................................................................................................................................................13 Process Flow.................................................................................................................................................13 Result ............................................................................................................................................................13
Open Inspection Lot List ...................................................................................................................................14 Purpose.........................................................................................................................................................14 Prerequisites .................................................................................................................................................14 Process Flow.................................................................................................................................................14 Result ............................................................................................................................................................14
Inspection Lot Result Type Selection ...............................................................................................................15 Purpose.........................................................................................................................................................15 Prerequisites .................................................................................................................................................15 Process Flow.................................................................................................................................................15 Result ............................................................................................................................................................15
Inspection Lot Detail .........................................................................................................................................16 Purpose.........................................................................................................................................................16 Prerequisites .................................................................................................................................................16 Process Flow.................................................................................................................................................16 Result ............................................................................................................................................................16
Shop Floor System Measurement Gauge ........................................................................................................17 Purpose.........................................................................................................................................................17 Prerequisites .................................................................................................................................................17 Process Flow.................................................................................................................................................17 Results ..........................................................................................................................................................17
Quality Data Staging.........................................................................................................................................18 Purpose.........................................................................................................................................................18 Prerequisites .................................................................................................................................................18 Process Flow.................................................................................................................................................18 Results ..........................................................................................................................................................19
Recording Quality Data.....................................................................................................................................20 Purpose.........................................................................................................................................................20 Prerequisites .................................................................................................................................................20 Process Flow.................................................................................................................................................20
Results ..........................................................................................................................................................20 Inspection Lot Material Analysis .......................................................................................................................21
Purpose.........................................................................................................................................................21 Prerequisites .................................................................................................................................................21 Process Flow.................................................................................................................................................21 Result ............................................................................................................................................................22
Inspection Lot Measurement Analysis..............................................................................................................23 Purpose.........................................................................................................................................................23 Prerequisites .................................................................................................................................................23 Process Flow.................................................................................................................................................23
Results .......................................................................................................................................................................23 Related Content................................................................................................................................................24 Appendix A (QM) ..............................................................................................................................................25
You use this business scenario to enable a Quality Operator interacting with ECC processes/data and plant systems process/data in a customized work process through a browser or mobile device. In this business scenario, the quality operator will be able to:
• Analyze Current Results: From a single web page the user can monitor the current quality information for a material in their plant and store additional measured values against an inspection lot.
• Enter Quality Test Results: Avoids the use of entering the information in multiple systems or screens, (e.g. LIMS and ECC). The quality operator can get the quality data from the LIMS system or a device; enter additional/manual information on the form.
• Record Results: This data is reported directly into SAP ECC. This process ensures that the quality data entered is accurate and up to date. It can also be easily monitored and flagged for a follow-up
This direct and seamless integration into the QM module from the plant floor significantly reduces the amount of overhead required to monitor the quality of your plant floor process. One can use this business scenario to improve the data integrity in your quality management module. The purpose of this document is to give the reader insight into how to properly setup a plant floor interface to the Quality Management module. All of the MII content details will be located in Appendix A & B and their respective sections which are named the same as the file name.
Prerequisites
You can implement this business scenario with different releases of the relevant application components. However, only certain combinations are valid. For more information, see:
• mySAP Solution or SAP for Industry Master Guide on SAP Service Marketplace at http://service.sap.com/instguides
• SAP MII 12.1 which runs on the SAP NetWeaver CE (v7.1.1) platform • SAP ECC
The QM Module must be implemented • Scenario & Process Component List on SAP Service Marketplace at http://service.sap.com/scl • JCo configured in MII to point to a valid SAP ECC server. • Database where a table for “Store and Forward“ of recorded QM results can be created and accessed
A valid data server connection to this database must exist in MII • A valid icon to represent a calendar object
Can download an image from http://heritageapostolic.com/images/calendar_icon.jpg or just use your own image.
Save the image in the following location SAP/BusinessScenarios/Common/Images. On the “Main Page” you will have to match the HTML image source reference to the location and name of your calendar image.
1. Plant Material List 2. Open Inspection Lost List 3. Inspection Lot Result Type Selection 4. Inspection Lot Detail 5. Shop Floor System Management Gauge 6. Quality Data Staging 7. Recording Quality Data 8. Inspection Lot Material Analysis 9. Inspection Lot Measurement Analysis
Image 4: The network configuration and layout of the systems used in the solution
It is important to note that the QM module must be implemented in the ECC system and a local database and shop floor system must be available at the plant. The database is a single table and is used in order to initially record the measured quality data. A scheduled transaction processes the entries in the table to guarantee message delivery order (The database used in this scenario was MS SQL Server but any database will work). The historian system in this scenario is used as the measured system where values are recorded from directly. Note that the SAP MII UDS is not shown in this scenario but is probably required to properly connect to the historian system. Also it is important to note that the JCo connection alias for the JCo Start Session action and the data server name used in the SQL and Tag commands and queries may be different than specified in this document depending on your system configuration. Please be sure to work out these values ahead of time with your MII administrator. The SAP ECC QM implementation can be verified by navigating to the following TCodes in SAP GUI:
These various transactions in the ECC system should allow you to search for valid data and also to verify that your implementation of this scenario is working properly.
Notes to the Reader
When reading this document and implementing the scenario there are a couple of things to keep in mind. This scenario is built as a generic implementation to write measurement values into a live QM system. It has been implemented to use the MII Simulator environment as the historian system of record for measurement values. If you choose to implement this scenario in your organization you will have to modify this solution to fit your shop floor environment and to read the proper measurement data from your historian.
Another point of interest is that in Appedix A & B of this document you will see the following value <<XML>>. This is simply a marker to indicate that the data type is XML and not what you should enter as a default value for the field.
Finally all of the information about the various BAPI fields used by this solution can be found in SAP GUI via the BAPI transaction code. This transaction code contains all of the documentation for the various standard BAPIs.
The result of this scenario is the integration of the Quality Management process on the shop floor, by simplifying the UI for the Quality operator. The operator can lookup current quality data against any material in the plant and record new results back into the ECC system. Follow-on processes for the business process scenario could be a Usage decision on the inspection lot based on the test results or production confirmation for the order. The pages developed upon completion of this scenario should look similar to these shown below:
Image 1: Main Page for the QM and Shop Floor Integration scenario
View all plants where the specified material is defined in order to simplify the process of finding your plant id in the ECC system.
Prerequisites
The operator knows a valid material id where at least one plant is defined.
Process Flow 1. Create get plants for material transaction - Open up the MII Workbench and create a project called
SAP and create the following folder structures BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/Modify and BusinessScenarios/IndustryIndependent/QMandShopFloor/ShopFloor/Modify if they don’t exist already.
Create the transaction outlined in Appendix A of this document under the “GetPlantsForMaterial” section. Save this transaction as GetPlantsForMaterial in the QM folder.
2. Create get plants for material query - Create the XacuteQuery outlined in Appendix A of this document under the “GetPlantsForMaterialXQuery” section. Save this query template as GetPlantsForMaterialXQuery in the QM folder.
3. Create get plants for material display template - Create the iBrowser Display Template outlined in Appendix A of this document under the “GetPlantsForMaterialBrowser” section. Save this display template as GetPlantsForMaterialBrowser in the QM folder.
Result
The results of this section should be a browser that when tested should look similar to this:
It takes in a single parameter from the user; the Material and displays a formatted value which is the combination of the plant description and ECC id.
View all open inspection lots for the given search criteria (Material, Plant, and Since Date) that are released for results recording but do not yet have a usage decision.
Prerequisites
QM module is implemented and managing inspection data for your material at the plant
Open inspection lot with associated operations, samples and results exists for a material in a plant.
Process Flow 1. Create get inspection lot list transaction - Open up the MII Workbench and create a project called
SAP and create the following folder structures BusinessScenarios/IndustryIndependent/QMandShopFloor/QM and BusinessScenarios/IndustryIndependent/QMandShopFloor/ShopFloor if they don’t exist already.
Create the transaction outlined in Appendix A of this document under the “GetInspectionLotListByPlantAndMaterial” section. Save this transaction as GetInspectionLotListByPlantAndMaterial in the QM folder.
2. Create get inspection lot list query - Create the XacuteQuery outlined in Appendix A of this document under the “GetInspectionLotListByPlantAndMaterialXQuery” section. Save this query template as GetInspectionLotListByPlantAndMaterialXQuery in the QM folder.
3. Create get inspection lot list display template - Create the iGrid Display Template outlined in Appendix A of this document under the “GetInspectionLotListByPlantAndMaterialGrid” section. Save this display template as GetInspectionLotListByPlantAndMaterialGrid in the QM folder.
Result
The results of this section should be a grid that when tested should look similar to this:
It takes in three parameters from the user and they are Material, Plant, and Since Date.
Purpose This step is targeted to allow the user to choose the various result types configured for the inspection lot available for each work center.
Prerequisites
Inspection Lot with associated operations, samples and results exists for a material in a plant.
Process Flow 1. Create get characteristics for inspection lot transaction - Create the transaction outlined in Appendix
A of this document under the “GetCharacteristicsForInspectionLot” section. Save this transaction as GetCharacteristicsForInspectionLot in the QM folder.
2. Create get characteristics for inspection lot query - Create the XacuteQuery outlined in Appendix A of this document under the “GetCharacteristicsForInspectionLotXQuery” section. Save this query template as GetCharacteristicsForInspectionLotXQuery in the QM folder.
3. Create get characteristics for inspection lot display template - Create the iGrid Display Template outlined in Appendix A of this document under the “GetCharacteristicsForInspectionLotGrid” section. Save this display template as GetCharacteristicsForInspectionLotGrid in the QM folder.
Result
The results of this section should be a grid that when tested should look similar to this:
The Xacute Query takes in a single parameter; the Inspection Lot
Purpose This step is targeted to show the user what has already been recorded for the selected inspection lot and result type.
Prerequisites
All of the recorded values for the selected result type (Single, Sample, or Characteristic) along with supporting detailed information about the value.
Process Flow 1. Create get inspection lot details transaction - Create the transaction outlined in Appendix A of this
document under the “GetInspectionLotDetailsByInspLot” section. Save this transaction as GetInspectionLotDetailsByInspLot in the QM folder.
2. Create get inspection lot details query - Create the XacuteQuery outlined in Appendix A of this document under the “GetInspectionLotDetailsByInspLotXQuery” section. Save this query template as GetInspectionLotDetailsByInspLotXQuery in the QM folder.
Test get inspection lot details query - Test the GetInspectionLotDetailsByInspLotXQuery multiple times with the following values for the ResultType parameter: Single, Sample, and Characteristic
3. Create get inspection lot details display template - Create the iGrid Display Template outlined in Appendix A of this document under the “GetInspectionLotCharResultsByInspLotGrid” section. Save this display template as GetInspectionLotCharResultsByInspLotGrid in the QM folder.
4. Create get inspection lot sample results display template - Create the iGrid Display Template outlined in Appendix A of this document under the “GetInspectionLotSampleResultsByInspLotGrid” section. Save this display template as GetInspectionLotSampleResultsByInspLotGrid in the QM folder.
5. Create get inspection lot single results display template - Create the iGrid Display Template outlined in Appendix A of this document under the “GetInspectionLotSingleResultsByInspLotGrid” section. Save this display template as GetInspectionLotSingleResultsByInspLotGrid in the QM folder.
Result
The results of this section should be a set of grids that when tested should look similar to this:
It takes in the following parameters, Inspection Lot, Operation, Characteristic, and Result Type. The display template will changed based on the display template in order to accommodate the different data fields that are returned based on the specified result type.
Purpose This business process is targeted to allow the operator to view and record values directly from the control system that is recorded them. This reduces the chances of human error for value recording and allows for a quick and easy to use interface for results recording into QM.
Prerequisites
A valid connection to the shop floor system which monitors quality data must be available
Process Flow 1. Create generic current query - Create the Tag Query Template outlined in Appendix B of this
document under the “GenericCurrentQuery” section. Save this query template as GenericCurrentQuery in the ShopFloor folder.
2. Create take sample from control system transaction - Create the Transaction outlined in Appendix B of this document under the “TakeSampleFromControlSystem” section. Save this transaction as TakeSampleFromControlSystem in the ShopFloor folder.
3. Create take sample from control system query - Create the Xacute Query Template outlined in Appendix B of this document under the “TakeSampleFromControlSystemXQuery” section. Save this query template as TakeSampleFromControlSystemXQuery in the ShopFloor folder.
4. Create take sample from control system display template - Create the iChart Display Template outlined in Appendix B of this document under the “TakeSampleFromControlSystemGauge” section. Save this display template as TakeSampleFromControlSystemGauge in the ShopFloor folder.
Results
The results of this section should be a gauge that when all of the various values are selected by the user, displays the current value from a Shop Floor system. The resulting Gauge should look similar to this:
This gauge takes in multiple parameters but is designed to be customizable to accommodate your specific shop floor environment. There’s currently no standard way to identify a tag since tag naming conventions vary from company to company and site to site. This is simply a suggested transaction mechanism to help you to determine how each tag will be referenced. As a result you will have to customize this component for your environment but the pieces you need to do this are provided for you.
Purpose The purpose of this is to stage values in a local plant database in order to stage data before it is sent to ECC to ensure in order processing and guaranteed delivery of data. In order to manage this database various SQL commands need to be developed for Creating and Dropping the table along with Inserting, Deleting, and Updating records. All of the SQL Commands in this section were written for MS SQL Server but can easily be adapted to work for any relational database that supports a writable JDBC connection interface.
Prerequisites
A valid MII SQL Database connection with write permissions must exist in MII.
All SQL Query templates shall be configured to use the data server where the QUALITYBUFFER table is defined and all shall be in Command Mode.
Process Flow 1. Create quality buffer database query - Create the SQL Query Template Command outlined in
Appendix B of this document under the “CreateQualityBufferDatabaseTable” section. Save this query template as CreateQualityBufferDatabaseTable in the ShopFloor/Modify folder.
2. Create drop quality buffer database query - (Optional step) Create the SQL Query Template Command outlined in Appendix B of this document under the “DropQualityBufferDatabaseTable” section. Save this query template as DropQualityBufferDatabaseTable in the ShopFloor/Modify folder.
3. Create delete quality buffer database query - Create the SQL Query Template Command outlined in Appendix B of this document under the “DeleteRecordFromQualityBufferCommand” section. Save this query template as DeleteRecordFromQualityBufferCommand in the ShopFloor/Modify folder.
4. Create insert quality buffer database query - Create the SQL Query Template Command outlined in Appendix B of this document under the “InsertRecordIntoQualityBufferCommand” section. Save this query template as InsertRecordIntoQualityBufferCommand in the ShopFloor/Modify folder.
5. Create update quality buffer database query - Create the SQL Query Template Command outlined in Appendix B of this document under the “UpdateRecordInQualityBufferCommand” section. Save this query template as UpdateRecordInQualityBufferCommand in the ShopFloor/Modify folder.
6. Execute quality buffer database query - Run the CreateQualityBufferDatabaseTable query template in order to create the QUALITYBUFFER database table.
Purpose The purpose of this is to asynchronously record quality data from the local database into the ECC QM module in order with guaranteed delivery. It also maintains the status of each message in the QUALITYBUFFER table for overview on each value recorded.
Prerequisites
The database containing the QUALITYBUFFER table has a valid connection in MII
A valid JCo connection alias exists in MII and a valid credential alias for this connection exists
Access to the MII Scheduler Editor
Process Flow 1. Create record results for characteristics transaction - Create the Transaction outlined in Appendix A
of this document under the “AsynchronouslyRecordResultsForCharacteristic” section. Save this transaction as AsynchronouslyRecordResultsForCharacteristic in the QM/Modify folder.
2. Schedule record results for characteristics transaction - Create a schedule for the AsynchronouslyRecordResultsForCharacteristic transaction which triggers the transaction execution for every 5min. The value of 5 minutes is based on how often data should be written to the ECC system and should be modified according to your business process.
Results
Data stored in the QUALITYBUFFER table to be written into QM at a specified interval along with updating the table based on success or failure of the ECC communication. Additional database interface pages can be custom developed in order to provide a front end to manage this data.
Purpose This business process is targeted to allow the operator to view previously stored measurement values against the control limits specified in the ECC QM module. This enables the quality operator to evaluate previously stored values and their associated comments for the selected inspection lot or for the specified material.
Prerequisites
Inspection Lot with associated operations, samples and results exists for a material in a plant.
Process Flow 1. Create get inspection lot SPC detail transaction - Create the Transaction outlined in Appendix A of
this document under the “GetInspectionLotSPCLevelDetailsByInspLot” section. Save this transaction as GetInspectionLotSPCLevelDetailsByInspLot in the QM folder.
2. Create get material SPC detail transaction - Create the Transaction outlined in Appendix A of this document under the “GetMaterialSPCLevelDetailsByInspLot” section. Save this transaction as GetMaterialSPCLevelDetailsByInspLot in the QM folder
3. Create get inspection lot SPC detail query - Create the Xacute Query Template outlined in Appendix A of this document under the “GetInspectionLotSPCLevelDetailsByInspLotXQuery” section. Save this query template as GetInspectionLotSPCLevelDetailsByInspLotXQuery in the QM folder.
4. Create get material SPC detail query - Create the Xacute Query Template outlined in Appendix A of this document under the “GetMaterialSPCLevelDetailsByInspLotXQuery” section. Save this query template as GetMaterialSPCLevelDetailsByInspLotXQuery in the QM folder.
5. Create get inspection lot SPC detail display template - Create the SPC Chart Display Template outlined in Appendix A of this document under the “GetInspectionLotSPCLevelDetailsByInspLotSPCChart” section. Save this display template as GetInspectionLotSPCLevelDetailsByInspLotSPCChart in the QM folder.
6. Create SPC results web page - Create the “SPC Results” web page outlined in Appendix C of this document under the “SPC Results” section. Save this web page in the WEB tab in the following path: SAP/WEB/BusinessScenarios/IndustryIndependent/QMandShopFloor
The result of this is process based on the user’s selection criteria, which will display the recorded values for SPC analysis. The web page should look similar to the image below. The SPC chart is versatile enough to handle both the single and multi-inspection lot analysis:
Purpose This business process is targeted to allow the operator to view previously stored measurement values against the control limits specified in the ECC QM module. This enables the quality operator to evaluate previously stored values and their associated comments for the selected inspection lot or for the specified material.
Prerequisites
Inspection Lot with associated operations, samples and results exists for a material in a plant.
Process Flow 1. Create inspection lot measurement analysis web page - Create the “Main Page” web page outlined
in Appendix C of this document under the “Main Page” section (Be sure to check to make sure you document is valid HTML if you copy and paste you may have extra line breaks that will have to be removed). Save this web page in the WEB tab in the following path: SAP/WEB/BusinessScenarios/IndustryIndependent/QMandShopFloor
Congratulations you have now integrated your shop floor systems to the ECC QM Module and have a working business scenario.
Results
The resulting main page that is defined for the scenario is shown above as the entry point for the application.
The following is the detailed configuration information for the GetInspectionLotListByPlantAndMaterial transaction required in this scenario.
Material and Plant are Strings, MaxRows is an Integer, OutputXML is XML, and SinceDate is a DateTime data type. For SinceDate the actual value is a XML format timestamp so the value contains a ‘T’ but when you specify this in the editor you will not see the ‘T’.
For the column Data Types set VALUE to a Double, and set SAMPLETIMESTAMP to a DateTime and set all other column data types to Strings
For the column Data Types set SAMPLETIMESTAMP to a DateTime and DEFECTS, VALSABOVE, and VALSBELOW to an Integer and set MEANVALUE, VARIANCE, MAX, and MIN to a Double and the rest of the columns should be set to String Data Type.
For the column Data Types set SAMPLETIMESTAMP to a DateTime and DEFECTS, VALSABOVE, and VALSBELOW to an Integer and set MEANVALUE, VARIANCE, MAX, and MIN to a Double and the rest of the columns should be set to String Data Type.
Set the Data Type for the VALUE, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the rest of the column Data Types to String.
Set the Data Type for the MEANVALUE, VARIANCE, MIN, MAX, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the Data Type for DEFECTS, VALSABOVE, VALSBELOW to Integer and set the rest of the column Data Types to String.
Set the Data Type for the MEANVALUE, VARIANCE, MIN, MAX, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the Data Type for DEFECTS, VALSABOVE, VALSBELOW to Integer and set the rest of the column Data Types to String.
The SinceDate is of type DateTime, MaxRows is an Integer, and the OutputXML property is of type XML and the rest are all Strings. For SinceDate the actual value is a XML format timestamp so the value contains a ‘T’ but when you specify this in the editor you will not see the ‘T’.
The ResultDetailXML property is of type XML and the rest are all Strings.
Set the Data Type for the VALUE, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the rest of the column Data Types to String.
Set the Data Type for the MEANVALUE, VARIANCE, MIN, MAX, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the Data Type for DEFECTS, VALSABOVE, VALSBELOW to Integer and set the rest of the column Data Types to String.
Set the Data Type for the MEANVALUE, VARIANCE, MIN, MAX, UPPERCONTROLLIMIT, CONTROLLIMIT, LOWERCONTROLLIMIT, UPPERSPECIFICATIONLIMIT, TARGETSPECIFICATIONLIMIT, and LOWERSPECIFICATIONLIMIT columns to Double and set the Data Type for the SAMPLETIMESTAMP column to DateTime and set the Data Type for DEFECTS, VALSABOVE, VALSBELOW to Integer and set the rest of the column Data Types to String.
Save as QMandShopFloor.irpt <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <title>Quality Management and the Shop Floor</title> <link type="text/css" rel="stylesheet" href="/XMII/CM/SAP/BusinessScenarios/Common/Stylesheets/CSS/SAP.css" /> <script language="javascript"> //////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////// // Global Variables //////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////// var strDateFormat = "MM/dd/yyyy"; // The date format defined for the sizing of the caleldar pop-up page var maxRows = "150"; // Maximum number of inspection lots returned var subGroupSize = "1"; // Set the sub group size for the SPC Chart analysis //////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////// /******************************************************************************************************************* Site specific methods, these may require modification or adjustment on a case by case basis *******************************************************************************************************************/ // When the page loads check if property values have been passed, if not set defaults and enable changing function startup() { // Check if a material is set from the users session, otherwise set it to a default material if( document.getElementById('txtMat').value == '{materialID}' ) { document.getElementById('txtMat').value = 'R-3007'; // Probably will not want this to default to this material id document.getElementById('txtMat').readOnly = false; } } // Update the gauge information so that it pulls data from the historian for sampling function updateGaugeInformation(inspLot, inspOper, inspChar, resType) { var material = document.getElementById('txtMat').value; var plant = document.getElementById('PlantList').getBrowserObject().getSelectedDatalinkValue(); var aObj = document.getElementById("CurrentValueGauge"); // Additional parameters may be required specific to your plant configuration var qObj = aObj.getQueryObject(); qObj.setParam(1, inspLot); qObj.setParam(2, inspOper); qObj.setParam(3, inspChar); qObj.setParam(4, resType); qObj.setParam(4, material); qObj.setParam(5, plant); aObj.getChartObject().setAutoRefresh(true); aObj.updateChart(true); }
/******************************************************************************************************************* Generic methods do not modify these methods they are generic for all implementations *******************************************************************************************************************/ // Date Time Picker Popup function function GetDateFromPicker(formElement) { var myDate = document.frmMain[formElement].value; if(myDate == "") myDate = "%20"; var strSize = ""; var strOptions = ""; if (strDateFormat.indexOf(":") > -1) { strSize = "&Height=188"; strOptions = "height=245,width=220"; } else { strSize = "&Height=140"; strOptions = "height=200,width=220"; } var strURL = "/XMII/CM/SAP/BusinessScenarios/Common/Utilities/GetDateTime.irpt?CurrentDate=" + myDate + "&txtInput=" + formElement + strSize; window.open(strURL, "", strOptions); } //Get the list of plants in ECC where the specified material is defined function updatePlants() { var material = document.getElementById('txtMat').value; document.getElementById("PlantList").getQueryObject().setParam(1, material); document.getElementById("PlantList").updateBrowser(true); } // Get the list of open inspection lots that fit the user specified criteria function updateInspLotList() { var material = document.getElementById('txtMat').value; var plant = document.getElementById('PlantList').getBrowserObject().getSelectedDatalinkValue(); var date = document.getElementById('txtDateTime').value; var qObj = document.getElementById("InspLotListGrid").getQueryObject(); qObj.setParam(1, material); qObj.setParam(2, plant); qObj.setParam(3, maxRows); qObj.setStartDate(date); document.getElementById("InspLotListGrid").updateGrid(true); } // Get the list of characteristics for the selected Inspection Lot function updateInspCharList() { var insplot = document.getElementById("InspLotListGrid").getGridObject().getSelectedCellValueByName("INSPLOT"); var qObj = document.getElementById("InspCharacteristics").getQueryObject().setParam(1, insplot); document.getElementById("InspCharacteristics").updateGrid(true); } // Get the detailed result information for the selected characteristic
function updateInspLotDetails() { var inspLot = document.getElementById("InspLotListGrid").getGridObject().getSelectedCellValueByName("INSPLOT"); var gObj = document.getElementById("InspCharacteristics").getGridObject(); var inspOper = gObj.getSelectedCellValueByName("INSPOPER"); var inspChar = gObj.getSelectedCellValueByName("INSPCHARACTERISTIC"); var resType = gObj.getSelectedCellValueByName("RESULTSTYPE"); var qObj = document.getElementById("InspLotDetailsGrid").getQueryObject(); qObj.setParam(1, inspLot); qObj.setParam(2, inspOper); qObj.setParam(3, inspChar); qObj.setParam(4, resType); switch(resType) { case "Single": document.getElementById("InspLotDetailsGrid").setDisplayTemplate("SAP/BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/GetInspectionLotSingleResultsByInspLotGrid"); break; case "Sample": document.getElementById("InspLotDetailsGrid").setDisplayTemplate("SAP/BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/GetInspectionLotSampleResultsByInspLotGrid"); break; case "Characteristic": document.getElementById("InspLotDetailsGrid").setDisplayTemplate("SAP/BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/GetInspectionLotCharResultsByInspLotGrid"); break; default: break; } document.getElementById("InspLotDetailsGrid").updateGrid(true); // Set the gauge information for sampling updateGaugeInformation(inspLot, inspOper, inspChar, resType); } // Write the value from the gauge into the QM module based on what's selected function storeToSAP() { var date = document.getElementById("InspLotListGrid").dateNow(); var value = document.getElementById("CurrentValueGauge").getChartObject().getYDataValueAt(1,1); var inspLot = document.getElementById("InspLotListGrid").getGridObject().getSelectedCellValueByName("INSPLOT"); var dgObj = document.getElementById("InspLotDetailsGrid").getGridObject(); var uom = dgObj.getCellValueByName(1, "UOM"); var resNum = dgObj.getSelectedCellValueByName("RESNUM"); var gObj = document.getElementById("InspCharacteristics").getGridObject(); var inspOper = gObj.getSelectedCellValueByName("INSPOPER"); var inspChar = gObj.getSelectedCellValueByName("INSPCHARACTERISTIC"); var resType = gObj.getSelectedCellValueByName("RESULTSTYPE");
var material = document.getElementById("txtMat").value; var plant = document.getElementById("PlantList").getBrowserObject().getSelectedDatalinkValue(); var comment = document.getElementById("commentArea").value; // Get the inspector based on the logged in name var inspector = document.getElementById("InspLotListGrid").getPropertyValue("IllumLoginName"); //alert("Date: "+date+" value: "+value+" InspLot: "+inspLot+" InspOper: "+inspOper+" InspChar: "+inspChar); var qObj = document.getElementById("StoreMeasuredValueToSAP").getQueryObject(); qObj.setParam(1, inspLot); qObj.setParam(2, inspOper); qObj.setParam(3, inspChar); qObj.setParam(4, material); qObj.setParam(5, date); qObj.setParam(6, inspector); qObj.setParam(7, comment); qObj.setParam(8, value); qObj.setParam(9, uom); qObj.setParam(10, resType); qObj.setParam(11, date); qObj.setParam(12, resNum); // If a result is selected in the details grid then prompt to overwrite that result, otherwise write to the next available Single result in the last Sample if(resNum != "") { if(confirm("Would you like to overwrite the selected result value in the details grid.\nWarning: Since a detail row is selected, this will overwrite the minor number result for the last Sample and necessarily the value you have selected.")) { if(document.getElementById("StoreMeasuredValueToSAP").executeCommand()) { alert("Result written successfully."); } else { alert("Error storing result to QM Buffer: " + document.getElementById("StoreMeasuredValueToSAP").getLastError()); } } else { alert("Please unselect the row in the details grid before continuing."); } } else { if(document.getElementById("StoreMeasuredValueToSAP").executeCommand()) { alert("Result written successfully."); } else { alert("Error storing result to QM Buffer: " + document.getElementById("StoreMeasuredValueToSAP").getLastError()); } } } // Build the SPC Chart URL function buildSPCURL() { var URL = ""; var gObj = document.getElementById("InspCharacteristics").getGridObject(); var inspOper = gObj.getSelectedCellValueByName("INSPOPER"); var inspChar = gObj.getSelectedCellValueByName("INSPCHARACTERISTIC");
// Get the type of results to display and define the value column for the SPC chart dynamically var resType = gObj.getSelectedCellValueByName("RESULTSTYPE"); var valueColumn = "VALUE"; if(resType != "Single") { valueColumn="MEANVALUE"; } URL = "QMandShopFloorSPC.irpt?Param2="+inspOper+"&Param3="+inspChar+"&Param4="+resType+"&ValueCol="+valueColumn+"&subGrpSze="+subGroupSize; return URL; } // Open up an SPC chart for analysis of the Inspection Lot Characteristic Details function showSPCAnalysis() { var URL = buildSPCURL(); var labelDepth = "1"; var inspLot = document.getElementById("InspLotListGrid").getGridObject().getSelectedCellValueByName("INSPLOT"); URL += "&Param1="+inspLot+"&lblDepth="+labelDepth; URL += "&QueryTempl=SAP/BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/GetInspectionLotSPCLevelDetailsByInspLotXQuery"; window.open(URL, "", "height=560,width=770,status=yes,toolbar=no,menubar=no,location=no"); } // Open up an SPC chart for analysis of multiple Inspection Lot Characteristic Details function showSPCCrossLotAnalysis() { var material = document.getElementById("txtMat").value; var plant = document.getElementById("PlantList").getBrowserObject().getSelectedDatalinkValue(); var date = document.getElementById('txtDateTime').value; var labelDepth = "3"; var URL = buildSPCURL(); URL += "&Param1="+material+"&Param5="+plant+"&Param6="+maxRows+"&SinceDate="+date+"&lblDepth="+labelDepth; URL += "&QueryTempl=SAP/BusinessScenarios/IndustryIndependent/QMandShopFloor/QM/GetMaterialSPCLevelDetailsByInspLotXQuery"; window.open(URL, "", "height=560,width=770,status=yes,toolbar=no,menubar=no,location=no"); } // Export the inspection characteristic details to CSV format function exportDetailsToCSV() { document.getElementById("InspLotDetailsGrid").saveAsCSVFile(); } </script> </head> <body onload="startup()"> <form name="frmMain"> <table cellpadding="1" cellspacing="0" border="1" id="tblMain" class="tblmain" width="770">
Save as QMandShopFloorSPC.irpt <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>SPC Inspection Lot Analysis</title> <link type="text/css" rel="stylesheet" href="/XMII/CM/SAP/BusinessScenarios/Common/Stylesheets/CSS/SAP.css" /> <script language="javascript"> // Show the user the raw data queried by the SPC chart function showRawData() { document.getElementById("SPCChart").showDetail(); } // Show the user the SPC Results Summary for the SPC chart data function showSPCResultsData() { document.getElementById("SPCChart").showStatistics(); } // Export the raw SPC data to CSV format function exportSPCDataToCSV() { document.getElementById("SPCChart").saveSPCAsCSVFile();
Save as GetDateTime.irpt, the image associated with this popup, calendar.gif, is something that you will have to create on your own. The location referenced for this icon by the project is: SAP/WEB/BusinessScenarios/Common/Images/calendar.gif <html> <head> <title>Select Date/Time</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/> <meta http-equiv="Expires" content="0"/>
} /* ------------ SAP Style Example ---------------*/ .tdHeader{ text-align: center; background-color: #FF9900; color: #ffffff; font: bold 12px verdana; padding: 4px 0px 4px 0px; border: 1px solid #000000; } /* set the formatting of the main table */ .tblMain{ border: 1px solid #000000; } /* set the formatting of the header and title */ .tdHeader{ text-align: center; background-color: #FF9900; color: #ffffff; font: bold 12px verdana; padding: 4px 0px 4px 0px; border: 1px solid #000000; } .tdHeader2{ text-align: center; background-color: #FF9900; color: #003366; font: bold 12px verdana; padding: 4px 0px 4px 0px; border: 1px solid #000000; } /* set the formatting of middle part of the table (body) where most display and user interactions will occur */ .tdBody{ background-color: #CCCCCC; } /* set the formatting of the footer where button will reside to supplement functionality */ .tdFooter{ background-color: #003366; } /* formatting for individual text cells corresponding to selection boxes, drop downs, etc */ .txtCell{ text-align: right; font: 10px verdana; color: #003366; } /* formatting for individual cells where the selection boxes, drop downs, etc are located */ .tdCellItem{ font: 10px verdana; padding-left: 4px; color: #003366; } /* formatting for individual text boxes where user types */ .txtField{ border: 1px solid #CC6600;
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.
Oracle is a registered trademark of Oracle Corporation.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.
Java is a registered trademark of Sun Microsystems, Inc.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.
All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.