F3007FillupResourceUnitsCache

F3007 Fillup Resource Units Cache

Minor Business Rule

Object Name: N3003790

Parent DLL: CMFGBASE

Location: Client/Server

Language: NER

1.Functional Description

1.1Purpose
This function populates Resource Units Cache form Resource Units Table (F3007) based on the key selection.

1.2Setup Notes and Prerequisites

The calling application is responsible for loading all appropriate key values to the data structure and identifying the number of keys to use in 
retrieval/update processes.  The application must also pass the unique Job Number to create the cache (see technical specifications below).


1.3Special Logic

There is no special logic within this function.

2.Technical Specifications
2.4Processing 

1. Close F3007 (Resource Units table)

2. Open F3007 (Resource Units table)  

3. If BF Calendar Year is not equal to  And BF Calendar Month is not equal to  And BF Shift Code is not equal to  

Perform a Select on F3007 based on Branch/Plant, Work Center, Year, Month, and Shift using the index Branch/Plant,BusinessUnit,E.
    Else

If BF mnCalendarYear is not equal to  And BF mnCalendarMonth is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, Year, and Month using the index Branch/Plant,BusinessUnit,E.
Else
If BF mnCalendarMonth is not equal to  And BF cShiftCode is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, Month, and Shift using the index 
Branch/Plant,BusinessUnit,F.


Else

If BF cShiftCode is not equal to  And BF mnCalendarYear is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, Year, and Shift using the index 
Branch/Plant,BusinessUnit,G.

Else
If BF mnCalendarYear is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, and Year using the index 
Branch/Plant,BusinessUnit,E.

Else
If BF mnCalendarMonth is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, and Month using the index 
Branch/Plant,BusinessUnit,F.

Else
If BF cShiftCode is not equal to  
Perform a Select on F3007 based on Branch/Plant, Work Center, and Shift using the index 
Branch/Plant,BusinessUnit,G.

Else
Perform a Select on F3007 based on Branch/Plant, and Work Center using the index 
Branch/Plant,BusinessUnit,E.

End If
End If
End If
End If
End If
End If
   End If

//  

//     Depending on the Index used, Fetch next will use the same index.

//  

4.  If Index Selected is equal to "G" 

F3007.Fetch Next based on Index G
    Else

If IndexSelected is equal to "F" 
F3007.Fetch Next based on Index F
Else
F3007.Fetch Next based on Index E
End If
   End If


5.  If File_IO_Status is not equal to SUCCESS And BF cSuppressErrorMessage is not equal to "1" 

Set NER Error("025B", BF szErrorMessageID)
     Else

While SV File_IO_Status is equal to CO SUCCESS 
F3007 Resource Units Cache Function
If IndexSelected is equal to "G" 

F3007.Fetch Next based on Index G
Else
If VA evt_cIndexSelected_EV01 is equal to "F" 
F3007.Fetch Next based on Index F
Else
F3007.Fetch Next based on Index E
End If
End If
End While
End If


6.  F3007.Close


Data Structure

D3003790 - F3007 Fillup Resource Units Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobnumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

szCostCenterMCUcharOPTNONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

mnCalendarYearYRMATH_NUMERICOPTNONE

The calendar year for this calendar.

mnCalendarMonthMTMATH_NUMERICOPTNONE

A number that corresponds to the month in a calendar year. 

szCostCenterAltMMCUcharOPTNONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

szUnitOfMeasureUMcharOPTNONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

szCostCenterTypeSTYLcharOPTNONE

A user defined code (00/MC) that identifies the classification of the business unit.

cShiftCodeSHFTcharOPTNONE

A user defined code (00/SH) that identifies daily work shifts. In payroll systems, you can use a shift code to add a percentage or amount to 
the hourly rate on a timecard. For payroll and time entry: If an employee always works a shift for which a shift rate differential is applicable, 
enter that shift code on the employee's master record. When you enter the shift on the employee's master record, you do not need to enter the 
code on the timecard when you enter time. If an employee occasionally works a different shift, you enter the shift code on each applicable 
timecard to override the default value.

cSuppressErrorMessageSUPPScharOPTNONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharOPTNONE

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 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

Related Functions

None

Related Tables

None