UpdateForecastSummary

Update Forecast Summary

Minor Business Rule

Object Name: B3400150

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This function is to be used to update the summary forecast record if the quantity or amount has 
changed.  The application using this function should provide the short item number, branch/plant,  forecast 

date,  forecast type and forecast quantity, original quantity, forecast amount and extended amount.


1.1Purpose
The purpose of this business function is to update or write a summary forecast record in the forecast 
table.  The quantity and the amount fields will be passed.  If this is a new forecast summary, the 

forecast quantity should be updated to both quantity fields and the forecast amount should be updated to 

both amount fields.  If this is an update to an existing summary record, the forecast quantity should 

be added to the summary and the forecast amount should be added to the summary, and the original 

quantity and amounts should not be updated.  Summary records will be created using the calendar year from 

the revision date.


1.2Setup Notes and Prerequisites.

• Pass to the business function both quantity and amount fields along with item, branch/plant, 
requested date, and forecast type.


1.3Special Logic

None.

2.Technical Specifications

Assign local variable CalendarYear the year value from RequestedDate (DRQJ) provided 
by user.

Fetch the Forecast Summary record corresponding to the Short Item Number (ITM), Branch/Plant (MCU), 

Forecast Type (TYPF), and CalendarYear (YR) provided by the user.


If the summary record was not found then

Insert a new summary record using the forecast quantity for both quantity values and the forecast 

amount for both amount fields (forecast and original).

If the summary record was found then

If the input forecast values are the negative values of the record's forecast fields then

Delete the summary record.

Else

Add the new forecast quantity and amount values to the existing forecast quantity and amount 

values and update the database record.  The original quantity and original amount fields are not 

updated.  Call GetAuditInfo to update the record with new audit data.



^

Data Structure

D3400150 - Update Forecast Summary


Data Item Data Structure DescriptionI/ORequiredNotes

   ITM             Item Number - Short      IYes

   MCU             Business Unit            IYes

   TYPF             Forecast Type            IYes

   DRQJ             Requested Date            IYes 

   FQT              Forecast Quantity      IYes      This may be a positive or 

negative                                                                                                  

                                                                         

                                                                        quantity.

   FAM             Forecast Amount            IYes        This may be a positive or 

negative                                                                                                  

                                                                                                      

                                                                                                      

                                                                                                      

         amount.

   LITM             2nd Item Number            INo

   AITM             3rd Item Number            INo

   DCTO             Order Type                  INo

   BPFC             Bypass Forcing Y/N      INo

   PID             Program ID                  INo

   DTAI             Error Message ID            ONo

   EV01             Suppress Error MessagesINo      0 = Allow error message 

handling 1 =                                                                                                

                                                 Suppress error message handling


^

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

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 

jdRequestedDateDRQJJDEDATENONENONE

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

mnForecastQuantityFQTMATH_NUMERICNONENONE

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

mnForecastAmountFAMMATH_NUMERICNONENONE

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

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.

cSuppressErrorMessagesEV01charNONENONE

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

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.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

cBypassForcingYNBPFCcharNONENONE

A code that indicates whether to bypass the Forecast Forcing program (R34610). A Y indicates that the quantity and amount of a forecast 
should not be changed by an adjustment made to a forecast higher in the summary hierarchy. This flag is effective only when forecast forcing is 
done down the summary hierarchy.

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

B9800100 Get Audit Information

Related Tables

F3460 Forecast File