Skip to Content

Querry to calculate delivery date in PO based on lead time UDF in BP master date

Dear all,

I am new to SAP Business one and query,

we have SAP installed and our suppliers have delivery lead times which we have created a UDF to put the days in.

We want to have our PO's delivery date update automatically based on the number of day a Supplier lead time is.

Can anyone help please on what query to write?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 09, 2016 at 08:44 AM

    can you show the screen with your UDF?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 09, 2016 at 01:33 PM

    Hi,

    I tried simulating your scenario on sales order.

    Created a field on form level

    entered 5 as a lead time.

    In sql tried following query

    select docdate, dateadd(d,convert(int,leadtime),docdate) from ordr where docnum = where docnum = 160000285

    in this case, if I am posting the order on 09 - November - 2016 and lead time mentioned is 5 days then delivery date would be 14 - November - 2016.

    On firing above query, the delivery date I am getting is 14 - November - 2016.

    Hope I have understood your requirement and this will help you.

    Regards

    Pradnya

    Add comment
    10|10000 characters needed characters exceeded