CacheCalculateConversionFactor

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function will read all the cache records and 

1.Calculate the Conversion Factor From to Primary
2.Verify that Conversion back to Primary exist

3.Verify  and Re-sequence the structured code



Technical Specification




• Convert Back to Primary Validation

Read "B4000980A" Cache with Job Number

Error = 0

Grid Column to Set Error = 1


While Record Exist in Cache  And Error = 0


IfCache-To UOM not equal Primary UOM  OR  Cache-From UOM not equal Primary UOM

PrevCacheData = Cache Data


Find "B4000980A" Cache with 

Job Number<=Job Number

Branch/Plant<=PrevCacheData-Branch/Plant

Short Item Number<=PrevCacheData-ShortItemNumber

From UOM<=PrevCacheData-To UOM


If  record not exist in cache

Set an Error  "3349"
Error = 1

End
End

Read Next Cache Record


End While


If  Error = 1

Exit
End


• Convert Conversion From to Primary

Read "B4000980A"  with Job Number


While Record Exist in Cache


IfCache-To UOM equals Primary UOM 

Cache-CFFromtoPrimary = Cache-CFFromtoTO
Update "B4000980A" Cache Record

Else
IfCache-From UOM equals Primary UOM
Cache-CFFromtoPrimary = 1
Update "B4000980A" Cache Record

Else
Done = 0
PrevCache = CacheData

While Done equals 0


Find "B4000980A" Cache with 
Job Number<=Job Number

Branch/Plant<=PrevCache-Branch/Plant

Short Item Number<=PrevCache-Short Item Number

From UOM<=PrevCache-To UOM


If  Record Found

Cache-CFFromtoPrimary = PrevCache-CFFromToPrimary *
  Cache-CFFromtoTO
PrevCache=CacheData
Else
Done = 1
End
End While

End
End

Read Next Cache Record
End While


• Validate all conversion 

Read "B4000980A"  with Job Number


While Record Exist in Cache


IfNot Calculated AND FindCache-From UOM not equal  Cache-From UOM

Find "B4000980A" with Cach-FromUOM
Done = 0

While  Done equals '0  AND Record Exist 


If  FindCache-Calculated  equals '1'
Done = 1
Else
Read Next Cache Record
End

End While
End

If not Caculated

Cache.CFFromtoPrimary = Cache.CFFromToTO / FindCache.CFFromtoTO

If   Cache.CFFromtoPrimary not equal FindCache.CFFromToPrimary

Set Error on "3351"
Error = 1

End
End

// Load Cache Data to array of Cache Data 1-5  

// Validate Duplicate Structure Code


IfArrayCache-StructureCode = Cache-Structure Code

Set an Error "3350"
Error = 1

Column ID = 4

End

case structure code

'1' :  Load Cache Data to ArrayCache[1]

'2' :  Load Cache Data to ArrayCache[2]

'3' :  Load Cache Data to ArrayCache[3]

'4' :  Load Cache Data to ArrayCache[4]

'5' :  Load Cache Data to ArrayCache[5]


Read Next Cache Record

End While


• Validate Structure Code in it's proper sequence

//   Structure Code must be sequence from small to largest and the corresponding UOM is from largest 

to

//   small, ie.  PL = 5 CA  will have structure of '1'  :  CA = 3 BX  will have structure of '2' : 

//BX = 4 EA will have structure of '3'


Index = 5

Structure = 1

PrevQty = 0

Start = 0


While Index < 5  AND Error equals 0


If  ArrayCache[Index]-From UOM is not blank

IfStart = 1  AND Prev Qty < ArrayCache[Index]-CFFromtoPrimary

Set an Error "3670"
Error = 1

Else
If  Structure not equal Index
ArrayCache[Index].StructureCode = Structure
End
End

Structure = Structure + 1

Start = 1

End

Index = Index + 1


End





^

Data Structure

D4000980D - Cache Calculate Conversion Factor

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

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.

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

szPrimaryUOMUOM1charNONENONE

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 
(each) or KG (kilogram).

cSuppressErrorMsgEV01charNONENONE

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

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.

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).

mnLineNumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnGridColumnToSetErrorMATH02MATH_NUMERICNONENONE

Special Output Returned
1 = From UOM 

2 = Quantity 

3 = To UOM 

4 = Structure  Codeab 


^

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
CacheUpdateF41002UOM

CacheUpdateF41002UOM

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function will read the cache and update Item Unit Of Measure Conversion Table (F41002).


Setup Notes and Prerequisites


Special Logic




Technical Specification





• Delete record from F41002

Read "B4000980DL" with Job Number


While Record Exist in Cache


Find F41002 with
UMMCU<=CacheDelete-Branch/Plant

UMITM<=CacheDelete-Short Item Number

UMUM<=CacheDelete-From UOM

UMRUM<=CacheDelete-To UOM


IfRecord Found in F41002

Delete From F41002
End

Read Next Cache Record

End While


• Update Cache Record to F41002

Read "B400098A" with Job Number


While Record Exist in Cache


Find F41002 with
UMMCU<=Cache-Branch/Plant

UMITM<=Cache-Short Item Number

UMUM<=Cache-From UOM

UMRUM<=Cache-To UOM


UMCONV= Cache-CFFromtoTO

UMCNV1= Cache-CFFromtoPrimary

UMUSTR= Cache-Structure Code


IfFound in F41002

Update F41002 Record
Else
Add F41002 Record
End

End While







^

Data Structure

D4000980F - Cache Update F41002 UOM

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

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.

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

cSuppressErrorMsgEV01charNONENONE

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

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.

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).

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

F41002 Item Units of Measure Conversion Factors
CacheUpdateUnitOfMeasure

CacheUpdateUnitOfMeasure

Item UOM Validation

Minor Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function will perform cache manipulation as followed: 'Add', 'Update', 'Delete', 'Verify Delete' 

, and 'Load Cache From F41002'.



Setup Notes and Prerequisites


Special Logic




Technical Specification


• Action Code '1' = Add

Add record to Cache "B4000980A"


Job Number<=Job Number

Branch/Plant<=Branch/Plant

Short Item Number<=Short Item Number

From UOM<=From UOM

To UOM<=To UOM

CF From to TO<=Conversion From to TO

CF From to Primary<=Conversion From to Primary

Line Number<=Line Number

From F41002<=Record From F41002



• Action Code '2' = Update

Find "B4000980A" cache with  Job Number, Branch/Plant, Short Item Number


Found = 0

Error = 0


While Record exist in Cache AND Found equals '0'  AND  Error equals '0'


If  Cache-Line Number equals to Line Number passed in

//Replacing the Primary Unique Keys from existing record in F41002

If   Cache-From UOM not equal to From UOM passed in   OR
      Cache-To UOM not equal to To-UOM passed in 


If   Cache-From F41002 = '1'
Add record to "B4000980DL" cache
End
End

Update "B4000980A" cache

Found = 1

Else
//   Verify Duplicate record

If   Cache-From UOM equals From UOM passed in   AND

      Cache-To UOM equals To-UOM passed in

Set an Error "2669"
Error = '1'

Else
IfCache-From UOM equals To-UOM passed in  AND
       Cache-To UOM equals From-UOM passed in


If   (1/Cache-CFFromtoTO) not equals Conversion From to TO

Set an Error "3351"
Error = 1

End
End

If  Error = '0'

Update "B4000980A" Cache
End
End
End

Read Next Cache Record

End While

If  No Cache Record  AND Found  equals '0'  AND Error equals '0'

Add "B4000980A" cache Record
End if


• Action Code '3' = Delete

Find "B4000980A"  Cache with: 

Job Number, Branch/Plant, Short  Item Number, From UOM, and To UOM


If  Found 

Delete "B4000980A" Cache Record
End

• Action Code '4' = Delete All 

Delete All "B4000980A" Cache with  Job Number

Delete All "B4000980DL"  Cache with Job Number


• Action Code '5' = Validate From UOM is not Used as To-UOM 

Find "B4000980A" cache with  Job Number, Branch/Plant, Short Item Number


Error = 0


While Record exist in Cache AND Error equals '0'


If  Cache-Line Number not equal to Line Number passed in
If  Cache-To UOM equals From UOM passed in
Set an Error "4847"
Error = 1

End
End

End While


