Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting a Month End Qty from ImInvTrx file 1

Status
Not open for further replies.

njcactus

Programmer
Sep 11, 2011
1
US
I am attempting to create a Month end inventory snapshot for an Inventory management System, I am building. I am attempting to get the end of month quantity for each item in the ImInvTrx, but I am finding duplicate records, same item_no, trx_dt, trx_time, line_no, and doc_type. This is a problem, as my SQL cannot pull an quantity, unless I can specify the exact row. I can preproces the ImInvTrx, and select distinct records, but am I missing another field that will uniquely identify a record by date,time, etc.
 
This is doable, but you need to take some steps in Macola to make it easy. Do you freeze inventory at month end? If so you can get this quantity directly from the iminvloc_sql table. Alternatively, you can create beginning balance records in Macola as a part of your month end process, this creates (If I recall correctly) type H records in the iminvtrx_sql table, one per item location record.

If neither of these are practical, I'd go with your original approach but in the case of duplicates, take the record with the higher A4GLIdentity column.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
You can write a report using the IMINVTRX to get a point in time inventory. I have used the current onhand inventory, and then use the transaction history back to the cutoff date using the opposite effect to get back to the inventory at the given point in time. (subtract receipts, add back issues, ignore allocations and orders, and so on for each transaction type) I have also scheduled nightly data wharehouse ETL's of the item location file with the Item_No and Qty_On_Hand. Maybe twice there were items that would not reconcile, and ended up tracing back to a bad workstation.
 
I STRONGLY recommend the "Beginning Balance Records" as Don suggests.

If you build the reports as NEmacGuy and I have done, those records (source = 'B') AND (doc_type = 'H') provide a monthly number to reconcile against.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top