Add available stock qty columns from multiple sites

SOLVED

One of the customizations we've added to our Sales/Bid Order entry line item screens is a column showing a product's available qty at the specified site. This is working correctly, however I would like to add more columns showing available quantities at other sites. This was requested by our users as sometimes we write up Sales Orders with 50+ product lines, and so clicking through a bunch of menus to check stock is not very quick or efficient.

Here is the code we're using to show available stock. Is there a way to adapt this to refer to other site's available stock?

Subprog AV_QTY(VALEUR)
Variable Decimal VALEUR
If !clalev([ITV]) : Local File ITMMVT[ITV] : Endif
Read [ITV]ITV0 = [M:SOH4]ITMREF(nolign-1);[M:SOH4]DSTOFCY(nolign-1)


[M:SOH4]ZSTKAVAIL(nolign-1) = ([ITV]PHYSTO+[ITV]PLFPHYSTO) - ([ITV]PHYALL+[ITV]GLOALL)

Affzo [M:SOH4]ZSTKAVAIL(nolign-1)


  • +1 in reply to TritoneSub
    verified answer

    create a new read statement, but instead of saying [M:SOH4]DSTOFCY(nolign-1), say the site or you can use the filter statment

  • 0 in reply to ChrisCC

    Thanks, I worked at it some more and figured it out. Problem is the update I made only works on the full sales order entry screen. My coworker made an adapted one with unimportant fields removed he called ZSTD that isn't showing the new columns I added. I also adapted the code for the Quote entry screen (replacing [M:SOH4] with [M:SQH2] but that doesn't work either.

  • 0

    We're wanting to get the same thing shown but we're okay to have it for a single site (we're only one site). We're new to SEM so I'm a little lost as to how to get the 4GL code in. I know where to add the column for the line item, but I'm stuck as to how to get the code to run or where to put it in even? Thanks for any help you can throw this way. I have no idea why this feature isn't standard. We're coming from Sage 300 and it is a standard feature.

  • 0

    We are migrating to X3 and I am trying to include qty available as well. Can you tell me what table you added your ZSTKAVAIL UDF to? and if you linked a table with an expression?

    Thanks.

  • 0 in reply to tj9000

    We added the quantity available on site - gross and the quantity available all sites - net - to the sales order screen lines and the lookup.   I was not the programmer so don't have specifics.   The advantage on the look up screen is you can enter a search like gloves and see all of them and which one you have or can get.  On the line you have to have enterred the Item SKU before it shows of course. 

    Version 12 adds some more look ups on the line but you have to already have enterred the SKU and reached the quantity field to use them.