GetPurchasePrice

Get Purchase Price

Major Business Rule

Object Name: B4300040

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this business function is to retrieve a purchase price for the specified Supplier, 

Item, Currency, Unit of Measure and quantity.

This function will also convert a domestic price found into foreign if an exchange rate has been 

provided.  The Unit price is also provided in the purchase unit of measure _ as used by PO Entry.


Setup Notes and Prerequisites

If conversion from domestic to foreign is required, then the exchange rate needs to be provided.  

This calculation is only performed when the CurrencyProcessingFlag is not 'N' (No Currency Processing).


If a conversion of the unit price per primary/transaction unit of measure into unit price/pruchase 

unit of measure is required then the conversion factors from Transaction to Purchasing and from Primary 

to Purchasing should be provided.  If these are not provided then the conversion will not take place 

and the unit price/purchase unit of measure will be zero.


Technical Specification



Data Structure

D4300040 - Get Purchase Price

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

mnAddressBookNumberAN8MATH_NUMERICNONENONE

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

szPrimaryUomUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

mnQuantityInTransactionUomUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

szTransactionUomUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szCatalogNumberCATNcharNONENONE

This is a grouping of suppliers and items for pricing purposes.

jdTransactionDateTRDJJDEDATENONENONE

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

szCurrencyPurchaseOrderCRCDcharNONENONE


^

szCurrencyDomesticCRRPcharNONENONE

A code that indicates the currency that is used by the supplier.  The system uses this code as the default currency when you enter vouchers 
for the supplier. You can override the default currency when you enter a voucher. If you leave this field blank, you can either assign the 
currency code when you enter a voucher or let the system assign the currency code of the voucher company. 

mnUnitPriceInForeignPRRCMATH_NUMERICNONENONE

The unit cost of one item, as purchased from the supplier, excluding freight,taxes, discounts, and other factors that might modify the actual 
unit cost you record when you receive the item.

mnUnitPriceInDomesticFUPMATH_NUMERICNONENONE

The foreign price per unit.

cCurrencyConversionFlagCRYRcharNONENONE

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.

szPurchasingUomUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szUoMOfRowSelectedUOMcharNONENONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szCurrencyOfRowSelectedCRCDcharNONENONE

A code that identifies the currency of a transaction. 

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.

cSuppressErrorMessageEV01charNONENONE

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

mnExchangeRateCRRMATH_NUMERICNONENONE

A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.  The number in this field 
can have a maximum of seven decimal positions. If more are entered, the system adjusts to the nearest seven decimal positions. 

mnConvFactorTransToPurchCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnConvFactorPurchToPrimaryCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnUnitPriceInDomPerPurchUoMPRRCMATH_NUMERICNONENONE

The unit cost of one item, as purchased from the supplier, excluding freight,taxes, discounts, and other factors that might modify the actual 
unit cost you record when you receive the item.

mnUnitPriceInForPerPurchUoMFUPMATH_NUMERICNONENONE

The foreign price per unit.

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

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.

cPurchaseLevelPricePPLVcharNONENONE

A code that indicates where to retrieve the purchase price for an item when you enter a purchase order. Valid codes are:    1   Use the 
supplier/item price from the Purchase Price table (F41061).    2   Use the supplier/item/branch price from the Purchase Price table (F41061).    3   Use 
the inventory cost from the Inventory Cost table (F4105). This cost is based on the inventory cost level and the purchasing cost method you 
specify for the item. The first two codes are applicable only if you set up supplier costs in the Procurement system. If you do not set up 
supplier costs, the system uses the inventory cost as the default for the purchase order.

cInventoryCostlevelCLEVcharNONENONE

A code that indicates whether the system maintains one overall inventory cost for the item, a different cost for each branch/plant, or a 
different cost for each location and lot within a branch/plant. The system maintains inventory costs in the Inventory Cost table (F4105). Valid codes 
are:    1   Item level    2   Item/Branch level    3   Item/Branch/Location level

cCostOverrideCodeCSTOcharNONENONE

A code that specifies whether the change order is a terms only change. For those organizations that elect to view subcontracts on a 
detailed line item basis, terms only changes are in most cases those that have a non-dollar effect, such as a schedule change. For those 
organizations that elect to view their contracts on a summary job cost coding basis, all changes are automatically classified for processing purposes 
as terms only changes. In this case the base contract is automatically incremented for each change order and the individual change order 
amount is carried for informational purposes only. All change orders created in processing mode 3 (account method -incremental), are terms 
only changes. Most inquiry screens and reports exclude terms only items.

mnTriangulationRate1TRR1MATH_NUMERICOPTNONE

The triangulation currency rate used to convert the From currency code to the Triangulation currency code.

mnTriangulationRate2TRR2MATH_NUMERICOPTNONE

The triangulation currency rate that used to convert from the Triangulation currency code to the To currency code.

cCurrencyConversionMethodCRCMcharOPTNONE

A value that specifies which method to use when converting from one currency to another. Valid values are:  Y  Multiplier method. The 
system multiplies the foreign amount by the multiplier exchange rate to calculate the domestic amount. Z Divisor method. The system divides the 
foreign amount by the divisor exchange rate to calculate the domestic amount.

szSecondaryUOMUOM2charOPTNONE

A user defined code (00/UM) that indicates an alternate unit of measure for the item.

mnSecondaryQtyUORGMATH_NUMERICOPTNONE

The quantity of units affected by this transaction.

Related Functions

B0000027 CurrencyConvForAndDom
B4000530 Get Distribution Constants
XF4105 Item Cost I/O

Related Tables

F4101 Item Master
F4105 Item Cost File
F41061 Supplier Price/Catalog File
F4209 Held Orders