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'
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 Name | Data Item | Data Type | Req/Opt | I/O/Both | 
|---|---|---|---|---|
| mnShortItemNumber | ITM | MATH_NUMERIC | NONE | NONE | 
An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
  | ||||
| szBranchPlant | MCU | char | NONE | NONE | 
An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
  | ||||
| szLocation | LOCN | char | NONE | NONE | 
The storage location from which goods will be moved.  | ||||
| szLotNumber | LOTN | char | NONE | NONE | 
A number that identifies a lot or a serial number. A lot is a group of items with similar characteristics.  | ||||
| cLotProcessType | SRCE | char | NONE | NONE | 
A code that indicates whether lot or serial number is assigned. Lot and serial number processes use the Lot Master table (F4108).
Valid 
  | ||||
| cInventoryReversal | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cDefaultFromPrimary | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cAddItemLocation | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cItemLocationWarning | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cAllowLocationAdd | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cReturnF41021Ptr | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| cItemLocationNotFound | EV01 | char | NONE | NONE | 
An option that specifies the type of processing for an event.  | ||||
| idF41021RecordPtr | GENLNG | ID | NONE | NONE | 
General purpose ID variable.  | ||||
| XF41021 Update F41021 Locations | 
| F41021 Item Location File |