# Customized Panes for 'xxxxxxxx' Created: 2010/03/03
# PANE:Supplier Purchases by Month
[PANE]
ADMIN ARSPENLZ 01001Supplier Purchases by Month 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, Supplier, FormData
CustomizedPane.CodeObject.UpdateFormValues = " "
' Populate the Supplier variable with the refresh value
Supplier = CustomizedPane.CodeObject.RefreshValue
if Supplier = "" then
exit function
end if
' Build up the XML that will be supplied to the business object
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " " & Supplier & ""
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("APSQRY",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, SupplierCode, SuppName, Purch1, Purch2, Purch3, Purch4, Purch5, Purch6, Purch7
Dim Purch8, Purch9, Purch10, Purch11, Purch12
' Load the output from the business object in to the DOM
Set XMLDoc = createobject("MSXML2.DOMDocument")
XMLDoc.async = false
XMLDoc.LoadXML(XMLOut)
' Populate the values for the fields
SuppName = XMLDoc.SelectSingleNode("//SupplierName").Text
Purch1 = XMLDoc.SelectSingleNode("//PurchValMth1").Text
Purch2 = XMLDoc.SelectSingleNode("//PurchValMth2").Text
Purch3 = XMLDoc.SelectSingleNode("//PurchValMth3").Text
Purch4 = XMLDoc.SelectSingleNode("//PurchValMth4").Text
Purch5 = XMLDoc.SelectSingleNode("//PurchValMth5").Text
Purch6 = XMLDoc.SelectSingleNode("//PurchValMth6").Text
Purch7 = XMLDoc.SelectSingleNode("//PurchValMth7").Text
Purch8 = XMLDoc.SelectSingleNode("//PurchValMth8").Text
Purch9 = XMLDoc.SelectSingleNode("//PurchValMth9").Text
Purch10 = XMLDoc.SelectSingleNode("//PurchValMth10").Text
Purch11 = XMLDoc.SelectSingleNode("//PurchValMth11").Text
Purch12 = XMLDoc.SelectSingleNode("//PurchValMth12").Text
FormData = ""
CustomizedPane.CodeObject.UpdateFormValues = FormData
End Function