ForecastRollupPrice

Forecast Rollup Price

Major Business Rule

Object Name: B3400920

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will retrieve the price for a given detail forecast record from the Forecast Price File 
(F34007), create a new quantity or amount using that prices, update the detail record with the 

numbers and if the summary code is not blank it will force the change up the forecast hierarchy.


1.2Setup Notes and Prerequisites


1.3Special Logic


2.Technical Specifications

1.Fetch to the Forecast Price file (F34007) with the key of  Item, Branch, Customer, Forecast 
Type and an Effective Date less than or equal to the Requested Date and a Expiration Date greater than or 

equal to the Requested Date 

If a record is found 

If AmountQuantity is equal to '1'

Divide the amount passed in by the price to get Quantity

Move a '2' to TempRevisionFlag

Else

Multiply the quantity passed in by the price to get Amount

Move a '1' to TempRevisionFlag

End 

Else

If AmountQuantity is  equal to '1'

Move zero to  Quantity

Move a '2' to TempRevisionFlag

Else

Move zero to  Amount

Move a '1' to TempRevisionFlag

End 

End


2.Fetch the F3460 detail record for the input Item, Branch, Customer, Forecast Type, and 

Requested Date.

If SummaryCode is blank

If (TempRevisionFlag is '1' and F3460 RVIS is '2') or

   (TempRevisionFlag is '2' and F3460 RVIS is '1')

Set F3460 RVIS to '3'

Else

Set F3460 RVIS to TempRevisionFlag

End

End
3.Update the F3460 record with the new data


4.Update the F3460 year record with the difference between the new and old quantity/amount.


5.If the Summary Code is not blank

Select all of the F34006 with the Item, Branch, Summary Code and Type passed in

Fetch the first record

Fetch to the F3400 with the child key equal to the key off the F34006

Compare the address number off that record  to the address number passed in

If it is the same (-9999999 and 0 out of F3400 equal 0) as the address number passed in 

and the DRQJ from F3400 equals the input RequestedDate

If a price record was found

If AmountQuantity is  equal to '1'

Divide the amount passed in by the price to get Quantity

Move a '2' to RevisionFlag

Else

Multiply the quantity passed in by the price to get Amount

Move a '1' to RevisionFlag

End 

Else

If AmountQuantity is  equal to '1'

Move zero to  Quantity

Move a '2' to RevisionFlag

Else

Move zero to  Amount

Move a '1' to RevisionFlag

End 

End

Update the F3400 record with the new data

Call ForecastForcing B3401030 with the parent number off the F3400 record

End

Fetch another F34006

End


^

Data Structure

D3400920 - Forecast Rollup Price

Parameter NameData ItemData TypeReq/OptI/O/Both
szForecastTypeTYPFcharNONENONE

A user defined code (34/DF) that indicates one of the following:     o The forecasting method used to calculate the numbers displayed about 
the item     o The actual historical information about the item 

szBranchPlantMCUcharNONENONE

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.

mnShortItemNumberITMMATH_NUMERICNONENONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

mnCustomerNumberAN8MATH_NUMERICNONENONE

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

mnAmountAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnQuantityUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

szSummaryCodeKVERcharNONENONE

A user defined code (40/KY) that indicates the type of summary forecast.

cAmountQuantityEV01charNONENONE

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

jdRequestedDateDRQJJDEDATENONENONE

The date that an item is scheduled to arrive or that an action is scheduled for completion.

szProgramIDPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

Related Functions

B3401030 F3400 Forecast Forcing
B9800100 Get Audit Information

Related Tables

F3400 Forecast Summary File
F34006 Forecast Summary Work File
F34007 Forecast Prices
F3460 Forecast File