Project and Portfolio Management Practitioners Forum
cancel

Working days and calendar in BBDD PPM 8.02

Highlighted
mvillalobos
Super Contributor.

Working days and calendar in BBDD PPM 8.02

Hello

 

I am trying to create an execution workflow step (PL/SQL) to know how much days a proyect is suspended (working days)

 

I am loking for the calendar KDRV_CALENDAREXCEPTIONS but the spanish calendar does not appear.

 

PPM has de spanish calendar so do you know where i will find the working days (from my calendar)?

 

thank you very much

2 REPLIES
DirkRehmeier
Valued Contributor.

Re: Working days and calendar in BBDD PPM 8.02

Try to use the procedure KRSC_ASSIGNMENT_UTILS.calc_working_days.

 

Regards

 

Dirk

 

  -------------------------------------------------------------------
  -- Utility procedure to calculate information about working days for a given
  -- resource calendar. This procedure takes:
  --   p_start_date, p_end_date: normally these are the plan or actual start and
  --                             end timestamps for a work item.
  --   p_user_id: the user_ID of the user who's resource calendar should be
  --              consulted (most likely the resource to whom the work item is
  --              assigned).
  --              If p_user_id = 0, then check p_regional_calendar to be used
  --              If p_user_id IS NULL, then no calendar will be used and every day
  --              will be considered a working day. (This is used when the both the
  --              resource and base calendars have no working days between the
  --              start and end dates.)
  --   p_regional_calendar: if p_user_id = 0, this is the regional calendar to be used
  --              in calculating the workdays.  If this is 0, system default will be used.
  -- Returned values are:
  --   o_workdays: the total number of workdays between the start and end dates,
  --               for the user's resource calendar.
  --   o_start_day_fraction: the fraction of a full working day that was worked
  --                         on the start date (e.g. if the work item started at
  --                         1:30 pm on the start date, then the start day
  --                         fraction would be 0.45, for a 10-hour workday ending
  --                         at 6:00 pm).
  --   o_end_day_fraction: the fraction of a full working day that was worked on
  --                       the end date (e.g. if the work item ended at 1:30 pm
  --                       on the end date, then the end day fraction would be
  --                       0.55, for a 10-hour workday ending at 6:00 pm).
  -------------------------------------------------------------------
  PROCEDURE calc_working_days
  -------------------------------------------------------------------
  (p_start_date                  IN DATE,
   p_end_date                    IN DATE,
   p_user_id                     IN NUMBER, -- 0 means looking into system calendar, null means no calendar
   p_regional_cal_id             IN NUMBER,
   p_usr_dbg                     IN NUMBER,
   o_workdays                    OUT NUMBER,
   o_start_day_fraction          OUT NUMBER,
   o_end_day_fraction            OUT NUMBER)


Celil
Acclaimed Contributor.

Re: Working days and calendar in BBDD PPM 8.02

Hi mvillalobos,

 

Please check enclosed screenshot. There are calendar  tables.

 

If it work for you please inform us and click solved & kudos. 

 

 

 

Celil

IT Governance Professional
& PPM Solution Architect