Automating Receive Inventory

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Automating Receive Inventory

Postby AERP_TA » Mon Jul 13, 2015 4:08 pm

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
AERP_TA
I'm new here
I'm new here
 
Posts: 4
Joined: Sat Mar 01, 2008 5:21 pm

Re: Automating Receive Inventory

Postby Mike.Sheen » Thu Jul 16, 2015 10:23 am

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.

TR-4354353.xml
Sample XML File
(39.29 KiB) Downloaded 99 times


Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Automating Receive Inventory

Postby AERP_TA » Thu Jul 16, 2015 11:00 am

Thanks Mike

Much appreciated - will let you know how I get on.

Trevor
AERP_TA
I'm new here
I'm new here
 
Posts: 4
Joined: Sat Mar 01, 2008 5:21 pm


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron