TransactionCostRecordValidation

Transaction Cost Record Validation

Minor Business Rule

Object Name: B4100490

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description
Purpose
This function will determine if cost records exist for the cost level; and retrieve the cost for the 
primary location.


Setup Notes and Prerequisites

None.

Special Logic

None

Technical Specifications

Processing 

// Determine if cost records exist for the cost level only if this is not a lot processing location

*If SRCE equals blanks OR equals zeros

OR SRCE not equal blanks  AND SRCE not equal zeros and LOTN not equals blanks OR SRCE equals 

'2'

Call 
GetItemCost(XF4105)
with parms as follows:
Inventory Cost Selection 'I'

Short Item NumberShort Item Number

Branch/PlantBranch/Plant

Lot NumberLot Number

Location - File Format Location - File Format

Call Type'1'

Return Record'0'

Return: Error Code


If Cost Level (CLEV) not equal '3' AND the record was not found Set 

Add Cost Record to '1'


// Retrieve the cost from the primary location if this is a lot processing location or the location 

being used was not found.


*If CLEV equals 3

If SRCE not equal blanks AND not equal zeros and LOTN equals blanks

OR F4105 record was not found,

Set Add Cost Record  to '1'

Call 
VerifyAndGetItemLocation(XF41021) with Index = 4, Keys = 3.
If found, load the LOCN and LOTN just retrieved from the F41021 into 

the COLOCN and COLOTN fields.

Call 
GetItemCost(XF4105) with the new parameters.
Move COUNCS into UNCS

Else

Move zeros to UNCS.






Data Structure

D4100490 - Transaction Cost Record Validation

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMItem NumberIY

MCUBranch/PlantIY

LOCNLocationIN

LOTNLot NumberIN

SRCELot Process TypeI/ON

EV01Add Cost RecordON

CLEVCosting LevelIY

UNCSUnit CostON


^

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

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.

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.

cLotProcessTypeSRCEcharNONENONE

A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108). Valid 
codes are:    0   Lot assignment is optional. You can manually assign numbers. Quantity can be greater than one. (Default)    1   Lot assignment is 
required. The system assigns numbers using the system date in YYMMDD format. Quantity can be greater than one.    2   Lot assignment is 
required. The system assigns numbers in ascending order using Next Numbers. Quantity can be greater than one.    3   Lot assignment is 
required. You must manually assign numbers. Quantity can be greater than one.    4   Serial number assignment is optional except during shipment 
confirmation. Quantity must not exceed one.    5   Serial number assignment is required. The system assigns numbers using the system date 
in YYMMDD format. Quantity must not exceed one.    6   Serial number assignment is required. The system assigns numbers in ascending 
order using Next Numbers. Quantity must not exceed one.    7   Serial number assignment is required. You must manually assign numbers. 
Quantity must not exceed one.

cAddCostRecordEV01charNONENONE

If a '1', will need to add a cost record
^

cCostLevelCLEVcharNONENONE

From F4101
^

mnUnitCostUNCSMATH_NUMERICNONENONE

The amount per unit, derived by dividing the total cost by the unit quantity.

szCostMethodLEDGcharNONENONE

A user defined code (40/CM) that specifies the basis for calculating item costs. Cost methods 01 through 19 are reserved for J.D. Edwards 
use.

cReturnItemCostRecordEV01charNONENONE

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

idItemCostRecordGENLNGIDNONENONE

General purpose ID variable.

Related Functions

XF41021 Update F41021 Locations
XF4105 Item Cost I/O

Related Tables

F41021 Item Location File
F4105 Item Cost File