UpdateAForecastRecords

Update A Forecast Records

Major Business Rule

Object Name: B3400780

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

This function will write detail forecast records (F3460) for Large Customers


1.2Setup Notes and Prerequisites


1.3Special Logic


2.Technical Specifications

If the Quantity is not equal to zero

Or the Amount is not equal to zero

Retrieve the detail forecast record (F3460) with the following key:

ShortItemNumberMFITM

BranchMFMCU

ForecastTypeMFTYPF

SoldToMFAN8

Find the next date in the fiscal date pattern that is greater than or 

equal to the input RequestedDate

Move the date into MFDRQJ

If the requested date is beyond the end of the fiscal patterns

end processing for this item and get out of update 'A' forecast 

records

End


If a record was found and

SummarizeForecasts is not equal to 2

Update the record

Quantity add toMFFQT

Amount add toMFFAM

MFFQTMFUORG

MFFAMMFAEXP

Get the following from GetAuditInfo

CurrentDateMFUMPJ

CurrentTimeMFTDAY

UserMFUSER

Terminal NumberMFJOBN

Program IDMFPID


Add the quantity and amount to the GrandTotalQuantity and Amount

Else


If SummarizeForecasts is not equal to 2

write the detail record

ShortItemNumberMFITM

SecondItemNumberMFLITM

ThirdItemNumberMFAITM

BranchMFMCU

SoldToMFAN8

'FR'MFDCTO

ForecastTypeMFTYPF

ZerosMFYR

QuantityMFFQT

AmountMFFAM

MFFQTMFUORG

MFFAMMFAEXP

'N'MFBPFC

Get the following from GetAuditInfo

CurrentDateMFUMPJ

CurrentTimeMFTDAY

UserMFUSER

Terminal NumberMFJOBN

Program IDMFPID

Add the quantity and amount to the GrandTotal Quantity and 

Amount

End

End


If SummarizeForecasts is not equal to blanks

Call CreateSummaryForecasts (B3400790)

ShortItemNumberShortItemNumber

BranchBranch

ForecastTypeForecastType

QuantityOriginalQuantity

AmountOriginalAmount

QuantityForecastQuantity

AmountForecastAmount

SoldToSoldTo

MFDRQJCompareDate

RetrieveCatCodesRetrieveCatCodes

SummaryCodeSummaryCode

LinkListPtrLinkListPtr

ProgramIDProgramID

Set output LinkListPtr = LinkListPtr from B3400790

End




Data Structure

D3400780 - Update A Forecast Records

Parameter NameData ItemData TypeReq/OptI/O/Both
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

szSecondItemNumberLITMcharNONENONE

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

szThirdItemNumberAITMcharNONENONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned item number. 2.  2nd Item Number - The 25-digit, free-form, user 
defined alphanumeric item number. 3.  3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item number.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

szBranchMCUcharNONENONE

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.

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 

mnQuantityUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnAmountAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnSoldToAN8MATH_NUMERICNONENONE

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

idDatePatternsGENLNGIDNONENONE

General purpose ID variable.

jdRequestedDateDRQJJDEDATENONENONE

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

cSummarizeForecastsEV01charNONENONE

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

mnGrandTotalAmountFAMMATH_NUMERICNONENONE

The current amount of the forecasted units for a planning period.

mnGrandTotalQuantityFQTMATH_NUMERICNONENONE

The quantity of units forecasted for production during a planning period.

cRetrieveCatCodesEV02charNONENONE

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

szSummaryCodeKVERcharNONENONE

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

idLinkListPtrGENLNGIDNONENONE

General purpose ID variable.

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.

jdCompareDateDRQJJDEDATENONENONE

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

szTypeTransactionTYTNcharOPTNONE

The qualifier used to identify a specific type of transaction.

cBeforeImageProcessingBIPROCcharOPTNONE

This flag controls image processing in interoperability transactions.

Related Functions

B3400790 Create Summary Forecasts
B9800100 Get Audit Information

Related Tables

F3460 Forecast File