UpdateSalesSummaryHistory

UpdateSalesSummaryHistory

Major Business Rule

Object Name: B4200560

Parent DLL: CDIST

Location: Client/Server

Language: C


Functional Description


Purpose

This business function accepts a parameter list of fields as input. Depending on whether it finds an 
existing record for the key fields (AN8,MCU,DCTO,ITM,LNTY,SRP1,SRP2,SRP3,SRP4,SRP5,FY) it either 

creates or updates the Sales Summary History  (F4229) file with the parameters' values.  


Setup Notes and Prerequisites

At this time ACCESS can't have more than 10 key fields. SRP5 will not be a key field at this time. 


Special Logic

None.


Technical Specification


2.2Related Tables 

Table Table Description

F4229Sales Summary History



2.3Related Business Functions

Source NameFunction Name



2.4Processing 


Verify that the Sales Summary (F4229)  record exists for the key fields 

(AN8,MCU,DCTO,ITM,LNTY,SRP1,SRP2,SRP3.SRP4,FY).

If NO record was found in F4229:

Use ClearColBuffer(...) api
Retrieve the default value for the Century (CTRY) field from the Data Dictionary.

Load SSMCU with CostCenter passed in.

Load SSAN8 with AddressNumber passed in.

Load SSFY  with Fiscal Year passed in.

Load SSCTRY with the default value.

Load SSDCTO with OrderType passed in.

Load SSITM with IdentifierShortItem passed in.

Load SSSRP1 - 5 with SalesReportingCodes passed in.

Load SSLITM with Identifier2ndItem passed in.

Load SSAITM with Identifier3rdItem passed in.

Load SSDLIJ with DateTransactionJulian passed in.

Move zeros to SSCI01 - SSCI14

Move zeros to SSAS01 - SSAS14

Move zeros to SSQS01 - SSQS14

Add PQOR to SSSQxx where xx is the parameter PN.

Add  AEXP to SSASxx where xx is the paramter PN.

If PRFT is equal 'Y'

Add  ECST to SSCIxx where xx is the parameter PN.

end

Add AEXP to SSCMS

Add AEXP to SSCYS

Add ECST to SSCMC

Add ECST to SSCYC

Write (Insert) the Sales Summary History (F4229) record.

If record exists in F4229:

Add PQOR to SSSQxx where xx is the parameter PN.
Add  AEXP to SSASxx where xx is the paramter PN.

If PRFT is equal 'Y'

Add  ECST to SSCIxx where xx is the parameter PN.

end

Add AEXP to SSCMS

Add AEXP to SSCYS

Add ECST to SSCMC

Add ECST to SSCYC

Update the Sales Summary History(F4229) record.





^

Data Structure

D4200560 - UpdateSalesSummaryHistory


Special Input Expected

MCUCostCenterKey field

AN8AddressNumberKey field

DCTOOrderTypeKey Field

ITMIdentifierShortItemKey Field

LNTYLineTypeKey Field

SRP1SalesReportingCode1Key Field

SRP2SalesReportingCode2Key Field

SRP3SalesReportingCode3Key Field

SRP4SalesReportingCode4Key Field

SRP5SalesReportingCode5

FYFiscalYear1Key Field

AEXPAmountExtendedPrice

ECSTAmountExtendedCost

LITMIdentifier2ndItem

AITMIdentifier3rdItem

TRDJDateTransactionJulian

CRYRCurrencyConverYNAR

PNPeriodNoGeneralLedge

PQORQtyShippedInPrimary

PRFTIncldSaleCogsFrGrossInclude Sales/COGS for Gross Profit

CRRCurrencyConversionRate

CRCDDomestic Currency Code

CRDCForeign Currency Code






^

Parameter NameData ItemData TypeReq/OptI/O/Both
szCostCenterMCUcharNONENONE

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.

mnAddressNumberAN8MATH_NUMERICNONENONE

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

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

mnShortItemITMMATH_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

szLineTypeLNTYcharNONENONE

A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as 
General Ledger, Job Cost, Accounts Payable, Accounts Receivable, and Inventory Management. It also specifies the conditions under 
which a line prints on reports, and it is included in calculations. Codes include the following: S Stock item   J Job cost   N Nonstock item   F Freight  
T Text information   M Miscellaneous charges and credits   W Work order

szSalesRptCode1SRP1charNONENONE

One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use.

szSalesRptCode2SRP2charNONENONE

One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or 
use. This field represents one of ten property type categories available for sales purposes.

szSalesRptCode3SRP3charNONENONE

One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use.

szSalesRptCode4SRP4charNONENONE

One of ten category codes to be used for sales coding purposes. These codes can represent such classifications as color, material 
content, or use.

mnFiscalYear1FYMATH_NUMERICNONENONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

szSalesRptCode5SRP5charNONENONE

One of ten category codes to be used for sales coding purposes.  These codes can represent such classifications as color, material 
content, or use.

mnAmtExtPriceAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnAmtExtCostECSTMATH_NUMERICNONENONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

sz2ndItemLITMcharNONENONE

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.

sz3rdItemAITMcharNONENONE

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.

jdTransDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

cCurrencyConvCRYRcharNONENONE

A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use: Codes are:    N Do not 
use multi-currency accounting. Use if you enter transactions in only one currency for all companies. The multi-currency fields will not appear 
on forms. The system supplies a value of N if you do not enter a value.    Y Activate multi-currency accounting and use multipliers to convert 
currency. The system multiplies the foreign amount by the exchange rate to calculate the domestic amount.    Z Activate multi-currency 
accounting and use divisors to convert currency. The system divides the foreign amount by the exchange rate to calculate the domestic amount.

mnPeriodNoGLPNMATH_NUMERICNONENONE

A number indicating the current accounting period.  This number, used in conjunction with the Company Constants table (F0010) and the 
General Constants table (F0009), allows the user to define up to 14 accounting periods. See General Ledger Date.  The current period number 
is used to determine posted before and posted after cut off warning messages.  It is also used as the default accounting period in the 
preparation of financial reports.

mnQtyShippedInPrimaryPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

cIncldSaleCogsFrGrossPRFTcharNONENONE

A code that indicates that the system includes sales and cost of goods sold in gross profit calculations. In World software, valid values are:    
Y Include the sales and costs of goods sold in gross profit calculations.    N Do not include the sales and costs of goods sold in gross profit 
calculations. In OneWorld, a checkmark indicates that the system includes the sales and costs of goods sold in gross profit calculations.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageDTAIcharNONENONE

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.

cSuppressErrorEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

Related Functions

None

Related Tables

F4229 Sales Summary History File