Skip to Content
0

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

Nov 07, 2016 at 09:35 AM

124

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Edmund Leung Nov 09, 2016 at 08:44 AM
0

can you show the screen with your UDF?

Share
10 |10000 characters needed characters left characters exceeded
Pradnya S Nov 09, 2016 at 01:33 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded