UpdatePrimaryLocation

Update Primary Location

Major Business Rule

Object Name: B4100220

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function verifies the existance of a record in the Item Location table (F41021).  If the record 

exists, it is changed to the primary location and the original primary location is changed to a 

secondary location.


Setup Notes and Prerequisites

The Short Item Number (ITM), Branch/Plant (MCU), Locationn (LOCN) and Lot Number (LOTN) parameters 

are required.


Special Logic:

None


Technical Specification


This function verifies if a Primary Bin exists with Short Item Number and Branch/Plant in the Item 

Location table (F41021).   If the Primary Bin exists, verify if Short Item Number, Branch/Plant, 

Location, and Lot Number passed in  exists.  If both exist, reset the Original Primary Bin (PBIN) from (P) to 

(S).  Save the following quantity fields:PCOM, FUN1, PREQ, PWBO, OT1A, and PBCK; and set the 

following original quantities to ZERO:  PCOM, FUN1, PREQ, QWBO,  and OT1A.  Set the passed in Short Item 

Number, Branch/Plant, Location, and Lot Number to be a new primary bin (P); and ADD the following 

quantities from the saved quantities to the new primary bin:  PCOM, FUN1, PREQ, QWBO, OT1A, and PBCK.  


NOTE:  If the saved PBCK is less than or equal to the saved  PCOM or the saved PCOM is less than 

zero, the saved PBCK  remains the same.  Otherwise, the saved PBCK equals PCOM.  Update both records in 

the Item Location table. 

Data Structure

D4100220 - Update Primary Location

Parameters:
Data Item Data Structure DescriptionI/ORequired

ITMShortItemNumberIY

MCUBranchPlantIY

LOCNLocationIY

LOTNLotNumberIY



^

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.

szLocationLOCNcharNONENONE

The storage location from which goods will be moved.

szLotNumberLOTNcharNONENONE

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

Related Functions

B9800100 Get Audit Information
XF41021 Update F41021 Locations

Related Tables

F41021 Item Location File