hello all
can anybody tell me please whats wrong with this code im getting an error of record not found
Dim vSession As New xapiSession
Dim vBOMHeader, vBOMDetail As New xapiView
Dim HeaderFields, DetailFields As xapiFields
vSession.Open "blah", "blah", "blah", Now, 0
Set vBOMHeader = vSession.OpenView("IC0200", "IC"
Set vBOMDetail = vSession.OpenView("IC0190", "IC"
Set HeaderFields = vBOMHeader.Fields
Set DetailFields = vBOMDetail.Fields
vBOMHeader.Compose vBOMDetail
vBOMDetail.Compose vBOMHeader
vBOMHeader.Init
HeaderFields("ITEMNO".PutWithoutVerification ("blah"
HeaderFields("BOMNO".PutWithoutVerification ("1"
HeaderFields("REMARK".PutWithoutVerification ("blah"
HeaderFields("FIXEDCOST".PutWithoutVerification ("1"
HeaderFields("BUILDQTY".PutWithoutVerification ("1"
HeaderFields("UNIT".PutWithoutVerification ("blah"
HeaderFields("VARBLCOST".PutWithoutVerification ("1"
For i = 0 To blah
vBOMDetail.Init
DetailFields("ITEMNO".PutWithoutVerification ("blah"
DetailFields("BOMNO".PutWithoutVerification ("1"
DetailFields("LINENO".PutWithoutVerification (i)
DetailFields("COMPONENT".PutWithoutVerification ("blah"
DetailFields("QTY".PutWithoutVerification ("1"
DetailFields("UNIT".PutWithoutVerification ("blah"
DetailFields("UNITCOST".PutWithoutVerification ("1"
vBOMDetail.Insert 'the error is here
Next
vBOMHeader.Insert
vBOMDetail.Cancel
vBOMHeader.Cancel
vBOMHeader.Close
vBOMDetail.Close
vSession.Close
can anybody tell me please whats wrong with this code im getting an error of record not found
Dim vSession As New xapiSession
Dim vBOMHeader, vBOMDetail As New xapiView
Dim HeaderFields, DetailFields As xapiFields
vSession.Open "blah", "blah", "blah", Now, 0
Set vBOMHeader = vSession.OpenView("IC0200", "IC"
Set vBOMDetail = vSession.OpenView("IC0190", "IC"
Set HeaderFields = vBOMHeader.Fields
Set DetailFields = vBOMDetail.Fields
vBOMHeader.Compose vBOMDetail
vBOMDetail.Compose vBOMHeader
vBOMHeader.Init
HeaderFields("ITEMNO".PutWithoutVerification ("blah"
HeaderFields("BOMNO".PutWithoutVerification ("1"
HeaderFields("REMARK".PutWithoutVerification ("blah"
HeaderFields("FIXEDCOST".PutWithoutVerification ("1"
HeaderFields("BUILDQTY".PutWithoutVerification ("1"
HeaderFields("UNIT".PutWithoutVerification ("blah"
HeaderFields("VARBLCOST".PutWithoutVerification ("1"
For i = 0 To blah
vBOMDetail.Init
DetailFields("ITEMNO".PutWithoutVerification ("blah"
DetailFields("BOMNO".PutWithoutVerification ("1"
DetailFields("LINENO".PutWithoutVerification (i)
DetailFields("COMPONENT".PutWithoutVerification ("blah"
DetailFields("QTY".PutWithoutVerification ("1"
DetailFields("UNIT".PutWithoutVerification ("blah"
DetailFields("UNITCOST".PutWithoutVerification ("1"
vBOMDetail.Insert 'the error is here
Next
vBOMHeader.Insert
vBOMDetail.Cancel
vBOMHeader.Cancel
vBOMHeader.Close
vBOMDetail.Close
vSession.Close