2 Replies Latest reply: Aug 22, 2017 2:15 PM by Joshua Russin RSS

    scripting help with work days

    Joshua Russin

      I had a question. I have this working, but does not account for weekends and holidays in the lead time field. Do you have any suggestions? I tried making a new column in a table with this expression


      networkdays (date([Putaway Date (Act.)]), date([ECC Posting Date]), $(vHolidays))


      but just returns 0. Here is my script.





          "PO Product",

          "Posting Date"

      FROM [lib://Data files/ZB_Putaway.xlsx]

      (ooxml, embedded labels, table is ECC);



      LOAD *,

        "Putaway Date (Act.)" - [ECC Posting Date] as [Lead Time];

      LOAD Date(ApplyMap('MappingTable', "Purchase Order" & ' ' & Product & ' ' & Batch, 'N/A')) as [ECC Posting Date],

        "PO Material",

          "Purchase Order",




          "Party Entitled to Dispose",

          "Document Category",

          "Planned Time of Goods Receipt",

          "Actual Goods Receipt Date",

          "Actual Time of Goods Receipt",

          "Planned Time of Unloading",

          "Actual Unloading Date",

          "Actual Time of Unloading",

          "Planned Time of Putaway",

          "Putaway Date (Act.)",

          "Actual Time of Putaway",

          "ERP Document",

          "ERP Document Item"

      FROM [lib://Data files/ZB_Putaway.xlsx]

      (ooxml, embedded labels, table is eWM);