generate/cbs2.gif Write Bin Code Hook (R-WHMRB.MAC) generate/enh73.jpg

Requires Warehouse Manager Component


 

The script file must be located in your CAPITAL program directory and must have the file name R-WHMRB.MAC

If the script can be found, it is executed to write (save) the stock item's Bin code when executing the Warehouse Manager Wireless Transfer Utility.

Entry Values

Variable

Purpose

ItemQuantity

The suggested/required quantity to be transferred.

If the quantity assigned to ItemQuantity is negative, then this is the quantity leaving the bin.

If the quantity assigned to ItemQuantity is positive, this is the quantity arriving into the bin.

ErrorDesc

This is an optional text string that may be assigned when returning a FALSE value from this hook. If this variable is not assigned a value, the default error message will be "The bin code is unacceptable."

ItemName

The stock item product code or part number.

ItemStockID

The source stock item's stock ID.

SourceBin

The bin the stock item came from.

SourceLocation

The source location the stock item came from.

Stock->X

The fields of the stock table available for inspection.

Staux000->X

The fields of the stock user (auxiliary) table available for inspection.

Supplier->X

The fields of the related supplier record.

TargetBin

The bin the stock item will go to.

TargetLocation

The target or destination location the stock item is going to.

Type->X

The fields of the related stock group.

Return Values

Return TRUE to indicate that the Bin code to be written into the system is acceptable.

Alternately, you may return a FALSE value, which will cause the Transfer utility to reprompt the user for the Bin code.

The script in the following example replicates the standard behaviour of the transfer utility.

Example

* Writes the bin code

STOCK->BIN := TargetBin

RETURN TRUE

____________________________

Related Topics:

Grab Bin Code Hook

Scripting Hooks

Warehouse Manager Wireless Hooks



Help Topic Map