Error: “Could not find the first and last job information for the next operation.”


FindIssueBOM.png

This error message with label ID: @SYS134518 can be found in the WrkCtrScheduler.loadRoute method. It basically means that it could not run the planning due to an issue with the route map.

I received this error due to a missing route group on a route. This was due to bad data that was imported and would not have happened if routes where created in the application directly.

The tricky thing was that this might pop up when trying to plan an item with a large BOM structure. Somewhere in this structure lies a route that is not configured properly. But which one is it?! That would be nice to have in the error message right? So let’s fix it!

Put this code:

if(_order.tableId == tableNum("ReqTrans"))
{
    info(strFmt("Item Number: %1 in RouteID: %2 on Operation: %3", ReqTrans::findrecId(_order.recId).ItemId, reqTrans::findRecId(_order.recId).ItemRouteId, routeMap.oprNum));
}
else    
    info("Error not related to a reqTrans");

above the line:

throw error("@SYS134518");

This will then read the item, route and previous operation to the issue and you can easily mitigate it.

LOVELY!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s