Necesito generar un calendario con unas actividades, pero necesito que no me agende días no hábiles, como lo son sábados, domingos y festivos, alguien sabe de algún modulo de función que me pueda hacer esto? o de que otra forma lo puedo abordar?, quedo muy agradecido,
Fijate el código que sale aca a ver si te sirve: h_tp://www.sapdev.co.uk/tips/date/date_factorydat.htm
Dice que calcula dias laborales (habiles) e ignora los sabados y domingos.
**&-------------------------------------------------------------*
*& Form ADD_WORKING_DAYS
*&-------------------------------------------------------------*
* Add n number of factory days(working days) to date
*--------------------------------------------------------------*
* <-- P_DAYS Number of days to add
* <-- P_PAYDATE Starting date
*--------------------------------------------------------------*
FORM add_working_days USING p_days
CHANGING p_paydate TYPE sy-datum.
DATA: gd_factorydat LIKE scal-facdate,
gd_resdate LIKE sy-datum.
* Convert date to factory date
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
date = p_paydate "Starting date
factory_calendar_id = 'GB'
IMPORTING
factorydate = gd_factorydat. "Factory calender date
* Add n number of days to factory date, ignors non working days
gd_factorydat = gd_factorydat + p_days.
* Convert factory date back to actual date
CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'
EXPORTING
factorydate = gd_factorydat
factory_calendar_id = 'GB'
IMPORTING
date = gd_resdate. "Actual date
p_paydate = gd_resdate.
ENDFORM. " ADD_WORKING_DAYS