• Action Code '6' = Reload the Cache with F41002

Delete All "B4000980A" Cache with  Job Number

Delete All "B4000980DL"  Cache with Job Number


Find F41002 with Branch/Plant and Short Item Number


While Record Exist in F41002


Cache-From F41002 = '1'

Add "B4000980A" Cache

End



Data Structure

D4000980E - Cache Update Unit Of Measure

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.

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

szFromUOMUMcharNONENONE

Special Input Expected
Not require if Action Code '4', '6'  ab 


^

szToUOMRUMcharNONENONE

Special Input Expected
Not require if Action Code '4', '6'  ab 


^

mnConversionFactorFromtoToCONVMATH_NUMERICNONENONE

Special Input Expected
Not require if Action Code '4', '6'  ab 


^

mnPrimaryConversionFactorCNV1MATH_NUMERICNONENONE

Special Input Expected
Not require if Action Code '4', '6'  ab 


^

mnJobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

mnLineNumberLNIDMATH_NUMERICNONENONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

cActionCodeACTNcharNONENONE

Special Input Expected
'1' = 'Add'

'2' = 'Update'

'3' = 'Delete'

'4' = 'Delete All'

'5' = 'Verify From/To UOM'

'6' = 'Load Cache from  F41002'ab 


^

cSuppressErrorMsgEV01charNONENONE

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

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.

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).

cUOMStructureCodeUSTRcharNONENONE

A code that determines the hierarchy of items in containers or pallets. For example:    Unit of Measure    1 Pallet = 24 Cases - structure code 1   
 1 Case = 12 Interpacks - structure code 2    1 Interpack = 3 Boxes - structure code 3    1 Box = 6  Eaches - structure code 4   Assign structure 
code 1 to the largest unit of measure, with smaller units assigned to codes 2, 3, and 4. Given the above structure example, when one item is 
stored in the warehouse the location detail (F4602) would have a structure of:        1 Pallet/ with 24 Cases on the Pallet/ with 12 Interpacks in each 
Case/with 3 Boxes in each Interpack/ with 6 Eaches in each Box  NOTE: It is not necessary to define your primary unit of measure within a 
structure. It always defaults in as the lowest level. Or, if you are changing the structure in a program, the system verifies that the primary is present 
in the structure and is the lowest level.

cRecordFromF41002EV01charNONENONE

Special Input Expected
'1' = Record exists in  F41002ab 


^

cExcludeFromSOEXSOcharOPTNONE

An option that indicates whether a particular unit of measure is invalid for a sales order.  Values are: Blank, N, or 0 The System includes the 
UOM in SO 1 or Y The System excludes the UOM from SO 

cExcludeFromPOEXPOcharOPTNONE

An option that indicates whether a particular unit of measure is invalid for use on a purchase order.  Valid Values are: Blank = The System 
includes the UOM in PO 0  = The System includes the UOM in PO 1  = The System excludes the UOM from PO N  = The System includes the 
UOM in PO Y  = The System excludes the UOM from PO

nSalesPriceCodeSEPCintegerOPTNONE

A code that determines which "from level" units of measure the system uses when searching for base prices and adjustments. This code 
also determines the order in which the system searches for the units of measure. The system always searches first for the unit of measure with 
the smallest sales price code value.

nPurchasePriceCodePUPCintegerOPTNONE

A code that determines the units of measure for the "from" level that the system uses when searching for purchase prices and adjustments. 
This code also determines the order in which the system searches for units of measure. The system first searches for units of measure that 
have the lowest purchase price code value.

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
ItemUOMEdits

ItemUOMEdits

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To determine if the conversion entered is conflicting with any previous uom conversions entered.   

Set on an error if a conflicting conversion is found.


Technical Specification



Edits:


1.Verify if the Item or Item/MCU, UM and RUM exist in the Unit Of Measure Table (F41002).

If the record exist:

If the application is in an ADD, set an error message on regardless of 

Suppress Error

Message flag with "2669-Duplicate Not Allow"

If the application is in an UPDATE mode:

Find if there is any record exist with the same  From Unit Of 

Measure passed in

with the Table.

If the record exist, retrieve the CNV1 and CONV, 

calculate the Primary Conversion Factor.  Multiply 

