Functional Description
Purpose
This business function will verify the price and cost information for a given sales order detail
line. The sales order lines will be selected through the data selection option of the UBE that calls this
business function. If the price / cost for the sales order line has changed, this business function
will calculate the new price / cost, update the sales order header file and update the sales history
file.
Setup Notes and Prerequisites
None.
Special Logic
None.
Technical Specification
Related Tables
Table Table Description
F40205Line Type Constants File
F4101Item Master File
F4102Item Branch File
F4201Sales Order Header File
F4105Item Cost File
F4106Item Price File
F4074Pricing History File
Related Business Functions
Source NameFunction Name
B4000260.CGetLineTypeConstants
X4101.CGetItemMaster
B4200930.CGetBranchbyItem
B4200250.CUpdateOrderTotalInF4201
B4200710.CCalculateTransferCost
B4000870.CStandardPricingAdjustments
XF4105.CGetItemCost
B4200070.CGetSalesBasePrice
B4200260.CWriteSalesHistoryOrLedger
B4000520.CGetItemUoMConversionFactor
2.4Processing
*** Retrieve general information needed from other files. ***
Retrieve line type constants for the current sales detail line.
Input Parameters
Line Type - LNTY
Suppress Error Message - EV01
Input Parameters
Short Item Number - ITM
Suppress Error Messages - EV01
Input Parameters
Branch Plant - MCU
Index - CDL
Keys - CDL
Call Type - EV01
Return Record - EV02
Item Branch Record - GENLNG
Input Parameters
Order Number - DOCO
Order Type - DCTO
Key Company - KCOO
Call Type - EV01
Error Message - DTA1
Suppress Error Message - EV02
Return Code - EV03
*** Foreign Currency preliminary processing. ***
No foreign currency processing if any of the following is true:
2. Current line is an invoicing adjustment (SO08 = '2').
3. Domestic code is the same as foreign.
4. Sales order line has been invoiced (SDIVD <> 0).
Retrieve decimal value.
Move exchange rate into the sales order line's Currency Conversion Rate field (SDCRR).
*** Calculate new cost. ***
Do not calculate cost if any of the following is true:
2. Quantity on hand has been relieved from this item (SO02 = '1').
3. The cost has been overriden (CSTO = '1')
Input Parameters
Short Item Number - ITM
Branch / Plant - MCU
Location - LOCN
Lot Number - LOTN
Cost Level - CLEV
Return F4105 Row Pointer - EV01
Call Type - EV01
Costing Selection - CSIN
Purchase Cost Selection - CSPO
Costing Method - LEDG
2. Verify that item is an inventory item ( LFIVI = 'N').
3. Calculate transfer cost.
Input Parameters
Stocking Type - STKT
Inventory Interface - IVI
From Branch - MMCU
To Branch - CMCU
Short Item Number - ITM
Category Code 1 - SRP1
Effective Date - DRQJ
Currency Control - CRYR
Exchange Rate Multiplier - CCR
Exchange Rate Divisor - CRRD
Unit Cost - UNCS
Calculate foreign costs.
*** Calculate new price. ***
Do not calculate new price if any of the following is true:
2. Price was overridden (PROV = '1').
Determine which date to use as Price Effective Date (Processing Option).
2. '1' - Requested Ship Date
3. '2' - Promised Ship Date
4. '3' - Original Promised Date
5. '4' - Actual Ship Date
6. '5' - System Date
7. '6' - Invoice Date
8. '*' - Use System Constants Value
GetSalesBasePrice / B4200070
Input Parameters
Ship To Address Number - SHAN
Price Effective Date - PEFJ
Base Currency Code - CRCD
Transaction Unit of Measure - UOM
Primary Unit of Measure - UOM1
Price Level - PLEV
Price By Grade Or Potency - PRPO
Currency Conversion - CRYR
Conversion Factor - CRR
From Potency - FRMP
Through Potency - THRP
From Grade - FRGD
Through Grade - THGD
Item Pricing Group - PRGR
Customer Pricing Group - CPGP
F4102 Row Pointer - GENLNG
Computer ID - CTID
Job Number - JOBS
Line Number F40UI74 - XLIN
Adjustment Revision Level - AREV
Advance Revision Level - EV02
Retrieve conversion factors.
GetItemUoMConversionFactor
Input Parameters
Branch Plant - MCU
Unit of Measure to Primary - UOM
Quantity to Convert - SOQS
Inventory Interface - IVI
Short Item Number - ITM
Potency Mode - COMM
Potency Control - OT1Y
Standard Potency - STDP
Suppress Error Message - EV01
From Unit of Measure - UOM
To Unit of Measure - UOM
Calculate new price using pricing server.
Input Parameters
Primary Unit of Measure Price - PRIC
Short Item Number - ITM
Extended Amount - AEXP
Total Weight (LBS) - ITWT
Conversion Factor to Pricing Unit of Measure - CONV
Inventory Pricing Rule - PRGR
Branch / Plant - MCU
Conversion Factor to Primary - CONV
Quantity Shipped to Date - QTYT
Pricing Type 'O' for Purchasing - PCTY
Header Cost Center - EMCU
Commitment Code - COMM
Order Date - TRDJ
Input / Output Parameters
Shipped Quantity (Primary) - SOQS
Primary Ordered Quantity - PQOR
Item Master Record - GENLNG
Customer Pricing Group - PRGP
Quantity Backordered - SOBK
Quantity Canceled - SOCN
Lot Number - LOTN
Location Number - LOCN
Contract Split Line Code - CONT
Calculate extended price.
Calculate foreign prices.
*** Update files. ***
If price or cost changed:
2. Update sales order header.
Input Parameters
Order Type - DCTO
Company Key - KCOO
Current Domestic Extended Amount - MATH06
Current Foreign Extended Amount - MATH07
Previous Domestic Extended Amount - MATH08
Previous Foreign Extended amount - MATH09
Currency On - CRYR
Program - PID
User - USER
Job Number - JOBN
Date Updated - UPMJ
Time of Day- TDAY
4. Write to Sales Ledger file (F42199).
Input Parameters
Calling Application - PROG
User ID - USER
Workstation ID - JOBN
Current Date - DATE01
Current Time - TDAY
Processing Mode - EV01
^
D4200950 - Sales Order Batch Price / Cost Update
Special Input Expected
Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
DOCO Order Number I Y Key to sales order
header.
DCTO Order Type I Y Key to sales order
header.
KCOO Key Company I Y Key to sales order
header.
LNID Line Number I Y
LNTY Line Type I Y Key to line type
constants file.
UORG Transaction Quantity I Y
SOQS Shipped Quantity I Y
UPRC Unit Price I/O Y
AEXP Extended Price I/O Y
UNCS Unit Cost I/O Y
ECST Extended Cost I/O Y
ITM Short Item Number I Y
MCU Cost Center I Y
SO02 On Hand Updated I Y
CSTO Cost Override Code I Y
LOCN Location I Y
LOTN Lot Number I Y
CLEV Cost Level I Y
PROV Price Override Code I Y
SRP1 Sales Catalog I Y
EV01 Cost Update Mode I Y
EV01 Price Update Mode I Y
EV01 Foreign Currency Processing I Y
TRDJ Transaction Date I Y
RQDJ Requested Ship Date I Y
Promised Ship Date I Y
Original Promise Date I Y
Actual Ship Date I Y
Invoice Date I Y
PEFJ Price Effective Date I Y
AN8 Address Number I Y
SHAN Ship to Address Number I Y
Currency Code From I Y
UOM Pricing Unit of Measure I Y
CCR Currency Conversion Rate I Y
From Potency I Y
Through Potency I Y
From Grade I Y
Through Grade I Y
Item Pricing Group I Y
CTID Computer ID I N
JOBN Job Number I N
GENLNGLine Number F40UI74 I N Do not use.
Interbranch Sales I Y
TRDC Trade Discount Factor I Y
UTWT Unit Weight I Y
Quantity Shipped to Date I Y
Price Category Type I Y
COMM Commitment Code I Y
Primary Ordered Quantity I Y
SOBK Quantity Backordered I Y
SOCN Quantity Canceled I Y
UOM4 Pricing Unit of Measure I Y
Special Output Returned
Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
EV01 Error Code O
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnOrderNumber | DOCO | MATH_NUMERIC | NONE | NONE |
A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry,
| ||||
szOrderType | DCTO | char | NONE | NONE |
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
| ||||
szKeyCompany | KCOO | char | NONE | NONE |
A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a
| ||||
mnLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns
| ||||
szLineType | LNTY | char | NONE | NONE |
A code that controls how the system processes lines on a transaction. It controls the systems with which the transaction interfaces, such as
| ||||
mnTransactionQuantity | UORG | MATH_NUMERIC | NONE | NONE |
The quantity of units affected by this transaction. | ||||
mnShippedQuantity | SOQS | MATH_NUMERIC | NONE | NONE |
The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this
| ||||
mnUnitPrice | UPRC | MATH_NUMERIC | NONE | NONE |
The list or base price to be charged for one unit of this item. In sales order entry, all prices must be set up in the Item Base Price File table
| ||||
mnExtendedPrice | AEXP | MATH_NUMERIC | NONE | NONE |
The number of units multiplied by the unit price. | ||||
mnUnitCost | UNCS | MATH_NUMERIC | NONE | NONE |
The amount per unit, derived by dividing the total cost by the unit quantity. | ||||
mnExtendedCost | ECST | MATH_NUMERIC | NONE | NONE |
For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the
| ||||
mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE |
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item
| ||||
szCostCenter | MCU | char | NONE | NONE |
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit
| ||||
cOnHandUpdated | SO02 | char | NONE | NONE |
A code that indicates if the committed inventory for this sales detail line has been relieved from the On Hand Quantity. A value of 1 reflects
| ||||
cCostOverrideCode | CSTO | char | NONE | NONE |
A code that specifies whether the change order is a terms only change. For those organizations that elect to view subcontracts on a
| ||||
szLocation | LOCN | char | NONE | NONE |
The storage location from which goods will be moved. | ||||
szLot | LOTN | char | NONE | NONE |
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics. | ||||
cCostLevel | CLEV | char | NONE | NONE |
A code that indicates whether the system maintains one overall inventory cost for the item, a different cost for each branch/plant, or a
| ||||
cPriceOverrideCode | PROV | char | NONE | NONE |
A value established by the sales order entry program whenever a unit or extended price is entered into an order line item, overriding the
| ||||
szSalesCatalog | SRP1 | char | NONE | NONE |
One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use. | ||||
cCostUpdateMode | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cPriceUpdateMode | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cForeignCurrencyMode | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
jdTransactionDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdRequestedShipDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdPromisedShipDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdOriginalPromiseDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdActualShipDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdInvoiceDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
cPriceEffectiveDate | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
mnAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnShipToAddress | SHAN | MATH_NUMERIC | NONE | NONE |
The address number of the location to which you want to ship this order. The address book provides default values for customer address,
| ||||
szCurrencyCodeFrom | CRCD | char | NONE | NONE |
A code that identifies the currency of a transaction. | ||||
szUnitOfMeasure | UOM | char | NONE | NONE |
A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box). | ||||
szPrimaryUnitOfMeasure | UOM1 | char | NONE | NONE |
A user defined code (00/UM) that identifies the unit of measure that the system uses to express the quantity of an item, for example, EA
| ||||
mnCurrencyConversionRate | CRR | MATH_NUMERIC | NONE | NONE |
A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.
The number in this field
| ||||
mnFromPotency | FRMP | MATH_NUMERIC | NONE | NONE |
A number that indicates the minimum potency or percentage of active ingredients acceptable for an item.
The system displays a warning
| ||||
mnThroughPotency | THRP | MATH_NUMERIC | NONE | NONE |
A number that indicates the maximum potency or percentage of active ingredients that is acceptable for an item.
The system displays a
| ||||
szFromGrade | FRGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the minimum grade that is acceptable for an item.
The system displays a warning message if
| ||||
szThroughGrade | THGD | char | NONE | NONE |
A user defined code (40/LG) that indicates the maximum grade that is acceptable for an item.
The system displays a warning message if
| ||||
szItemPricingGroup | PRGR | char | NONE | NONE |
A user defined code (system 40/type PI) that identifies an inventory price group for an item.
Inventory price groups have unique pricing
| ||||
szComputerID | CTID | char | NONE | NONE |
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
mnLineNumberF40UI74 | XLIN | MATH_NUMERIC | NONE | NONE |
Line number. | ||||
cInterbranchSales | SO01 | char | NONE | NONE |
A value of 1 indicates that this sales detail line contains an inter branch item.
Interbranch sales orders allow the user to record the
| ||||
mnTradeDiscountFactor | TRDC | MATH_NUMERIC | NONE | NONE |
Percentage by which the system reduces the price of each item. This is the only discount that will be applied. You can override it if you
| ||||
mnUnitWeight | ITWT | MATH_NUMERIC | NONE | NONE |
The weight of one unit of an item, expressed in the primary unit of measure. | ||||
mnQuantityShippedToDate | QTYT | MATH_NUMERIC | NONE | NONE |
The number of units which have passed through the Sales Update process. In Workorder Processing, this field identifies the total quantity
| ||||
cPriceCategoryType | PCTY | char | NONE | NONE |
A user defined code (42/CT) that indicates the basis for the price rule. Valid values are:
P Purchase order discounts
O Order repricing
R
| ||||
cCommitmentCode | COMM | char | NONE | NONE |
A value that indicates whether you specified from which Location and Lot a particular item was to come. If you specified a storage area, the
| ||||
mnPrimaryOrderedQuantity | PQOR | MATH_NUMERIC | NONE | NONE |
The quantity ordered by the customer expressed in the primary stocking unit of measure. | ||||
mnQuantityBackordered | SOBK | MATH_NUMERIC | NONE | NONE |
The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of
| ||||
mnQuantityCanceled | SOCN | MATH_NUMERIC | NONE | NONE |
The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for
| ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
szPricingUnitOfMeasure | UOM4 | char | NONE | NONE |
A user defined code (00/UM) that indicates the unit of measure in which you usually price the item. | ||||
szUserID | USER | char | NONE | NONE |
The code that identifies a user profile. | ||||
szWorkstationID | JOBN | char | NONE | NONE |
The code that identifies the work station ID that executed a particular job. | ||||
mnTimeOfDay | TDAY | MATH_NUMERIC | NONE | NONE |
The computer clock in hours:minutes:seconds. | ||||
mnListPrice | LPRC | MATH_NUMERIC | NONE | NONE |
The list price in the unit of measure of the base price retrieved from the Base Price File (F4106). This is the price the customer would pay if
| ||||
szProgramID | PID | char | NONE | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
cPriceWasUpdated | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cCostWasUpdated | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szDataItem | DTAI | char | NONE | NONE |
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
| ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. |
None |
None |