Calculate Dates Biz Fnctn

MarshallB

Well Known Member
We have a small mod on our Pick Slip (R42520) where we don't want the pick slips to print until 5 days before that orders scheduled pick date. So in the pick slips detail section, init section we set a variable = today + 5, then use set user selection to say where Scheduled pick date <= variable(today + 5).
This works fine, but does not account for weekends. What I would like to be able to say is "where scheduled pick date is <= today + 5 Work Days .
There are several business functions relating to Calculate workdays, verify work day calendar etc, but of course they have no notes, and I'm not sure if they'll do what I want.
I'd appreciate if someone could steer me towards a useful function, or if you have any other ideas.
Thanks.
 
Change
"Scheduled pick date <= variable(today + 5)"
To
"Scheduled pick date <= variable(today + 7)"

This works because "Today + 5" will always include a weekend.
This is the simple fix. Its possible to take Holidays, etc into account by using standard BSFNS - but thats a bit more involved.
 
Thanks for the response, the catch is (and I should have mentioned this in the first post), they want to tighten the days. They would like to make the days 2 or 3, but without accounting for weekends, on Monday's and Tuesdays you'll have 0 or 1 days etc.
 
Hi Marshall,



I found a custom report where we do something similar. We use the "Is
Date A Work Date" function inside a while loop to find the 5th working
day from today. I've included a code snippet at the end of this email.



Ellen Deak

Senior Systems Developer

Cooper Standard Automotive

JDE EnterpriseOne (OneWorld XE Update 7 SP23_M1), AS400 DB2 V5R3M0,
Citrix Clients



=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

OBJECT: SECTION

EVENT: Initialize Section
 
Re: RE: Calculate Dates Biz Fnctn

Thanks for the help Ellen, however, I'm not able to read the code at the bottom of the post. It shows up as a series of =3D=3D over and over.
 
OK, then look at BSFN "AdvanceWorkDays" (B0000150). It does exactly what you want and its even documented!
 
Thats perfect, thanks a lot.
And documentation to boot, thats like seeing bigfoot, or an Ivory Billed woodpecker!

Thanks again.
Marshall
 
Re: RE: Calculate Dates Biz Fnctn

It sounds like you found another answer. But I'll attach the ER in case anybody else reading this thread in the future would like to see it.
 

Attachments

  • 121327-er.txt
    8.3 KB · Views: 104
Back
Top