the calculated Primary Conversion Factor to the 

Conversion Factor

passed in to determine CNV1 for the passed 

in.  If the calculated CNV1 passed in

is not equal to CNV1 retrieved, set an 

error message on with "3351" based on 

SuppressErrorMessage flag and return "3351" to ErrorMessageID.


2.If the record does not exist with the passed in value, then swap the From Unit Of 

Measure to RUM and

To Unit Of Measure to UM and do a fetch.

If the record exist, then set an error message on "3349" based on Suppress Error 

Message ID 

and return ErrorMessage ID with "3349".


3.If 1 and 2 fails : Fetch with Item or Item/Branch and From Unit Of Measure only.

If Found,  retain the CNV1 retrieved and use To Unit Of Measure as the 

UM and Fetch on it.

If the second fetch with To Unit Of Measure as the UM does not exist, then 

set

ErrorMessageID with "3349" and set an error on based on 

SuppressErrorMessage flag.

If the second fetch found a record, then divide the CNV1 from the first 

fetch with the CNV1

from the second.  Compare the result with Conversion Factor 

passed in.  If it is not

equal , then set ErrorMessageID with "3351" and set an error on 

based on

SuppressErrorMessage.


Retrievals:

Retrieve the F41002 table with keys MCU, ITM, UM, RUM to verify any conflicts.


Returns:

Return the error message in the DTAI field.




Data Structure

D4000980A - Item UOM Edits

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.

cUOMByBranchBUMCcharNONENONE

A code that indicates how the system uses the branch/plant within the Item Specific Unit of Measure Conversion tables. Valid values are:    Y 
The system displays the item-specific conversion table when you add an item to a specific branch/plant.    N The system displays the 
item-specific conversion table for all branch/plants from the Item Master table.

szFromUnitOfMeasureUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

szToUnitOfMeasureRUMcharNONENONE

A code (UDC table 00/UM) that indicates a secondary unit of measure.

mnConversionFactorCONVMATH_NUMERICNONENONE

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

cSuppressErrorMessageEV01charNONENONE

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

cErrorCodeEV02charNONENONE

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

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.

szPrimaryUnitOfMeasureUOM1charNONENONE

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 
(each) or KG (kilogram).

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
UpdateItemUOMChangePrimaryConv

UpdateItemUOMChangePrimaryConv

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To change the primary conversion factor for all records set up for an item or item/branch based on a 
change of a conversion factor in the table.


Technical Specification



Retrievals:

1.This function assume the record has been updated in the Table (F41002)  prior in calling this 
function.

2.  Retrieve the F41002 table with keys MCU, ITM, UM, RUM to verify any conflicts. Use MCU if the 

BUMC is a 'Y'.  If BUMC is a 'N', search only by ITM.  

3.Retrieve the CNV1 from the passed in keys and retain the value.

4.Use the From Unit Of Measure as RUM an fetch with the Item or Item/Branch and RUM. 

5.For all record found with RUM, calculate the following:

CNV1-retrieved = CONV-retrieved x CNV1-passed in.

6.For all record found with RUM, repeat step 3. (Note:  Result is a recursive Call )


Returns:

Return the error message in the DTAI field.



^

Data Structure

D4000980C - Update Item UOM Change Primary Conversion Factor

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.

cUOMByBranchBUMCcharNONENONE

A code that indicates how the system uses the branch/plant within the Item Specific Unit of Measure Conversion tables. Valid values are:    Y 
The system displays the item-specific conversion table when you add an item to a specific branch/plant.    N The system displays the 
item-specific conversion table for all branch/plants from the Item Master table.

szFromUnitOfMeasureUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

szRelatedUnitOfMeasureRUMcharNONENONE

A code (UDC table 00/UM) that indicates a secondary unit of measure.

cSuppressErrorMessageEV01charNONENONE

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

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.

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
VerifyItemUOMDeletes

VerifyItemUOMDeletes

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

To determine if the line chosen to be deleted is necessary for the conversion back to primary.

Technical Specification

Edits:
 Check to see if the units of measure and the conversion factor passed are key in the conversion back 
to the primary unit of measure.  If by deleting this line another conversion for this item or 

