This is not exactly what you're looking for but you may be able to take this BSFN and copy/modify to your needs. You give it a Begin or End Date and a number of days to go forward or backward, and a flag to Forward schedule or backward schedule and it returns a date that is "X" Business days forward or backward from the given date.
ForwardBackwardScheduleDates - B3100300
/**************************************************************************
* Notes:
* Purpose:
* This business function will forward or backward schedule
* the input date using the Work Day Calendar Table F0007.
*
* Parameters:
* Input - BranchPlant (MMCU) = Work Order Branch Plant.
* InputDate (DRQJ) = Date to be Validated.
* OutputDate (STRT) = Zeros.
* NoOfDays (LTLV) = No of Days.
* ScheduleType (WS ) = ‘F’ - Forward Schedule
* ‘B’ Backward Schedule.
*
* Output - ErrorCode (ERRC) = ‘1’ if the Date is invalid.
* = ‘0’ if the Date is valid work day.
* OutputDate (STRT) = Scheduled Date.
*
**************************************************************************/
You also may want to look at b3401340 which does what you want - but for MRP. Again it would be a matter of building your own after cloning code from this function.
FWIW,
Larry Jones
[email protected]
OneWorld XE, SP 15.1
HPUX 11, Oracle SE 8.1.6
Mfg, Distribution, Financials