VerifyLengthOfTime

Verify Length of Time

Minor Business Rule

Object Name: B3100600

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will verify that the length of time is valid.  If the length is greater than four the 

additional digits will be cut off.


1.2Special Logic

Get the length of the time field passed in.  If it is equal to or less than four digits end the 

function.  If the length is greater than four the additional digits will be cut off.  If the value passed 

in is Zero (0) end the function with no error.


2.Technical Specifications


2.3Processing 


If the value passed in is Zero (0), end the function and pass back no errors.


Get the length of the time field passed in.

  

If it is equal to or less than four digits, process step 2 and 3, then end the function. 

 

If the length is greater than four,


1.If the length is 5 or 6 divide by 100 (or take off two digits).  This removes the seconds from 

the time.


2.Store the last two digits (the minutes in a work field)

Validate the value is between 0-60.  i.e. if (min >= 0) && (min <= 59)

If value is not between 0-60, copy  "0004" (Date Invalid) into DS Error Message ID.

If DS Suppress Error Messages is NOT equal to 1 jdeSetGBRError "0004".


3.Store the first digit(s) (the hours in a work field)

Validate the value is between 1-24.  i.e. if (hours >= 1) && (hours <= 24)

If value is not between 1-24, copy  "0004" (Date Invalid) into DS Error Message ID.

If DS Suppress Error Messages is NOT equal to 1 jdeSetGBRError "0004".


4.Return the value from step 1.


Data Structure

D3100600 - Verify Length of Time

Parameter NameData ItemData TypeReq/OptI/O/Both
mnTimePBTMMATH_NUMERICNONENONE

A field that is used to enter the beginning time of the operation sequence for the work center operation on the routing.

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.

Related Functions

None

Related Tables

None