Hi All
I have searching many website to find out ACCPAC forum.
I endup found this is the best information on the webbsite.
Can anyone help me with below Auto Transfer error.
----------------------------------------------
Dim Session As ACCPACXAPILib.xapiSession
Set Session = CreateObject("ACCPAC.xapisession")
Session.Open "ADMIN", "ADMIN", "DBMS", Date, 0
Dim viewTransferHeader As ACCPACXAPILib.xapiView
Set viewTransferHeader = Session.OpenView("IC0740", "IC")
Dim TransferHeaderFields As ACCPACXAPILib.xapiFields
Set TransferHeaderFields = viewTransferHeader.Fields
Dim viewTransferDetail As ACCPACXAPILib.xapiView
Set viewTransferDetail = Session.OpenView("IC0730", "IC")
Dim TransferDetailFields As ACCPACXAPILib.xapiFields
Set TransferDetailFields = viewTransferDetail.Fields
viewTransferHeader.Init
TransferHeaderFields("TRANFENSEQ").Value = "100"
TransferHeaderFields("TRANSNUM").Value = "10"
TransferHeaderFields("HDRDESC").Value = "TEST"
TransferHeaderFields("REFERENCE").Value = "transfer"
'detail insert
viewTransferDetail.Init
TransferDetailFields("TRANFENSEQ").Value = "100"
TransferDetailFields("LINENO").Value = "100"
TransferDetailFields("ITEMNO").PutWithoutVerification "MWL6-4"
TransferDetailFields("FROMLOC").value ="P1" 'error from here
TransferDetailFields("TOLOC").Value = "P2"
TransferDetailFields("QUANTITY").Value = "12"
TransferDetailFields("QTYREQ").Value = "12"
viewTransferDetail.Insert
viewTransferHeader.Insert
MsgBox "Transfer OK"
Set viewTransferHeader = Nothing
Set TransferHeaderFields = Nothing
Set viewTransferDetail = Nothing
Set TransferDetailFields = Nothing
-----------
Thanks
Hagi
I have searching many website to find out ACCPAC forum.
I endup found this is the best information on the webbsite.
Can anyone help me with below Auto Transfer error.
----------------------------------------------
Dim Session As ACCPACXAPILib.xapiSession
Set Session = CreateObject("ACCPAC.xapisession")
Session.Open "ADMIN", "ADMIN", "DBMS", Date, 0
Dim viewTransferHeader As ACCPACXAPILib.xapiView
Set viewTransferHeader = Session.OpenView("IC0740", "IC")
Dim TransferHeaderFields As ACCPACXAPILib.xapiFields
Set TransferHeaderFields = viewTransferHeader.Fields
Dim viewTransferDetail As ACCPACXAPILib.xapiView
Set viewTransferDetail = Session.OpenView("IC0730", "IC")
Dim TransferDetailFields As ACCPACXAPILib.xapiFields
Set TransferDetailFields = viewTransferDetail.Fields
viewTransferHeader.Init
TransferHeaderFields("TRANFENSEQ").Value = "100"
TransferHeaderFields("TRANSNUM").Value = "10"
TransferHeaderFields("HDRDESC").Value = "TEST"
TransferHeaderFields("REFERENCE").Value = "transfer"
'detail insert
viewTransferDetail.Init
TransferDetailFields("TRANFENSEQ").Value = "100"
TransferDetailFields("LINENO").Value = "100"
TransferDetailFields("ITEMNO").PutWithoutVerification "MWL6-4"
TransferDetailFields("FROMLOC").value ="P1" 'error from here
TransferDetailFields("TOLOC").Value = "P2"
TransferDetailFields("QUANTITY").Value = "12"
TransferDetailFields("QTYREQ").Value = "12"
viewTransferDetail.Insert
viewTransferHeader.Insert
MsgBox "Transfer OK"
Set viewTransferHeader = Nothing
Set TransferHeaderFields = Nothing
Set viewTransferDetail = Nothing
Set TransferDetailFields = Nothing
-----------
Thanks
Hagi