PercentPositionActiveInFY

Percentage Position Active In Fiscal Year

Minor Business Rule

Object Name: N0800032

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description

This NER returns the percentage of the fiscal year a position was active.  All error conditions are returned in cErrorCode; no hard errors are generated 

SetUp Notes


Technical Specifications


Parameters


Data Item Data Structure Description I/O    Required    TableNotes
HMCU     szHomeBusinessUnit                IEither HMCU or CO is required

CO           szCompany                                IEither HMCU or CO is required

FY                      mnFiscalYear                                I

BDOWLDjdFromDate                                I

EDOWLDjdThruDate                                I

MN09A                mnPercentIn                               O

ERRC                cErrorCode                               O*see below


cErrorCode values:


0 = no errors; program processed successfully 

1 = both Home Business Unit and Company are blank  at least one is required

2 = fiscal year date pattern unavailable  error sent back from N0800030 


Related Tables 


Table Table Description





Processing 


ErrorCode = 0


if FromDate and ThruDate both = zero

PercentIn = 1

end if


if FromDate > ThruDate and ThruDate <> zero

 PecentIn = 0

end if


if PercentIn = blank

if HomeBusinessUnit is blank and Company is blank
ErrorCode = 1
else
call "fiscal year begin & end dates" NER (N0800030)

if error returned back from N0800030 

ErrorCode = 2

end if

end if

if ErrorCode = 0
if FromDate <= FYBeginDate and (ThruDate >= FYEndDate or ThruDate = blank)

PercentIn = 1

else

if FromDate < FYFromDate

FromDate = FYFromDate

end if

if ThruDate > FYThruDate or ThruDate = blank

ThruDate = FYThruDate

end if


convert FromDate and ThruDate to julian dates

convert fiscal year begin dates to julian dates


if fiscal year is a leap year

set leap year flag to true

end


DaysActive = JulianThruDate  JulianFromDate

if leap year flag is true

PercentIn = DaysActive / 366

else

PercentIn = DaysActive / 365

end if

end if

end if

end if




^

Data Structure

DN0800032 - Fiscal Year Percentage In

Parameter NameData ItemData TypeReq/OptI/O/Both
szHomeBusinessUnitHMCUcharNONENONE

The number of the business unit in which the employee generally resides.

szCompanyCOcharNONENONE

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.

szFiscalYearFYOWcharNONENONE

A four-digit number that identifies the fiscal year. You can enter a number in this field or leave the field 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, 2005, and ends September 30, 2006. The end of the first period is October 31, 2005. Specify the 
year 2005 rather than 2006.

jdFromDateBDOWLDJDEDATENONENONE

The beginning date of the range in a search. If you do not specify a beginning date, the system uses the current date.

jdThruDateEDOWLDJDEDATENONENONE

The ending date for the period that you want to review. If you leave this field blank, the system uses the ending date of the current period 
specified for the company.

mnPercentIn9MN09AMATH_NUMERICNONENONE

Generic Math Numeric - size 9

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).

jdFiscalYearBeginBDOWLDJDEDATENONENONE

The beginning date of the range in a search. If you do not specify a beginning date, the system uses the current date.

jdFiscalYearEndEDOWLDJDEDATENONENONE

The ending date for the period that you want to review. If you leave this field blank, the system uses the ending date of the current period 
specified for the company.

Related Functions

None

Related Tables

None