# Customized Panes for 'xxxxxxxx' Created: 2010/03/03
# PANE:Warehouse Values
[PANE]
ADMIN ARSPENLZ 01001Warehouse Values 090settings\ADMIN_VBS_ARSPEN01.XML 000000500000ARSPEN010M000 0000 00000
[VBSCRIPT]
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
Function CustomizedPane_OnLoad()
Dim FormProps
FormProps = "
"
CustomizedPane.CodeObject.FormProperties = FormProps
End Function
Function CustomizedPane_OnRefresh()
' Specify the variables to be used when calling the business object
dim XMLOut, XMLParam, Warehouse, FormData
CustomizedPane.CodeObject.UpdateFormValues = " "
' Populate the SalesOrder variable with the refresh value
Warehouse = CustomizedPane.CodeObject.RefreshValue
if Warehouse = "" then
exit function
end if
' Build up the XML to be passed to the business object
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
on error resume next
' Call the business object, supplying the XML and putting the result in to XMLOut
XMLOut = CallBO("COMQEX",XMLParam,"auto")
if err then
exit function
end if
' Switch on error handling
on error goto 0
' Define the variables required for extracting the information from the DOM.
Dim XMLDoc, xList, Counter, WH, WHDesc, CurrentValue, Prev1Value, Prev2Value
' 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 xlist = XMLDoc.SelectNodes("//WarehouseItem")
' Loop through each MaterialPosting section
For counter = 0 To xlist.length - 1
' Check only extract information for current warehouse
If xlist(counter).SelectSingleNode("Warehouse").Text = Warehouse then
' Populate the values for the fields
WH = xlist(counter).SelectSingleNode("Warehouse").Text
WHDesc = xlist(counter).SelectSingleNode("Description").Text
CurrentValue = xlist(counter).SelectSingleNode("WarehouseValueCur").Text
Prev1Value = xlist(counter).SelectSingleNode("WarehouseValuePrev1").Text
Prev2Value = xlist(counter).SelectSingleNode("WarehouseValuePrev2").Text
End If
Next
FormData = ""
CustomizedPane.CodeObject.UpdateFormValues = FormData
End Function