GetNextPreviousSuper

Get Next/Previous Supervisor

Minor Business Rule

Object Name: N0500321

Parent DLL: CFND

Location: Client/Server

Language: NER

Functional Description
The purpose of this business function is to get the next or previous supervisor of an employee.  A flag will be used to specify if the next or previous 
supervisor is desired.  The current supervisor level will need to be passed in to get the next or previous.  If no level is passed in the level one supervisor will be 

passed back.  If no supervisor is found an error code will be passed back.


SetUp Notes

Technical Specifications


Parameters

Data ItemRequiredI/ODescription
AN8YIEmployee Address Number
ANPANOSupervisor

LVLENI/OCurrent Supervisor Level

EV01NOError field - if no supervisor then a '1' is passed back

EV01NINext/Previous - Set equal to 'N' for next 'P' for previous


Related Tables 


Table Table Description
F05840Employee/Supervisor Relationship Level


Processing 
Fetch records from F05840 in the following ways:
If level is blank then and Next/Previous <> N then set level = 1 and fetch the first record with delete field =1

If Level is not blank and Next/Previous is blank then fetch the record using AN8 passed in, Delete Field = '1', and Level = Level.

If Level is not blank and Next/Previous = 'N' then fetch the record using AN8 passed in, Delete Field = '1', and Level = Level +'1'.

If Level is not blank and Next/Previous = 'P' then fetch the record using AN8 passed in, Delete Field = '1', and Level = Level -'1'.

If a record is found then pass back all data to the calling application.  If a record is not found then pass back a '1' in the error field.






Data Structure

D0500321 - Get Next/Previous Supervisor

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAddressNumberAN8MATH_NUMERICREQINPUT

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnSupervisorANPAMATH_NUMERICOPTOUTPUT

The address book number of the supervisor.

nLevelInRelationToEmployeeLVELintegerOPTBOTH

The number of organizational levels between an employee and a higher level supervisor. An employee's direct supervisor would be a 
level 1 relationship.

cErrorFieldEV01charOPTOUTPUT

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

cNextPreviousEV01charOPTINPUT

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

Related Functions

None

Related Tables

None