# Customized Panes for 'xxxxxxxx' Created: 2009/04/09
# PANE:Work Center Summary
[PANE]
ADMIN INVPENLZ 01000Work Center Summary 020 000000500000INVPEN000M
[VBSCRIPT]
' This script contains functions for customized pane events.
' You must not modify the name of the functions.
Option Explicit
Function CustomizedPane_OnLoad()
' Specify the variable used to contain the XML that defines the listview structure
dim ListXML
' Populate the XML that defines the listview structure
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
' Hidden='true'
' Take the XML and pass it to the ListviewProperties variable
CustomizedPane.CodeObject.ListviewProperties = ListXML
End Function
Function CustomizedPane_OnRefresh()
' Specify the variables that will be used when calling the business object
dim XMLOut, XMLParam, Job
CustomizedPane.CodeObject.ListviewData = " "
' Populate the Stockcode variable with the refresh value
Job = CustomizedPane.CodeObject.RefreshValue
if Job = "" then
exit function
end if
' Build up the XML to be passed to the business object
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
on error resume next
' Call the business object, supply the XML and put the resulting XML in to XMLOut
XMLOut = CallBO("WIPQJS",XMLParam,"auto")
if err then
exit function
end if
' Switch on error handling
on error goto 0
' Define the variables required for building the new XML structure and extracting the information from
' the DOM. This is required because only lines containing a valid MLot must be displayed.
Dim NewXML, NewXMLE, xDoc, xList, xList2, Counter, Counter2, OIB, OIE, WCB, WCE, WCDB, WCDE, TRTRB, TRTRE
Dim LVRB, LVRE, VIB, VIE, OCB, OCE, OB, OE, TRTIB, TRTIE, TTB, TTE, REFB, REFE, TVB, TVE, XMLDoc, UseIncase
NewXML = ""
NewXMLE = ""
OIB = ""
OIE = ""
WCB = ""
WCE = ""
WCDB = ""
WCDE = ""
LVRB = ""
LVRE = ""
VIB = ""
VIE = ""
OCB = ""
OCE = ""
OB = ""
OE = ""
TRTRB = ""
TRTRE = ""
TRTIB = ""
TRTIE = ""
' Load the output from the business object in to the DOM
Set XMLDoc = createobject("MSXML2.DOMDocument")
XMLDoc.async = false
XMLDoc.LoadXML(XMLOut)
' Locate the OperationItem elements
Set xList2 = XMLDoc.SelectNodes("//WipStatusQuery/Job/OperationItem")
' Loop through each MaterialPosting section
For Counter2 = 0 To xList2.length - 1
' Build the new XML containing the original content of the OperationItem nodes and
' combine the two required times and the two issued times.
NewXML = NewXML & OIB
NewXML = NewXML & WCB & xList2(Counter2).SelectSingleNode("WorkCentre").Text & WCE
NewXML = NewXML & WCDB & xList2(Counter2).SelectSingleNode("WorkCentreDesc").Text & WCDE
' Combine the Runtime required with the Setup time required
Dim TotalQtyReqdRun, TotalQtyReqdSetup
TotalQtyReqdRun = CDbl(xList2(Counter2).SelectSingleNode("TotRunTimeReqd").Text) + CDbl(xList2(Counter2).SelectSingleNode("TotSetStrTrdReqd").Text)
' Combine the Runtime issued with the Setup time issued
TotalQtyReqdsetup = CDbl(xList2(Counter2).SelectSingleNode("RunTimeIssued").Text) + CDbl(xList2(Counter2).SelectSingleNode("TotSetStrTrdIss").Text)
NewXML = NewXML & TRTRB & TotalQtyReqdRun & TRTRE
NewXML = NewXML & TRTIB & TotalQtyReqdSetup & TRTIE
NewXML = NewXML & LVRB & xList2(Counter2).SelectSingleNode("LabValReqd").Text & LVRE
NewXML = NewXML & VIB & xList2(Counter2).SelectSingleNode("ValueIssued").Text & VIE
NewXML = NewXML & OCB & xList2(Counter2).SelectSingleNode("OperCompleted").Text & OCE
NewXML = NewXML & OB & xList2(Counter2).SelectSingleNode("Operation").Text & OE
NewXML = NewXML & OIE
Next
' Complete the XML by closing off the root element
NewXML = NewXML & NewXMLE
' Load the new XML file in to the ListviewData variable
CustomizedPane.CodeObject.ListviewData = NewXML
End Function