Prevent Kanban of phantom part

Hi,

I have a problem where people are accidentally kanbanning in a part which is listed as a Phantom bom. I tried doing a BPM to give an error message, method directive on kanban receipts, however the Part.PhantomBOM field is not available to check.

1 Like

I’m kind of surprised the application allows a non-qty-bearing non-stock part to be put into stock. EDIT: It actually doesn’t. It just creates a MFG-STK transaction but no part ever goes on hand. I’m sure that does goofy things with the GL.

I have confirmed the same behavior, though. I think the thing that saves us is we typically don’t have operations on our phantoms so that Kanban jobs won’t process.

1 Like

I didn’t think iot would allow it either, but it did . It did not add the phantom part into stock , though it did relieve inventory of the parts in the phantom bom. So, parts just kind of disappeared…

1 Like

Most likely the value will be expensed to whatever the Part Class GL Control Code is set up for. Goofy yes, but logical for the computer…

1 Like

forgive me, i know nothing about the kanban process…
But maybe you could get the part.PhantomBOM field using a fill table by query.
Just link the current ttKanbanReceipt row to the part table by company and part.
Then use the results of that query to check and stop the submition of that kanban receipt if PhantomBOM is true.

(We also don’t have operations on phantoms, so I can’t verify this would work as intended.)

1 Like

I’d hope not! Since nothing gets dispositioned out of the job into inventory, it should only go wherever MFG-VAR is mapped to. If it’s posting to the phantom part’s part class’s mapped GL location without adding inventory, then it’s inflating inventory value.

Worth giving GL journal detail descriptions a search for that kanban job number and verifying where exactly it posted. If it’s distributing WIP value to anything but MFG-VAR, that needs a support ticket.

1 Like

It’s setup to go to Inventory on my system. I’m not super familiar with the Posting rules, but I am imagining that ours are not super customized. Only a small amount went to MFG-VAR. All the more reason to support the OP’s request to make a BPM to stop it.

This is where there are probably dueling processes in play. According to the Inventory Transaction Hierarchy, a MFG-STK transaction has a defined GL account path. The fact that this is a PhantomBOM AND NonStock AND NonQuantity Bearing part MIGHT mean that a different process takes precedence, but I’d hate to bet the ranch on it.

1 Like

Processes maybe, but the outcome should follow practice.

WIP value is dispositioned to inventory if it’s received to inventory, COGS if it’s shipped direct, or another job’s WIP if it’s a make direct component. If WIP posts to any of those when it shouldn’t, it’s artificially inflating an account related to taxable outcomes, performance metrics, and business valuation.

Ideally the “kanban” receipt process could be constrained to specific parts. But unexpected things inevitably happen and error handling needs to handle exceptions in ways that make the most sense.

@WayneH - I would do a trace and evaluate what the method that fires when you enter or change the part number in the Kanban receipts screen. When I did it, I am getting KanbanReceipts.ChangePart. I would make a post-processing on that method… Then I’d create a boolean variable in your BPM context called qtyBearing. I would then set the variable using the widget and I’d write a LINQ query such as this (corrected):

(from p in Db.Part
where p.Company == @CompanyID
&& p.PartNum == dsKanbanReceiptsRow.PartNum
select p.QtyBearing).FirstOrDefault()

Now that you’ve stored your qtyBearing variable for the given part, you can use it in a condition widget and you’d select the condition type “The specified argument/variable is equal to the true expression.”

Then I’d use a Raise Exception widget off the false side of the condition widget to display a message to the user explaining that you can’t use Kanban Receipts for parts that are not qty-bearing.

Some other thoughts:
I used qty bearing instead of phantom because all phantoms are non-qty-bearing but you also wouldn’t want to receive a non-qty-bearing anything… But you could easily pick the PhantomBOM field instead and that would be fine (you’d want to switch the side of the condition widget you hang the exception on, though).

You can also use the current plant session variable and filter to that in your PartPlant (instead of Part) table and check the QtyBearing or PhantomBOM fields there. Those are able to be set by site so if you’re running multi-site, I’d look at the PartPlant table instead of the Part table.

image

Hi,

This looks like a good idea, I ‘m not sure if I am doing this correctly, however, once I put in the fill table by query I cannot seem to access the field in the next condition statement.

Hi,
I tried doing this, my first time using linq, I keep getting errors
CS0742 A query body must end with a select clause or a group clause
CS0019 Operator ‘==’ cannot be applied to operands of type ‘string’ and ‘char’

That’s my bad. I don’t think I copied/pasted all the code. Sorry about that.

it should look like this:

(from p in Db.Part
where p.Company == @CompanyID
&& p.PartNum == dsKanbanReceiptsRow.PartNum
select p.QtyBearing).FirstOrDefault()

I’ve corrected it above also just in case someone else tries to copy/paste that they won’t have to read through additional comments to find the correct syntax.

I’d go with Dan’s approach, but fyi…

To use the “fill table by query”, the query has to put the data somewhere, so I made a variable (partTS) of type “PartTableset”.


Then I mapped the query results into the variable, which contains a Part table. I always use Bind Automatically cause it auto-maps the fields you’ve include in your query.

After that you should be able to check the value from your variable.

1 Like

Excellent, that worked -

1 Like

I haven’t tried this recently, but I absolutely recall having to create a BPM to prevent phantoms from being added to sales orders at one point in time as well.

Never underestimate the ability of an end user to do things you never expected!

1 Like

We have a report that goes out every morning that looks for a number of “oddball” things on sales orders. Phantoms is one of them. But a BPM probably wouldn’t hurt.