CalculateBeginDateOfPeriod

Calculate Begin Date of Period

Minor Business Rule

Object Name: N1700090

Parent DLL: CCRIN

Location: Client/Server

Language: NER

1.1Purpose
The NER is used to calculate the Begin Date of a given fiscal period and return the End Date.


1.2Setup Notes and Prerequisites

If you leave the "RetrieveF0008Records" parameter blank, the NER will assume that you already have the F0008 information and are passing it in.


1.3Special Logic

There is a date function called "add_days".  The parameters for the function are "(date, number)".  This date function will handle how many days are in 

a month and/or if it's a leap year when adding the day.  


The BSFN also goes out to the company constants and will error if you pass in a period number that is greater than the number of periods that the 

company being processed uses.


2.4Processing 


IF RetrieveF0008Records  = 1

F0008 Get Period End Dates

Retrieves:Period 1-14 End Dates

Date Fiscal Year Begins

Necessary Inputs:

Company

Century

Fiscal Year

END IF

IF PeriodNumber = 1

PeriodBeginDate = BeginDateOfFiscalYear

PeriodEndDate = Period1EndDate

ELSE 

IF PeriodNumber = 2
          PeriodBeginDate = Period1EndDate +1 Day
PeriodEndDate = Period2EndDate

ELSE
nDate = Period10EndDate +1 Day
END IF

END IF


Data Structure

D1700090 - Calculate Begin Date of Period

Parameter NameData ItemData TypeReq/OptI/O/Both
mnPeriodNoPNMATH_NUMERICREQINPUT

A number indicating the current accounting period.  This number, used in conjunction with the Company Constants table (F0010) and the 
General Constants table (F0009), allows the user to define up to 14 accounting periods. See General Ledger Date.  The current period number 
is used to determine posted before and posted after cut off warning messages.  It is also used as the default accounting period in the 
preparation of financial reports.

cRetrieveF0008RecordsEV01charOPTNONE

1 = Retrieve F0008 Period End Dates and Begin Date of Fiscal Year.
Blank = Do not retireve F0008 Period End Dates, user will pass them in.

^

szCompanyCOcharOPTNONE

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

mnCenturyCTRYMATH_NUMERICOPTNONE

The calendar century associated with the year. Enter is the first two digits of the year. For example, 19 indicates any year beginning with 19 
(1998, 1999), 20 indicates any year beginning with 20 (2000, 2001), and so on.

mnFiscalYear1FYMATH_NUMERICOPTNONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

jdPeriodBeginDateDTEJJDEDATEOPTNONE

The Julian Date

jdBeginDateOfFiscalYearDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod1EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod2EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod3EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod4EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod5EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod6EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod7EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod8EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod9EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod10EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod11EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod12EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod13EndDateDTEJJDEDATEOPTNONE

The Julian Date

jdPeriod14EndDateDTEJJDEDATEOPTNONE

The Julian Date

cSuppressErrorMessageSUPPScharOPTNONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharOPTNONE

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.

jdPeriodEndDateDTEJJDEDATEOPTNONE

The Julian Date

Related Functions

None

Related Tables

None