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
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
Error = 1
Read Next Cache Record
End While
If Error = 1
Convert Conversion From to Primary
Read "B4000980A" with Job Number
While Record Exist in Cache
Update "B4000980A" Cache Record
Update "B4000980A" Cache Record
PrevCache = CacheData
While Done equals 0
Job Number<=Job Number
Branch/Plant<=PrevCache-Branch/Plant
Short Item Number<=PrevCache-Short Item Number
From UOM<=PrevCache-To UOM
If Record Found
Validate all conversion
Read "B4000980A" with Job Number
While Record Exist in Cache
IfNot Calculated AND FindCache-From UOM not equal Cache-From UOM
Done = 0
While Done equals '0 AND Record Exist
Cache.CFFromtoPrimary = Cache.CFFromToTO / FindCache.CFFromtoTO
If Cache.CFFromtoPrimary not equal FindCache.CFFromToPrimary
Error = 1
// Load Cache Data to array of Cache Data 1-5
// Validate Duplicate Structure Code
IfArrayCache-StructureCode = Cache-Structure Code
Error = 1
Column ID = 4
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]
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
IfStart = 1 AND Prev Qty < ArrayCache[Index]-CFFromtoPrimary
Error = 1
Structure = Structure + 1
Start = 1
Index = Index + 1
End
^
D4000980D - Cache Calculate Conversion Factor
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szBranchPlant | 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
| ||||
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
| ||||
szPrimaryUOM | 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
| ||||
cSuppressErrorMsg | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMessageID | 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
| ||||
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
| ||||
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
| ||||
mnGridColumnToSetError | MATH02 | MATH_NUMERIC | NONE | NONE |
Special Output Returned
|
B9800100 Get Audit Information |
F41002 Item Units of Measure Conversion Factors |