AERP_TA wrote:Version 6.05.13
SQL Server 2008R2
Automating Receive Inventory
Hi
Is there any functionality available in Jiwa 6 that will allow a Receive Inventory transaction to be posted using either Jiwa XML Import, Jiwa XML Queue Import or CSV Import or any other method(s) that will achieve this in V6.05.13. If there are, can you provide samples or XML samples of the file format?
Regards
TrevorA
Hi Trevor,
There is capability to import and export XML for the Receive Inventory in 06.05.13. It wasn't built into the standard form, but we did introduce a DLL to handle that. You can use that to generate the XML from an existing receival to get an idea of the structure. Our JiwaImportQManager class is aware of the this document type, so the utilities such as the JiwaXMLImport.exe will be able to import the document, as will the JiwaXMLQueueImport.
In the Form Loaded breakout, add this:
- Code: Select all
FormObject.mRecordCustom(0).Caption = "Export to XML"
FormObject.mRecordCustom(0).Visible = True
End Sub
And in the Form Custom Menu Clicked breakout, add this:
- Code: Select all
If MenuIndex = 0 Then
e_InvReceivalReturnCodeSuccess = -1
e_InvReceivalReturnCodeFailure = 0
e_InvReceivalReturnCodeClientCancelled = 1
e_InvReceivalActualRecord = 0
e_InvReceivalPriorRecord = 1
e_InvReceivalNextRecord = 2
e_InvReceivalFirstRecord = 3
e_InvReceivalLastRecord = 4
e_InvReceivalPackSlipID = 0
e_InvReceivalSlipNo = 1
Set InvReceival = CreateObject("JiwaInvReceival.clsReceival")
Set InvReceival.Database = JiwaDatabaseObject
Set InvReceival.SystemProfile = MDIParentObject.CurrentSystemProfile
If InvReceival.Setup <> e_InvReceivalReturnCodeSuccess Then
MsgBox InvReceival.ErrorString
Else
'Public Function ReadRecord(ByVal ReadMode As InvReceivalReadModes, Optional ByVal SeedType As InvReceivalSeedTypes, Optional ByVal FilterString As String = "", Optional ByVal SeedValue As String = "", Optional PerformDirtyRead As Boolean = False) As InvReceivalReturnCodes
If InvReceival.ReadRecord(e_InvReceivalActualRecord, e_InvReceivalPackSlipID, "", SlipID, False) <> e_InvReceivalReturnCodeSuccess Then
MsgBox InvReceival.ErrorString
Else
' Public Function GenerateXML(ByRef ReceivalXML As Variant, Optional ByVal SaveToDisk As Boolean, Optional ByVal FullPath As String, Optional ByVal XSLTFileName As String = "", Optional ByVal XSLTString As String = "") As InvReceivalReturnCodes
Dim XML
Dim FileName
FileName = "C:\" & SlipNo & ".xml"
If InvReceival.GenerateXML(XML, True, FileName, "", "") <> e_InvReceivalReturnCodeSuccess Then
MsgBox InvReceival.ErrorString
Else
MsgBox FileName & " Saved."
End If
End If
End If
End If
End Sub
Then close and re-open the form and under the record menu you should see an "Export to XML" menu option - select that and the currently viewed Receival slip will be saved to file. You can then view the file to examine the structure.
Attached is a sample XML file produced using the above.
Mike