Conditional style on sales order

SUGGESTED

Hello everyone, i'm trying to set up a conditional style on sales order so when the total stock is less than the order qty, glows yellow. I tried a few ways but don't work, i think the next line should be correct but it's not working.

[M:SOH4]QTY(NBLIG-1)>[M:SAR2]TOTSTO 

How should i do it?

Thanks in advance.

  • 0
    SUGGESTED

    Sales order does not have a field in the screen containing total stock available, that's why you do not see anything.

    Nevertheless, why not to use the shortage field as this field shows exactly the figure you need, meaning, the difference between ordered and stock quantity?

  • 0 in reply to G@G

    Hi, thank you.

    The reason i was trying to do it with total stock is because let's say we have 100un of one product, and we have 3 sales orders with a qty of 40 for everyone, this way we could know if we have more units assigned to orders than total stock and we can decide which order goes first.

    Can it be done with the shortage field? (In this case, how is this field named)

    Thank you very much sir.

  • 0 in reply to IT CCSA
    SUGGESTED

    Did you consider using the Planning workbench for listing the sales order lines on the same product and chose the correct ones to allocate?

    In this function, you have all the information you need plus sales order line with a shortage are already identified in pink, so you have nothing to do.

  • 0 in reply to Julien Patureau

    In this case it has to be checked by product right?

    I don't know if this would work, the people who make the orders want an indicator on the sales order screen so they don't have to check one by one.

    Thank you.

  • 0 in reply to IT CCSA
    SUGGESTED

    Yes, the check is done per sales order line but this would allow them to list all lines on all sales order with a shortage which seems appropriate in your context.

    The allocations by product is as well an excellent function to decide which sales order line will get the stock (FUNMANALL).

    But of course a conditional style is possible on the line level. The shortage field is SHTQTY in the table SORDERQ (you need to ensure to try to allocate first).

    If you wish to evaluate quickly the current stock available, I can advise using the table ITMMVT and apply a formula as follow PHYSTO - PHYALL - GLOALL (if managing global allocation)