F41021CompareLotStatus

F41021CompareLotStatus

Minor Business Rule

Object Name: N4601120

Parent DLL: CWARE

Location: Client/Server

Language: NER

Purpose
This function will fetch the lot status of the FROM and TO locations, compare them, and return a flag indicating if there is a difference in lot status 

between the two locations based on the definition stated in error message 025Z.


Error 025Z definition:

CAUSE . . . . .The Lot Status is about to be updated.  This warning message is issued for one of the following three reasons:

1.The FROM location is on hold and the TO location is not on hold.  The default Lot Status will come from the FROM location.
2.The FROM location is not on hold and the TO location is on hold.  The TO Lot Status will remain in the TO location.
3.The FROM and TO locations are both on DIFFERENT holds.  The TO Lot Status will remain in the TO location.


RESOLUTION. . Either enter a new Lot Status or Press Enter to take the defaults.



Parameters:

Data Item Data Structure 

DescriptionI/ORequiredNotes ITMmnIdentifierShortItemIY MCUszBranchPlantIY FLOTszLotIY FLOCszFromLocationIY LOTScFromLotStatusON TLOCszToLocationIY LOTScToLotStatusON EV01cChangeOfStatusFlagON


Related Tables 

Table Table Description F41021Item Location File


Processing 

Fetch FROM lot/location status from F41021 using 

- ITM
- MCU
- FLOC

- FLOT

If fetch is successful, set FromLocationExistsFlag to 1, otherwise set it to 0.


Fetch TO lot/location status from F41021 using 

- ITM
- MCU
- FLOC

- FLOT

If fetch is successful, set ToLocationExistsFlag to 1, otherwise set it to 0.


If the FROM status is not equal to the TO status and FromLocationExistsFlag is equal to 1 and ToLocationExistsFlag is equal to 1, return a 1 in the 

ChangeOfStatusFlag field.  Otherwise, return ChangeOfStatusFlag set to 0



Local variables 


Variable NameAlias FromLocationExistsFlagEV01 ToLocationExistsFlagEV01

Data Structure

D4601120A - F41021CompareLotStatus

Parameter NameData ItemData TypeReq/OptI/O/Both
mnIdentifierShortItemITMMATH_NUMERICREQINPUT


szBranchPlantMCUcharREQINPUT

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.

szLotLOTNcharREQINPUT

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

szFromLocationFLOCcharREQINPUT

The storage location from which goods will be moved.

cFromLotStatusLOTScharOPTOUTPUT

A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes 
indicate that the lot is on hold. You can assign a different status code to each location in which a lot resides on Item/Location Information or 
Location Lot Status Change.

szToLocationTLOCcharREQINPUT

The storage location to which goods will be moved.

cToLotStatusLOTScharOPTOUTPUT

A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes 
indicate that the lot is on hold. You can assign a different status code to each location in which a lot resides on Item/Location Information or 
Location Lot Status Change.

cLotStatusChangeFlagEV01charOPTOUTPUT

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

Related Functions

None

Related Tables

None