on 04-13-2006 7:31 PM
Hello there,
I'm trying to find out a function that returns the first workday of a month. Does anyone know how to do it?
I've found function 'BKK_GET_NEXT_WORKDAY' but I don't know were to find the information to fill field I_CALENDAR1.
I would apreciate any information!
Regards,
Flavia
You can do something like this.
report zrich_0001.
data: wdind(1) type c.
parameters: p_datum type sy-datum default '20060401'.
start-of-selection.
do.
call function 'DATE_CONVERT_TO_FACTORYDATE'
exporting
date = p_datum
factory_calendar_id = 'P6' " use a valid fact cal
importing
workingday_indicator = wdind
exceptions
others = 7.
if wdind = space.
write:/ 'First Working Day of Month is:', p_datum.
exit.
endif.
p_datum = p_datum + 1.
enddo.
Regards,
Rich Heilman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You were all right. I was using a wrong Calendar code.
Regards,
Flavia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rich,
Thanks for your help!
I think that your example is not working, the condition "if wdind = space" seems always to be true, even to dates like 20061225.
Regards,
Flavia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.