GetLocationRecordForDefault

Get Location Record For Default

Minor Business Rule

Object Name: B4100550

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description.
Purpose

This function will retrieve the Item Location record (F41021) for the transaction being processed.  

If it is not found and the flag is set to default from the primary location, the primary Item Location 

record will be retrieved.  If the location being processed does not exist, a flag will be set to 

indicate that an Item Location record will need to be added.


Setup Notes and Prerequisites

None


Special Logic

None


Technical Specifications

Related Tables 

Table Table Description

F41021Item Location



2.3Related Business Functions

Source NameFunction Name

VerifyAndGetItemLocationXF41021



2.4Processing 


If Inventory Reversal not equal '1'

If Default from Primary equals '1'

If  LOCN equals blanks AND LOTN equals blanks,

Call VerifyAndGetItemLocation(XF41021) with Index = 1, 

Keys = 4. If Return Item Location equals '1', set Return Record 

equal '1'

If not found,

Call VerifyAndGetItemLocation(XF41021) with Index = 4, 

Keys = 3. If Return Item Location equals '1', set Return Record equal '1'

If not found

Move '1' to ItemLocationRcdNotFound

Move '1' to AddItemLocation

else

Call VerifyAndGetItemLocation(XF41021) with Index = 1, 

Keys = 4. If Return Item Location equals '1', set Return Record 

equal '1'

If F41021 record not found

If Item Location Warning  equals blanks

If Allow Location Add not equal '1'

issue error '0678' and highlight item number.

Move '1' to work field Item Location Warning

else

issue error '0294' and highlight item number

else

Move '1' to work field AddItemLocation

else

Move blanks to work field AddItemLocation


else

If Lot Process Type equals blanks

OR Lot Process Type equals zeros

Call VerifyAndGetItemLocation(XF41021) with Index = 1, 

Keys = 4. If Return Item Location equals '1', set Return Record 

equal '1'

If F41021 record not found

If Item Location Warning  equals blanks

If Allow Location Add not equal '1'

issue error '0678' and highlight item 

number.

Move '1' to work field Item Location 

Warning

else

issue error '0294' and highlight item 

number

else

Move '1' to work field AddItemLocation

else

Move blanks to work field AddItemLocation

else

Move '1' to AddItemLocation

else

Call VerifyAndGetItemLocation(XF41021) with Index = 1, Keys = 4. If Return Item Location 

equals '1', set Return Record equal '1'




Data Structure

D4100550 - Get Location Record For Default

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShortItemNumberIY

MCUBranchPlantIY

LOCNLocationIN

LOTNLotNumberIN

SRCELotProcessTypeIN

EV01InventoryReversalIN

EV01DefaultFromPrimaryIN

EV01AddItemLocationON

EV01ItemLocationWarningON

EV01AllowLocationAddIN

EV01ReturnItemLocationIN

EV01ItemLocationNotFoundON

GENLNGidF4102RecordPtrON



^

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.

cLotProcessTypeSRCEcharNONENONE

A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108). Valid 
codes are:    0   Lot assignment is optional. You can manually assign numbers. Quantity can be greater than one. (Default)    1   Lot assignment is 
required. The system assigns numbers using the system date in YYMMDD format. Quantity can be greater than one.    2   Lot assignment is 
required. The system assigns numbers in ascending order using Next Numbers. Quantity can be greater than one.    3   Lot assignment is 
required. You must manually assign numbers. Quantity can be greater than one.    4   Serial number assignment is optional except during shipment 
confirmation. Quantity must not exceed one.    5   Serial number assignment is required. The system assigns numbers using the system date 
in YYMMDD format. Quantity must not exceed one.    6   Serial number assignment is required. The system assigns numbers in ascending 
order using Next Numbers. Quantity must not exceed one.    7   Serial number assignment is required. You must manually assign numbers. 
Quantity must not exceed one.

cInventoryReversalEV01charNONENONE

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

cDefaultFromPrimaryEV01charNONENONE

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

cAddItemLocationEV01charNONENONE

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

cItemLocationWarningEV01charNONENONE

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

cAllowLocationAddEV01charNONENONE

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

cReturnF41021PtrEV01charNONENONE

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

cItemLocationNotFoundEV01charNONENONE

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

idF41021RecordPtrGENLNGIDNONENONE

General purpose ID variable.

Related Functions

XF41021 Update F41021 Locations

Related Tables

F41021 Item Location File