CalculateFactorAndRate

Calculate Factor And Rate

Major Business Rule

Object Name: B3001470

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This business function will determine the Factor Code and Rate Code Costs.

1.2Setup Notes and Prerequisites



1.3Special Logic


2.Technical Specifications


2.4Processing 


1.1.  Determine Factor.  (DS Factor)


1.1.1.  If the factor code is equal to blanks (DS Factor Code - Sim = blank), assign DS Factor = 
DS Factor - Sim.


1.1.2.  If the factor code is not equal to blanks (DS Factor Code - Sim not = blanks), use the 
factor code to determine the factor.


1.1.2.1.  Determine the first character of the factor code.  WK Factor Code Char = first 
character of DS Factor Code - Sim.


1.1.2.2.  If WK Factor Code Char = '*', assign DS Factor = LL Manufactured Costs in Current 
Level Cost Link List where Cost Type is equal to DS Factor Code  - Sim. 


1.1.2.3.  If WK Factor Code Char = '&', assign DS Factor = LL Rolled Costs in Current Level 
Cost Link List where Cost Type is equal to DS Factor Code - Sim.


1.1.2.4.  If WK Factor Code Char is not '*' or '&', retrieve DS Factor from general message 
table (F00191).


Fetch from the General message table (F00191) where SY = '30', RT = 'CF', KY = DS 
Factor Code - Sim.  Assign DS Factor = F00191 RATE.


1.2.  Determine Rate (DS Rate).


1.2.1.  If the rate code is equal to blanks (DS Rate Code - Sim = blank), assign DS Rate = DS Rate 
- Sim.


1.2.2.  If the rate code is not equal to blanks (DS Rate Code - Sim not = blanks), use the rate 
code to determine the rate.


1.2.2.1.  Determine the first character of the rate code.  WK Rate Code Char = first 
character of DS Rate Code - Sim.


1.1.2.2.  If WK Rate Code Char = '*', assign DS Rate = LL Manufactured Costs in Current Level 
Cost Link List where Cost Type is equal to DS Rate Code  - Sim. 


1.1.2.3.  If WK Rate Code Char = '&', assign DS Rate = LL Rolled Costs in Current Level Cost 
Link List where Cost Type is equal to DS Rate Code - Sim.


1.1.2.4.  If WK Rate Code Char is not '*' or '&', retrieve DS Rate from general message table 
(F00191).


Fetch from the General message table (F00191) where SY = '30', RT = 'CF', KY = DS Rate Code - Sim.  

Assign DS Rate = F00191 RATE.

^

Data Structure

D3001470 - Calculate Factor And Rate

Parameter NameData ItemData TypeReq/OptI/O/Both
szFactorCode_SimXSFCcharNONENONE

A user defined code (system 30, type CF) used to retrieve factor information from the Generic Rate table (F00191). This value is used in 
conjunction with the Rate Code and Rate Amount fields to calculate extra costs (electricity,taxes, tooling changes, and so on).

mnFactor_SimXSFMATH_NUMERICNONENONE

A generic factor used to calculate data for standard cost component extras.

szRateCode_SimXSRCcharNONENONE

A user defined code (system 30, type CR) used to retrieve rate information from the Generic Rate table (F00191). This value is used in 
conjunction with the Factor Code and Factor Amount fields to calculate extra costs (electricity, taxes, tooling changes, and so on).

mnRate_SimXSRMATH_NUMERICNONENONE

A generic rate used to calculate extra costs, such as electricity and taxes.

idCurrentLevelCostsLLGENLNGIDNONENONE

General purpose ID variable.

cSuppressErrorMessageEV01charNONENONE

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

szErrorMessageIDDTAIcharNONENONE

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.

mnFactorMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

mnRateMN29D9MATH_NUMERICNONENONE

This is a generic field used as a work field in Everest.

szWorkCenterMCUcharOPTNONE

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.

Related Functions

B9800088 Retrieve and Format User Defined Codes
B9800500 F0019 Get Generic Rates Type

Related Tables

F00191 Generic Message/Rates