item/branch will not be valid, issue error and place a '1' in the Suppress Delete parm.  Load the error 

'3349' into  the DTAI field and seton the error based on the EV01.  If EV01 is a '1', suppress the display 

of the error message.  If EV01 is a '0', set the error message.


Retrievals:

 Retrieve the F41002 table with keys MCU, ITM, UM, RUM to verify any conflicts.  Use MCU if the BUMC 
is a 'Y'.  If BUMC is a 'N', search only by ITM.


Returns:

Return the error message in the DTAI field, and if the record should not be deleted, return a '1' in 
the EV02 field.





^

Data Structure

D4000980B - Verify Item UOM Deletes

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.

cUOMByBranchBUMCcharNONENONE

A code that indicates how the system uses the branch/plant within the Item Specific Unit of Measure Conversion tables. Valid values are:    Y 
The system displays the item-specific conversion table when you add an item to a specific branch/plant.    N The system displays the 
item-specific conversion table for all branch/plants from the Item Master table.

szFromUnitOfMeasureUMcharNONENONE

A user defined code (00/UM) that identifies the unit of measurement for an amount or quantity. For example, it can represent a barrel, box, 
cubic meter, liter, hour, and so on.

szRelatedUnitOfMeasureRUMcharNONENONE

A code (UDC table 00/UM) that indicates a secondary unit of measure.

cSuppressDeleteEV02charNONENONE

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

cSuppressErrorMessageEV01charNONENONE

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

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.

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
VerifyUOMSequenceNumbers

VerifyUOMSequenceNumbers

Item UOM Validation

Major Business Rule

Object Name: B4000980

Parent DLL: COPBASE

Location: Client/Server

Language: C

Data Structure

D4000980G - Verify Sequence Numbers

Parameter NameData ItemData TypeReq/OptI/O/Both
mnJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

szBranchPlantMCUcharOPTNONE

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.

mnShortItemNoITMMATH_NUMERICOPTNONE

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

cSuppressErrorMsgEV01charOPTNONE

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

cErrorCodeERRCcharOPTNONE

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).

szSalesErrorMsgDTAIcharOPTNONE

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.

szPurchasingErrorMsgDTAIcharOPTNONE

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.

mnSalesLineNumberLNIDMATH_NUMERICOPTNONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

mnPurchasingLineNumberLNIDMATH_NUMERICOPTNONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

cModeEV01charOPTNONE

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

Related Functions

B9800100 Get Audit Information

Related Tables

F41002 Item Units of Measure Conversion Factors
ls '0'

If  Cache-Line Number equals to Line Number passed in

//Replacing the Primary Unique Keys from existing record in F41002

If   Cache-From UOM not equal to From UOM passed in   OR
      Cache-To UOM not equal to To-UOM passed in 


If   Cache-From F41002 = '1'
Add record to "B4000980DL" cache
End
End

Update "B4000980A" cache

Found = 1

Else
//   Verify Duplicate record

If   Cache-From UOM equals From UOM passed in   AND

      Cache-To UOM equals To-UOM passed in

Set an Error "2669"
Error = '1'

Else
IfCache-From UOM equals To-UOM passed in  AND
       Cache-To UOM equals From-UOM passed in


If   (1/Cache-CFFromtoTO) not equals Conversion From to TO

Set an Error "3351"
Error = 1

End
End

If  Error = '0'

Update "B4000980A" Cache
End
End
End

Read Next Cache Record

End While

If  No Cache Record  AND Found  equals '0'  AND Error equals '0'

Add "B4000980A" cache Record
End if


• Action Code '3' = Delete

Find "B4000980A"  Cache with: 

Job Number, Branch/Plant, Short  Item Number, From UOM, and To UOM


If  Found 

Delete "B4000980A" Cache Record
End

• Action Code '4' = Delete All 

Delete All "B4000980A" Cache with  Job Number

Delete All "B4000980DL"  Cache with Job Number


• Action Code '5' = Validate From UOM is not Used as To-UOM 

Find "B4000980A" cache with  Job Number, Branch/Plant, Short Item Number


Error = 0


While Record exist in Cache AND Error equals '0'


If  Cache-Line Number not equal to Line Number passed in
If  Cache-To UOM equals From UOM passed in