VI job for PO receipt of goods - T Record Invalid or Write Failed

SUGGESTED

I've been working on a VI Import job for PO receipt of goods, serialized items.  I think I am close, but I am running into this error:  T Record Invalid or Write Failed.  I've scoured the net, Sage City, Knowledgebase for a solution but no luck.  Does anyone have any suggestions?  The data source for LotSerialNo is a one-column .csv file.  Here is the job:

Thank you for any advice you can give!

  • 0

    Does the PO exist already?  If so, you need the PO LineKey in the file to do the receipt against it.  ItemCode is not good enough.  (Import this value into the OrderLineKey column in the receipt).

    Also, "Next" only works if you have one "H" column value in your file.  (I see you have BatchNo pointing at column 50... but I'm not sure that will work).

    So... put the PO# and LineKey into the file (and remove ItemCode from your import... not needed when you have LineKey).

    Oh, and hard code a default for BatchNo.

  • 0 in reply to Kevin M

    Looking at something similar, on the batch would using the "next" operation work for batch no?  We would be importing the qty received in the import file.  The import file does not contain the SAGE item code, it would have an UDF tied to the item in the CI_Item table.  Trying to figure out how do you get line key on the import file?  Our file would be a file coming from our vendor and I would want to import the quantities received rather than going line by line and marking them received.  The PO will already be created and placed with vendor, they send a daily text file with what po's are due to arrive.

  • 0 in reply to jland47

    Do yourself a favor and ask the vendor if they can include your PO LineKey in the file they give you.  (When requesting this we typically will send the PO line data somehow, so they have the value to import into whatever system they use).

    If that's not possible, I've dealt with this by: running the text file through a VBScript that queries Sage data to get the missing value, and output a new text file, which is then used for the import.

    Then you have the problem of ensuring the receipt isn't missing any lines from the original PO.  If it is, you'll have to add those to the receipt somehow, or the back-ordered lines on the PO (after posting the receipt) won't be properly updated.

  • 0 in reply to Kevin M

    Do you have any insight on how I can start to query Sage for the import file?  I have a VBS script that will import the txt file, but lost from there.  Do you do the query in the VB script or do I need to create a link and import the PO_Details after I import the txt file then do a Power Query to perform the other functions before exporting?

  • 0 in reply to jland47

    What I've done for this kind of thing in the past (missing column in an import source file) is use a VBScript to open the source csv/txt file, loop through lines, query Sage using ODBC (in this case using PO# and ItemCode to find the correct PO LineKey) then output this additional column value, appended to the original file line data, to a new text file, then use that newly created file as the VI import data source.

    One big thing you need to watch for is missing lines.  If your import file doesn't include all PO lines, the back-ordered quantities for the missing lines will not be updated.  Should that be a possibility, skip the VBScript, import the data into a UDT, then use a Crystal Report with an outer join to merge the PO lines with the UDT data, Preview and export results (with all required columns) to text / CSV, then import from that.  (Resetting the UDT contents after each batch).

  • 0
    SUGGESTED

    Your issue is that you need the qty for the lot/serial number. You have two quantity fields in the import. One for the total quantity for that line item and the quantity for the lot/serial.

  • 0 in reply to Kevin M

    I am running through options on this and could I create the ROG entry first, not enter any qty as received so I could get the items on the ROG first, then do an export (assuming through SQL) and mark which lines are received with a quantity then import that file back in through VI?