1.1Purpose
This NER will calculate a Period Begin Date or a Period End Date based on a date and company. 
1.2Setup Notes and Prerequisites
1.3Special Logic
2.4Processing 
//
//Check if Mode if valid
//
If Mode <> '1' and Mode <> '2' then
 If SuppressErrorMessage = Blank OR SuppressErrorMessage = Null
Endif
ErrorMessageID = 4364
 Call F0008 Get Fiscal Year Period Number
 Company -> szCompany
 Based On Date -> jdTransactionDate
 Period Number <- mnReturnPeriodNumber
 Fiscal Year <- mnReturnFiscalYear
 Century <- mnReturnCentury
 Period Number -> mnPeriodNo
 Yes -> cRetrieveF0008Records
 Company -> szCompany
 Century -> mnCentury
 Fiscal Year -> mnFiscalYear
 Date Begin <-  jdPeriodBeginDate
 UNDEFINED X jdBeginDateofFiscalYear
 UNDEFINED  X  jdPeriod1EndDate
 UNDEFINED  X  jdPeriod2EndDate
 UNDEFINED  X  jdPeriod3EndDate
 UNDEFINED  X  jdPeriod4EndDate
 UNDEFINED  X  jdPeriod5EndDate
 UNDEFINED  X  jdPeriod6EndDate
 UNDEFINED  X  jdPeriod7EndDate
 UNDEFINED  X  jdPeriod8EndDate
 UNDEFINED  X  jdPeriod9EndDate
 UNDEFINED  X  jdPeriod10EndDate
 UNDEFINED  X  jdPeriod11EndDate
 UNDEFINED  X  jdPeriod12EndDate
 UNDEFINED  X  jdPeriod13EndDate
 UNDEFINED  X  jdPeriod14EndDate
 "1" -> cSuppressErrorMesage
 ErrorMsgID <- szErrorMessageID
 Date End <- jdPeriodEndDate
 Else
 Period Date = Date End
 Endif
Else
 If SuppressErrorMessage = Blank OR SuppressErrorMessage = Null
 Set NER Error (ErrorMsgID)
 Endif
Endif
D1700920 - Calculate Period Begin Or End Date
| Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| jdBasedOnDate | DTEJ | JDEDATE | REQ | INPUT | 
| 
This is the date that is used to calculate the Period Begin Date or the Period End Date.
 | ||||
| szCompany | CO | char | REQ | INPUT | 
| A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
 | ||||
| jdPeriodDate | DTEJ | JDEDATE | OPT | NONE | 
| The Julian Date | ||||
| mnPeriodNumber | PN | MATH_NUMERIC | OPT | NONE | 
| 
Period number of the Based on Date that is returned.
 | ||||
| mnFiscalYear | FY | MATH_NUMERIC | OPT | NONE | 
| 
Fiscal Year of Based on Date that is returned.
 | ||||
| mnCentury | CTRY | MATH_NUMERIC | OPT | NONE | 
| 
Century of Based on Date that is returned.
 | ||||
| cMode | MODE | char | REQ | INPUT | 
| 
1 = Calculate Period Begin Date
 | ||||
| cSuppressErrorMessage | SUPPS | char | OPT | NONE | 
| 
1 = Suppress Error Messages
 | ||||
| szErrorMessageID | DTAI | char | OPT | NONE | 
| 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 
 | ||||
| None | 
| None |