Item Reclass posting error

nikeman77nikeman77 Member Posts: 517
hi all,

i am doing a massive (>5k records) transfer of stocks from 1 location to another, 1 bin code to another using item re-class.

but when i tried to post them got an error: item specification exists.

firstlt i export all the stocks in my ILE with remaining qty>0 out to csv file, then i re-import them into a re-class journal.

the importing into item journal was good, until i tried to post the reclass journal got item tracking issues.

it seems some item are set with item tracking code, and they are associate with some sales documents (eg: sales quote, sales line, blanket orders) already.

how do i modified the item tracking specification thingy?

Answers

  • MarkHamblinMarkHamblin Member Posts: 118
    I assume the error was "item tracking specification... exists". If so, it's probably because you have items shipped and not invoiced or received and not invoiced. The only way that should cause errors when doing item journals is if you're trying to import one of those existing serial/lot numbers (and you have "specific" tracking turned on).

    First thing to do would be to make sure you're not trying to import a serial number that exists in the item tracking specification table. If that's not the issue, you may have to debug the error and trace back to the initial data issue. (Or maybe someone else has run into this exact issue and has more insight).
  • nikeman77nikeman77 Member Posts: 517
    hi MarkHamblin,

    ACTUAL ERROR MESSAGE:
    Lot number is required for item 12345.

    When I do debugging, it goes to CU22, SplitJnlLine,
    IF NOT ItemJnlLine2.Correction THEN // Undo quantity posting.
    ERROR(Text011);
    ](*,)
  • MarkHamblinMarkHamblin Member Posts: 118
    Ah, well that's completely different then. You will need to import the lot numbers for all those items as well.

    See this post for a dataport that can import lot and serial #'s into the item journal - you'll have to make some minor changes to bring it into the reclass journal: http://www.mibuso.com/forum/viewtopic.php?f=23&t=40566
  • nikeman77nikeman77 Member Posts: 517
    well i did import the lot number into the re-class journal..
    ok got your code from the reference website>> http://www.mibuso.com/forum/viewtopic.php?f=23&t=40566 to insert into reservation entry :thumbsup: :)


    IF (codSerialNo<>'') OR (codLotNo<>'') THEN BEGIN
    IF lrecResEntry.FIND('+') THEN
    lrecResEntry."Entry No." := lrecResEntry."Entry No." + 1
    ELSE
    lrecResEntry."Entry No." := 1;

    lrecResEntry."Item No." := "Item No.";
    lrecResEntry."Reservation Status" := lrecResEntry."Reservation Status"::Prospect;
    lrecResEntry."Source Type" := DATABASE::"Item Journal Line";
    lrecResEntry."Source ID" := "Journal Template Name";
    lrecResEntry."Source Subtype" := 2;
    lrecResEntry."Source Ref. No." := "Line No.";
    lrecResEntry."Source Batch Name" := "Journal Batch Name";
    lrecResEntry."Location Code" := "Location Code";
    lrecResEntry."Qty. per Unit of Measure" := 1;
    lrecResEntry.VALIDATE("Quantity (Base)", Quantity);
    lrecResEntry.Positive := TRUE;
    lrecResEntry."Expected Receipt Date" := "Posting Date";
    lrecResEntry."Creation Date" := WORKDATE;

    lrecResEntry."Serial No." := codSerialNo;
    lrecResEntry."Lot No." := codLotNo;
    lrecResEntry."Expiration Date" := dExpiryDate;
    CASE TRUE OF
    (codSerialNo<>'') AND (codLotNo=''):
    lrecResEntry."Item Tracking" := lrecResEntry."Item Tracking"::"Serial No.";
    (codSerialNo='') AND (codLotNo<>''):
    lrecResEntry."Item Tracking" := lrecResEntry."Item Tracking"::"Lot No.";
    (codSerialNo<>'') AND (codLotNo<>''):
    lrecResEntry."Item Tracking" := lrecResEntry."Item Tracking"::"Lot and Serial No.";
    END;//case

    lrecResEntry.INSERT;
  • nikeman77nikeman77 Member Posts: 517
    hi Mark,

    i copied and modified your code into my dataport where will functions to import all items into item reclass journal.
    But when i post the similar error occured:
    "Tracking Specification is missing"
    #-o
  • MarkHamblinMarkHamblin Member Posts: 118
    Are you doing one reclass journal line for each open item ledger entry, or are you grouping quantities based on bin? And are you importing in only the bare minimum of fields required for the reclass on the item journal?

    It seems the only way you should be getting that error is if NAV is trying to split the application of the reclass line across multiple existing item ledger entries (though that shouldn't happen either, which is why I mentioned bringin in only the bare minimum fields). If you bring in one journal line per item ledger entry, it might help.

    - Mark
  • nikeman77nikeman77 Member Posts: 517
    Are you doing one reclass journal line for each open item ledger entry, or are you grouping quantities based on bin? And are you importing in only the bare minimum of fields required for the reclass on the item journal?

    It seems the only way you should be getting that error is if NAV is trying to split the application of the reclass line across multiple existing item ledger entries (though that shouldn't happen either, which is why I mentioned bringin in only the bare minimum fields). If you bring in one journal line per item ledger entry, it might help.

    - Mark

    1.Are you doing one reclass journal line for each open item ledger entry: YES
    2.And are you importing in only the bare minimum of fields required for the reclass on the item journal
    YES/NO
    field as follows:

    2.1 Journal Template Name
    2.2 Journal Batch Name
    2.3 Line No.
    2.4 Item No.
    2.5 Unit of Measure Code
    2.6 Location Code
    2.7 Entry Type
    2.8 Document No.
    2.9 Posting Date
    2.10 New Location Code
    2.11 New Bin Code
    2.12 Lot No.
    2.13 Unit Cost
    2.14 Journal Created By
    2.15 Journal Created Date
  • MarkHamblinMarkHamblin Member Posts: 118
    Last thing I can think of based on how the error is raised - do you have auto cost posting turned on or have you run the adjust cost batch?

    You may be stuck debugging the error to figure out which line is causing the issue and then trying to determine why.

    PS - another thing you could try is to replace the direct insert into the reservation entry table with a call to CreateReservationFor (can't remember the exact name right now). The direct insert approach is purposely used to override the default reservation entry processing on positive adjustments. However, for reclass entries it may not be sufficient to prepare the line for posting.
  • nikeman77nikeman77 Member Posts: 517
    do you have auto cost posting = FALSE

    You may be stuck debugging the error to figure out which line is causing the issue:
    CU22 Item Jnl.-Post Line- SplitJnlLine(VAR ItemJnlLine2 : Record "Item Journal Line";PostItemJnlLine : Boolean) : Boolean

    IF NOT ItemJnlLine2.Correction THEN // Undo quantity posting.
    ERROR(Text011);
  • MarkHamblinMarkHamblin Member Posts: 118
    Run the adjust cost entries batch to ensure all costs are adjusted and posted to G/L and try again. If that doesn't fix it, you'll probably have to debug it. By that I mean you'll need to have a look at the look at the ItemJnlLine2 record to see which line is causing the issue and possibly tracing back through the call stack to see what logic is causing the code to end up where it does.
  • nikeman77nikeman77 Member Posts: 517
    hi mark,

    hows the run costing effecting reclass journal ?
  • MarkHamblinMarkHamblin Member Posts: 118
    Costing was just a thought based on the "correction" field being evaluated in the code where the error is thrown. I'm more likely to think it's due to the way the item tracking is being created with the direct insert versus using the NAV codeunits. Easy to test this theory out - find out which line the code is failing on and manually enter the item tracking for that line and see if it still fails. If it does, use the NAV functions to create the item tracking lines. The NAV functions you will need to call (in order) are CreateReservEntryFor(), SetNewSerialLotNo(), and CreateEntry(). These are all in the "Create Reserv. Entry" codeunit.
  • nikeman77nikeman77 Member Posts: 517
    are they suppose to be calling in sequence?
    firstly call-CreateReservEntryFor()
    secondly call-SetNewSerialLotNo()
    finally the last one to call-CreateEntry()
  • MarkHamblinMarkHamblin Member Posts: 118
    Yes, call them in that order. When you set the new Serial/Lot number, use the same one(s) you use with CreateResEntryFor().
  • nikeman77nikeman77 Member Posts: 517
    MarkHamblin,
    basically i create a reservation entry and the item tracking issues was solved ! \:D/
    thanks for your help! :thumbsup: =D>
Sign In or Register to comment.