DeletePositionRecordsandAssoc

DeletePositionRecordsandAssociated

Minor Business Rule

Object Name: N0800048

Parent DLL: CHRM

Location: Client/Server

Language: NER

Functional Description
This NER is used to determine if a given position can be deleted. If the Verify flag is set to '1' 

and the record is a valid candidate for deletion, the NER will delete the record from F08101 (Position 

Master) and the assocaited records from F081012 (Position Accounts).

To determine if the record is a valid candidate for deletion, the following tests are performed:

-Test if the position record is for a future fiscal year. If so, allow deletion.

-If not for a future fiscal year, check if there is any position activity for that fiscal year in the 

F08111 file. If there is activity, do not allow the deletion.


SetUp Notes


Technical Specifications


Parameters


DataData Structure Desc.I/ONotes

Item

FYmnFiscal YearIRequired input field

HMCUszHome Cost CenterIRequired input field

POSszPosition IDIRequired input field

EV01cError Flag0Returns error code

EV01cVerify FlagISet to '1' to delete

records if not the NER

only verifies if the

record is a canidate

for deletion


Error Flag values:Equivilant Error


0 - No Errors

1 - Delete Invalid - Outstanding Activity2937

2 - Company record could not be read0024

3 - Unable to retrieve fiscal date pattern0168

4 - Fiscal Year is not numeric2297

5 - Home Business Unit could not be read2017


Related Tables


F0006Business Unit Master

F0008Date Fiscal Patterns

F0010Company Constants

F08101Position Master Information

F081012Position Accounts

F08111Position Budget Detail


Processing


BF Error = 0


Convert BF FiscalYear to full numeric value (VA CenturyYear)

If conversion was unsuccessful,

BF Error = 4

Endif


Fetch VA Company from F0006 based on BF HomeBusinessUnit

If fetch was unsuccessful,

BF Error = 5

Endif


If BF Error = 0

Fetch VA FiscalPattern and date from F0010 based on

VA Company

If fetch was unsuccessful,

BF Error = 2

Endif

Endif


If BF Error = 0

Get current year, VA YearToday

Select F0008 with matching VA FiscalPattern

While F0008 Year <> VA YearToday

Get next F0008 record

EndWhile

If no match found,

BF Error = 3

Endif

Endif


If BF Error = 0

If VA CenturyYear > F0008 Year (if attempting to delete 

a future record)

If BF Verify = 1

Delete from F08101 and F081012

Endif

Else (if attempting to delete current or past record)

Search for position activity in F08111

If no activity found

If BF Verify = 1

Delete from F08101 and F081012

Endif

Else (activity found)

Check dates of activity

If dates of activity allow deletion

If BF Verify = 1

Delete from F08101 and F081012

Endif

Else

BF Error = 1

Endif

Endif

Endif

Endif

Data Structure

DN0800048 - DeletePositionRecordsandAssociated

Parameter NameData ItemData TypeReq/OptI/O/Both
mnFiscalYear1FYMATH_NUMERICNONENONE

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.

szCostCenterHomeHMCUcharNONENONE

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

szPositionIDPOScharNONENONE

A code that you use for budgetary (position) control purposes. The position ID consists of:   o  Position (position code and its description)     
o  Fiscal year     o  Home business unit  For example, you can identify position A0-1 as Accounting Manager for fiscal year 2005-2006, for 
home business unit 41. You might choose to set up positions so that the position IDs are the same as the corresponding job IDs. Within a home 
business unit, positions appear in the alphanumeric sequence of their position IDs. For example, position A0-1 appears before position A0-2.

cErrorEV01charNONENONE

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

cVeifyEV01charNONENONE

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

Related Functions

None

Related Tables

None