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
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.
D0500321 - Get Next/Previous Supervisor
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnAddressNumber | AN8 | MATH_NUMERIC | REQ | INPUT |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnSupervisor | ANPA | MATH_NUMERIC | OPT | OUTPUT |
The address book number of the supervisor. | ||||
nLevelInRelationToEmployee | LVEL | integer | OPT | BOTH |
The number of organizational levels between an employee and a higher level supervisor. An employee's direct supervisor would be a
| ||||
cErrorField | EV01 | char | OPT | OUTPUT |
An option that specifies the type of processing for an event. | ||||
cNextPrevious | EV01 | char | OPT | INPUT |
An option that specifies the type of processing for an event. |
None |
None |