GetWorkDayCalendar

Get Work Day Calendar

Major Business Rule

Object Name: B3000710

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

, 1.Functional Description

1.1Purpose

This function will retrieve the system calendar and return the values in TD01 - TD31 with the 

appropriate offset so that they may be displayed in a calendar.  The function will also only check for the 

existence of an F0007 record and return a flag without returning the values.


1.2Setup Notes and Prerequisites

The only setup required is that 37 controls need to be included within the application. These 

controls will receive the values TD01 - TD31 for each day that will make up the calendar. 


1.3Special Logic

There is no special logic within this function.


2.Technical Specifications


2.4Processing 


A.  Retrieve the Calendar using YR and MT.  


B.  Determine the Century to return.  If the Year is less than or equal to the default value of DCYR, 

then assign the Century to 20.    

     Otherwise assign the Century to 19.


C.  Determine number of days in that month (y).


D.  Determine the first day of that month (Sunday, Monday, Tuesday, etc.).


E.  Calculate ThisMonthOffset (MN09A: Sunday=0, Monday=1, etc.).


F.  Calculate NextMonthOffset (MN09A + y).


If MODE = '1' or '3' 


G.  Retrieve the F0007 (Work Day Calendar) record for the MMCU, YR, and MT, WDCT and WDCK passed in.


H.  If MODE = '3' return a 'Y' in DS RecordExists.


I.  If MODE = '1'

Do for x=1 to y (number of days in month)


1.  Put CZTD0x (Type of Day for day x) in the appropriate work field [EV0x + MN09A].


If MODE = '2'


J.  Do for x=1 to y(number of days in month)


1.  Put appropriate work field [EV0x + MN09A] into TD0x (Type of Day for day x) to be sent back 

to      application.



Data Structure

D3000710 - Get Work Day Calendar

Parameter NameData ItemData TypeReq/OptI/O/Both
szBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

mnCalendarYearYRMATH_NUMERICNONENONE

The calendar year for this calendar.

mnCalendarMonthMTMATH_NUMERICNONENONE

A number that corresponds to the month in a calendar year. 

cModeMODEcharNONENONE

The processing mode used in Purchase Order Consolidator to signify when specific orders are being processed.

cTypeOfDay01EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay02EV02charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay03EV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cTypeOfDay04EV04charNONENONE

PeopleSoft event point processing flag 04.

cTypeOfDay05EV05charNONENONE

A flag that indicates whether automatic spell check is turned on.

cTypeOfDay06EV06charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay07EV07charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay08EV08charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay09EV09charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay10EV10charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay11EV11charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay12EV12charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay13EV13charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay14EV14charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay15EV15charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay16EV16charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay17EV17charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay18EV18charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay19EV19charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay20EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay21EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay22EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay23EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay24EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay25EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay26EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay27EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay28EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay29EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay30EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay31EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay32EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay33EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay34EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay35EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay36EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDay37EV01charNONENONE

An option that specifies the type of processing for an event.

cTypeOfDayReturned01TD01charNONENONE

A code to indicate the type of day. Valid values are:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned02TD02charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned03TD03charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned04TD04charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned05TD05charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned06TD06charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned07TD07charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned08TD08charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned09TD09charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned10TD10charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned11TD11charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned12TD12charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned13TD13charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned14TD14charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned15TD15charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned16TD16charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned17TD17charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned18TD18charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned19TD19charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned20TD20charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned21TD21charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned22TD22charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned23TD23charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned24TD24charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned25TD25charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned26TD26charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned27TD27charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned28TD28charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned29TD29charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned30TD30charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

cTypeOfDayReturned31TD31charNONENONE

This indicates the type of day.  The possible day types are as follows:    W Work Day    E Weekend    H Holiday 

mnThisMonthOffsetMN09AMATH_NUMERICNONENONE

Generic Math Numeric - size 9

mnNextMonthOffsetMN09BMATH_NUMERICNONENONE

Generic Math Numeric - size 9

cSuppressErrorMessagesEV01charNONENONE

An option that specifies the type of processing for an event.

szErrorMessageIDDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cRecordExistsEV01charNONENONE

An option that specifies the type of processing for an event.

szWorkDayCalendarTypeWDCTcharOPTNONE

A user defined code (42/WD) that specifies how the calendar is used. For example, the calendar might be specific to an industry such as 
banking or it might be used to schedule delivery persons for a route.  Note: If you use the default value of *, the system updates the value to 
blank even though blank is not set up as a valid value in the UDC table.

szWorkDayCalendarKeyWDCKcharOPTNONE

A code used to classify values within a calendar type. For example, if the calendar type is ROUTE, you can enter a code that specifies a 
particular route, such as Daily or Weekend.  Note: The system does not validate the code that you enter. 

Related Functions

B9800420 Get Data Dictionary Definition

Related Tables

F0007 Workday Calendar