[2785] in SAPr3-news

home help back first fref pref prev next nref lref last post

Re: Working Day of the Month

daemon@ATHENA.MIT.EDU (Robert L. Watson)
Thu May 8 18:37:16 1997

To: sapr3-news@MIT.EDU
Date: Thu, 08 May 1997 17:06:59 -0700
From: "Robert L. Watson" <rlwatson@amoco.com>

Robert L. Watson wrote:
> 
> I know that it's possible to schedule an SAP batch job for a particular
> working day of the month, as determined according to the calendar
> specified for the job. But I'm looking for a way to determine in an ABAP
> program the date of a specific working day of a given month. Does anyone
> know of a function to do this? Any other way? Thanks, and please mail as
> well as post any replies.
> --
> Robert L. Watson
> rlwatson@amoco.com

Evidently I posted too soon, because I found the answer myself. You can 
call function DATE_CONVERT_TO_FACTORYDATE to convert a calendar date to a 
factorydate, which is just a decimal number. To find, say, the 11th 
working day of May, pass to it 19970501. After you have the factorydate, 
add to it the number of the working day that you want, and subtract one. 
Then call FACTORYDATE_CONVERT_TO_DATE to convert the result back to a 
calendar date. It's not necessary to know how the factorydate raw number 
is derived, because you use it only as an intermediary value.
-- 
Robert L. Watson
rlwatson@amoco.com

home help back first fref pref prev next nref lref last post