ValidateDateinWorkDayCalendar

ValidateDateinWorkDayCalendar

Minor Business Rule

Object Name: B3100210

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This business function will validate that the given date is in the Work Day Calendar Table F0007 and 

return warning messages if either the calender is not setup or the date is not a valid work day.


1.2Setup Notes and Prerequisites

• None.
'b7

1.3Special Logic

None.


2.Technical Specifications


2.4Processing 


a. From the input date, get the Month ,Year and Day. Load the Month and Year into CZMT and CZYR 

respectively.

b. Try to read the Work Day Calendar table (F0007) using using CZMMCU (value as input Branch), CZYR 

and CZMTas the key. If not found, Load "*ALL" into CZMMCU and try to read the table.

c. If both attempts fail, issue the Warning message - Work day calendar not setup (No 1923).

d. If record is found , Load the day fields (CZTD01 to CZTD31) into an array.

e. If the Day is >= 1 and <= 31 and the array element [Day] is <> "W", Issue a Warning - Date is not 

a valid Work Day (No 1921).

f. If the date is not a work date ie "W", Return the previous nearest working date from the Calendar 

in the Output date.  


If  the Date is a valid Work Day in the Calendar table, the function will return '0' in the Error 

Code field otherwise it will return a '1'. The Nearest Previous Work Date will be returned in the Output 

Date.



Data Structure

D3100210 - ValidateDateinWorkDayCalendar

Parameter NameData ItemData TypeReq/OptI/O/Both
jdInputDateDRQJJDEDATENONENONE

The date that an item is scheduled to arrive or that an action is scheduled for completion.

szBranchPlantMMCUcharNONENONE

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.

jdOutputDateSTRTJDEDATENONENONE

The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine 
starts with the required date and offsets the total leadtime to calculate the appropriate start date.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

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. 

cRateScheduleFlagEV01charOPTNONE

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

Related Functions

None

Related Tables

F0007 Workday Calendar