Functional Description
Purpose
This Function edits new lines entered at Cycle Count Entry time and performs edits for existing
lines.
Setup Notes and Prerequisites
None.
Special Logic
None.
Technical Specification
Processes in update mode if the UpAddMode parameter is 1 otherwise it processes in add mode.
Add Mode
An error is set if the mode is Add and the Branch Plant is blank.
The item description, short item number, unit of conversion, primary UOM, bulk packed flag, and
inventory cost level are retrieved from F4101. If the bulk packed flag is B error 4065 is set.
The pointer to the F4102 record, lot process type, GL category, serial number, grade, potency, and
quantities are retrieved.
If Serial Number Requested equals 4 error 4178 is set. If Serial Number Requested equals 5 error
4773 is set.
If the lot number is blank and the lot process type is 1, 2, 3, 5, 6, or 7 error 2745 is set.
The location is formatted into file format.
Verifies the lot when lot is not blank.
Retrieves the item cost level.
Retrieves the primary location, lot, and quantities when the cost level is 3.
Retrieves the unit cost for the item.
Converts the quantity entered from the unit of measure specified to the primary unit of measure.
Verifies that the cycle count number is valid.
Verifies that the lot is not a duplicate.
Update Mode
Converts the quantity entered into the primary unit of measure for the item.
Verifies Warehouse batch selection or forces user selection through the location Detail Selection
Window (P4605).
Related Tables
Table Table Description
F4101Item Master
F4102Item Branch
F4100Location Master
F4108Lot Master
F41021Item Location
F41002Item Unit of Measure
F4141Cycle Count Detail
F4142Warehouse Count Transactions
Related Business Functions
Source NameFunction Name
F4101 Get Item Master RowX4101
F4101Get Item Master InformationB40001040
F4102 Get Item Branch RowB4100210
F4102 Get Grade, Potency and QuantitiesB4100310
F4100 Format LocationB4000310
F4108 Verify Lot Not DuplicateX41DUP
Get Item Cost
Memory, Free Ptr To Data StructureB4000460
F41021 Get Item Location RowXF41021
Get Item Cost InformationXF4105
F41002 Get Item UoM ConversionB4000520
Memory Serial Number Qty CheckB4100970
F4141 Verify And Get Cycle Count RecordB4100660
F4141 Verify Duplicate Lots In Cycle CountB4100660
Memory, Verify Lot not Duplicated in Memory ListB4100410
Verify Location Detail Selection - FunctionN4600090
Processing
//Process add or update mode based on incoming parameter
If cEV01UpAddMode not equal to 1
//Add Mode
If GC Branch is = Blank
Or GC Branch Plant = NULL
If FC Branch Plant = Null
OR FC Branch Plant = "*"
Set on Error 0003
Else
GC Branch Plant = FC Branch Plant
EndIf
EndIf
EndIF
//Get Item description, short item number and unit of conversion
Call X4101(F4101 GetItem Master Row)
If SV Error Status is not equal to Success
ErrorStatus = 1
EndIf
If ErrorStatus not equal 1
//For the item that the user has entered, ensure that it is not a bulk time.
If BulkPackFlag is equal to "B"
Set On Error "4065"
ErrorStatus = 1
EndIf
If Error Status is not equal to one
//Gets the row pointer, Lot Process Type, Gl Category, and Serial Number Required.
Call B4100210(F4102 Get Item Branch Row)
If GENLNGItemBranchRecord is not equal to
And GENLNGItem BranchRecord is equal to
Call B4100310(F4102 Get Grade, Potency and Quantities)
Call B4000460(Memory, Free Ptr To Data Structure)
EndIf
//
//If Serial Number Required = 5, 6 => Memo Lot 1 and 2 are Required
//Warning Only
If ErrorStatus not equal 1
If Serial Number Requested is equal to "4"
Or Serial Number Requested is equal to 5
Set Error "4773"
If Serial Number Requested is equal to "5"
Set Error "4773"
EndIf
ErrorStatus = 1
EndIf
EndIf
//If the lot Number is blank and Lot Process Type is 1,2,3,5,6 and 7
//Highlight the lot number and set on error 2745
If ErrorStatus not equal 1
If LayerCSourceLotProcessTy is equal to
If Lot is equal to < Blank>
Or Lot is equal to
Set Error 2745
ErrorStatus = 1
EndIf
EndIf
EndIF
If ErrorStatus is not equal to "1"
//Format Location
Call B4000310(F4100 Format Location)
If Error Status is not equal to Success
ErrorStatus = 1
EndIf
EndIf
If ErrorStatus is not equal to "1"
If GC Lot is not equal to
//Verify Lot and returns an error if not valid
Call X41DUP(F4108 Verify Lot Not Duplicate)
If ErrorCode not equal to
ErrorStatus =1
EndIf
EndIf
EndIf
If ErrorStatus not equal to one
//Retieves and the item cost record ptr and returns an error.
Get Item Cost
EndIf
If SV Error Status is not equal to success
ErrorStatus =1
EndIf
If ErrorStatus not equal to 1
If CostLevel is equal to "3"
// Retrieve Primary Location and Lot for Cost
Call XF41021(F41021 Get Item Location Row)
Call XF41021(F41021 Get Item Location Quantities)
Call B4000460(Memory, Free Ptr To Data Structure)
Call XF4105(Get Item Cost)
EndIf
EndIf
//Use the pointer to get the unit cost
If ErrorStatus is not equal to 1
If GENLNG General Purpose Pointer is not equal to
And GENLNG General Purpose Pointer is not equal to
Call XF4105(Get Item Cost Information)
Call B4000460(Memory, Free Ptr To Data Structure)
EndIf
EndIf
//Since the unit cost for the Item Location Lot was not found in the F4105 get the
//Primary Location and lot for Item, and use this to get the unit cost for
//Item in the F4105. If this retrieval of unit cost using the primary location and lot
//results in an error, suppress it and take the unit cost as zero.
//Convert the quantity entered from unit of measure specified to primary
//unit of measure.
If ErrorStatus is not equal to 1
If Um is equal to
Or Um is equal to
UM = PrimUM
EndIf
EndIf
//Gets quantity to be converted to primary, and Quantity converted From to To
Call B4000520(F41002 Get Item UoM Conversion)
If SV ErrorStatus is not equal to Success
Error Status = 1
EndIf
If ErrorStatus is not equal to 1
If LotProcType is equal
And Lot is not equal to
And Lot is not equal to
//Returns an Error code if not valid Serial number
Call B4100970(Memory, Serial Number Qty Check)
If SV ErrorStatus is not equal to Success
Set Error "4723"
ErrorStatus = 1
Else
CheckSerialQty = 1
EndIf
EndIf
EndIf
//Update the grid display with new UM and quantity
If Error Status not equal to "1"
BCGC CycleNumber = BCFC Cycle Count Number
//Checks if the Record is valid
Call B4100660(F4141 Verify And Get Cycle Count Record)
If ErrorCode(from BSFN) is equal to "1"
Set Error "2463"
ErrorStatus = 1
EndIf
EndIf
If ErrorStatus is not equal to "1"
Call XF41021(F41021 Get Item Location Row)
If SV Error Status is not equal to Success
Set Error "0678"
ErrorStatus = 1
EndIf
EndIf
If ErrorStatus is not equal to "1'"
Call XF4108(F4108 Verify Lot Not Duplicate)
If General Error Returned(from BSFN)
ErrorStatus = 1
EndIf
Endif
If ErrorStatus is not equal to 1
Call B4100660(F4141 Verify Duplicate Lots In Cycle Count)
If ErrorCode is equal to "1"
ErrorStatus = "1
EndIf
EndIf
If ErrorStatus is not equal to "1"
//B4100410 Pass it GCBC fields: It will verify if rec !exist in grid, //
//and add it to Linked List
If BCGC LineNumber is equal to
BCFC LineId = BCFCLineId +1
BCGC LineNumber = BCFCLineId
EndIf
Call B4100410(Memory, Verify Lot not Duplicated in Memory List)
EndIf
//
//
Else
//
//
//Update Mode
//
//
//Convert qty from UOM entered to the Primary UOM for the given item.
If BCGC quantity is not equal to
Call B400520(F41002 Get Item Uom Conversion)
Else
BCGC ConvertedQuantity = "0"
BCVA PrimaryQtyCounted = "0"
EndIf
// If Lot Processing Type = 5, 6, 7 or Lot Process Type = 4 and Lot Number is not Blank,
//Validate the '1' qty integrity in the Cache
If BCGC Lot ProcType is equal to (4,5,6, 7)
And BCGCLot is not equal
And BCGCLot is not equal
Call B4100970(Memory,Serial Number Qty Check)
If SvErrorStatus is not equal to Success
Set Error "4723"
ErrorStatus = 1
Else
CherSerialQty = "1"
EndIf
EndIf
EndIf
//Verify Warehouse batch selection or force user selection through the location
//Detail Selection Window (P4605)
If ErrorStatus is not equal to one
Call N4600090(Verify Location Detail Selection Function)
If BCVACheckSerialQty is equal to "1"
^
D4101050A - Cycle Count Entry(Edit Line)
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szBranchPlant | MCU | char | NONE | NONE |
From the row. If blank, the header branch is used.ab
| ||||
szFCBranchPlant | MCU | char | NONE | NONE |
From the header. Defaults into the row branch if it is left blank.ab
| ||||
szItemNoUnknownFormat | UITM | char | NONE | NONE |
Primary item numberab
| ||||
cEV01UpAddMode | EV01 | char | NONE | NONE |
'1' = Updateab
| ||||
szDescription | DESC | char | NONE | NONE |
Description of the itemab
| ||||
mnIdentifierShortItem | ITM | MATH_NUMERIC | NONE | NONE |
Short item number ab
| ||||
szTFLAStandardUOMConversion | TFLA | char | NONE | NONE |
Used to calculate unit of measure conversions. If blank, uses item specific conversions. If a '1', bypasses item specific conversions.ab
| ||||
szIdentifier2ndItem | LITM | char | NONE | NONE |
| ||||
szIdentifier3rdItem | AITM | char | NONE | NONE |
| ||||
szUOMPrimaryUOM | UOM | char | NONE | NONE |
Primary unit of measure for itemab
| ||||
cCLEVInventoryCostLevel | CLEV | char | NONE | NONE |
Cost level of itemab
| ||||
cSRCELayerCSourceLotProcessTy | SRCE | char | NONE | NONE |
Lot processing type for item (From Item/Branch)ab
| ||||
szGLPTGlCategoryClassCode | GLPT | char | NONE | NONE |
G/L class code for item (From Item/Branch)ab
| ||||
szLOTNLot | LOTN | char | NONE | NONE |
Lot number enteredab
| ||||
szLOCNE1LocationE1 | LOCNE1 | char | NONE | NONE |
Display locationab
| ||||
szLOCNFileFormatLocation | LOCN | char | NONE | NONE |
File format locationab
| ||||
mnUNCSAmountUnitCost | UNCS | MATH_NUMERIC | NONE | NONE |
Cost enteredab
| ||||
szUOMUnitOfMeasureAsInput | UOM | char | NONE | NONE |
Defaults to primary UOM if blankab
| ||||
mnCNTConvertedQuantity | CNT | MATH_NUMERIC | NONE | NONE |
Quantity converted to primaryab
| ||||
cBUMCUomByBranch | BUMC | char | NONE | NONE |
Flag indicating whether UOM conversions are branch specificab
| ||||
mnTotalPriQtyCounted | CNT | MATH_NUMERIC | NONE | NONE |
Total primary quantity counted for the rowab
| ||||
mnQuantityInput | TRQT | MATH_NUMERIC | NONE | NONE |
A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and
| ||||
mnCYNOCycleCountNumber | CYNO | MATH_NUMERIC | NONE | NONE |
Cycle count number for the rowab
| ||||
cULOTAllowDuplicateLots | ULOT | char | NONE | NONE |
Flag indicating whether duplicate lots are allowedab
| ||||
mnLNIDGCLineNumber | LNID | MATH_NUMERIC | NONE | NONE |
Row line number. Incremented by 1 if left blank.ab
| ||||
mnLNIDFCLineNumber_2 | LNID | MATH_NUMERIC | NONE | NONE |
Last line number used. Increments as rows are added.ab
| ||||
mnJOBSJobnumberA | JOBS | MATH_NUMERIC | NONE | NONE |
Used in WMS(Warehouse Management System) processing.ab
| ||||
szCTIDComputerID | CTID | char | NONE | NONE |
Used in WMS processing.ab
| ||||
mnMATH01WMSLineNumber | MATH01 | MATH_NUMERIC | NONE | NONE |
Used in WMS processing.ab
| ||||
mnCYNOFCCycleCountNumber_2 | CYNO | MATH_NUMERIC | OPT | NONE |
The cycle count number at the header level. If the row level is left blank, will default into the row cycle count number.ab
| ||||
idGENLNGDupLotCache | GENLNG | ID | NONE | NONE |
Used in validating if duplicate lots have been entered for this series of transactions being processed.ab
| ||||
cMismatchQtyFlag | EV02 | char | NONE | NONE |
Used in WMS to see if the location detail quantities add up to the total.ab
| ||||
cInitalProcesses | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorsExist | EV01 | char | NONE | NONE |
Used in batch inbound processingab
| ||||
szTransactionAction | TNAC | char | NONE | NONE |
Used in batch inbound processingab
| ||||
szProgramId | PID | char | NONE | NONE |
Used in batch inbound processingab
| ||||
szDescriptionLine1 | DSC1 | char | NONE | NONE |
Used in batch inbound processingab
| ||||
szSalesReportingCode1 | SRP1 | char | OPT | NONE |
One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use. | ||||
szSalesReportingCode2 | SRP2 | char | OPT | NONE |
One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or
| ||||
szSalesReportingCode3 | SRP3 | char | OPT | NONE |
One of ten category codes for sales coding purposes. These codes can represent such classifications as color, material content, or use. | ||||
szSalesReportingCode4 | SRP4 | char | OPT | NONE |
One of ten category codes to be used for sales coding purposes. These codes can represent such classifications as color, material
| ||||
szSalesReportingCode5 | SRP5 | char | OPT | NONE |
One of ten category codes to be used for sales coding purposes. These codes can represent such classifications as color, material
| ||||
mnSecondaryQtyAsInput_SQOR | SQOR | MATH_NUMERIC | OPT | NONE |
If the secondary unit of measure option in Inventory Constants is selected,this field will display on data entry screens. | ||||
szSecondaryUoMAsInput_UOM2 | UOM2 | char | OPT | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. | ||||
mnSecondaryQtyConverted_SQOR | SQOR | MATH_NUMERIC | OPT | NONE |
If the secondary unit of measure option in Inventory Constants is selected,this field will display on data entry screens. | ||||
szSecondaryUnitOfMeasure_UOM2 | UOM2 | char | OPT | NONE |
A user defined code (00/UM) that indicates an alternate unit of measure for the item. |
None |
None |