F41021WriteLocationAndCardex

F41021 Write Location And Cardex

Major Business Rule

Object Name: N4101120

Parent DLL: COPBASE

Location: Client/Server

Language: NER

Functional Description
Purpose
This function will verify if a location exists in the Item Location Table (F41021).  If  the record does not exist, a new location will be added to the Item 
Location Table and Item Ledger (F4111) will be updated.  


Setup Notes and Prerequisites

None

Special Logic

None

Technical Specifications

Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
ITMShort Item NumberIY

MCUBranch PlantIY

LOCNLocationIY

LOTNLot NumberIY

EV01Default From Primary LocationIN'1' = Use Primary Location for default 

information

PIDProgram IDIY

DTAIError Message IDON

ERRCError CodeON'1' = Record Exists '0' = No Record

MMEJLot Expiration DateON


Related Tables 
Table Table Description
F41021Item Location 


Related Business Functions

Source NameFunction Name
B4000050Inventory Cardex


Processing 

Fetch Item Location Table (F41021) with the following keys:

LIITM<=ShortItemNumber

LIMCU<=BranchPlant

LILOCN<=Location

LILOTN<=LotNumber


IfRecord Not Found


IfLot Number is not Blank


F4108VerifyAndGetLotNumber 

BranchPlant<=BranchPlant

ShortItemNumber<=ShortItemNumber

LotNumber<=LotNumber

LotPotency=>F4108 - LotPotency (wf)

LotGrade=>F4108 - LotGrade (wf) 

LotStatus=>F4108  Lot Status (wf)

LotExpirationDate=>Lot Expiration Date

End


PrimaryBin (wf)= 'S'

F41021-LotStatus (wf)  = ' '

F41021-GLPT (wf) = ' '


IfDefaultFromPrimary equals to '1'


VerifyAndGetItemLocation (XF41021)
ShortItemNumber<=ShortItemNumber
BranchPlant<=BranchPlant

Index<=4

Keys<=3

GLCategory=>F41021 - GLPT (wf)

LotStatusCode=>F41021  Lot Status (wf)


If  F41021 Primary Bin is not found (Return an Error)


PrimaryBin = 'P'


End

End

Fetch Item Branch (F4102)
IBITM<=ShortItemNumber
IBMCU<=BranchPlant

IBLITM=>SecondItemNumber
IBAITM=>ThirdItemNumber

IBGLPT=>F4102  GLPT  (wf)
IBLOTS=>F4102 - Lot Status


If   F41021- LotStatusCode(wf)  equals BLANK


If   F4108-LotStatus (wf) is not equal to BLANK
F41021-LotStatusCode = F4108-LotStatus (wf)

Else

If  F4102-LotStatus (wf) is not equal to Blank
F41021-LotsStatusCode = F4102-LotStatus (wf)
End

End


End


If  F41021  GLPT (wf) equals BLANK


F41021-GLPT (wf) = F4102  GLPT (wf)

End

Write F41021 with
LIMCU<=BranchPlant
LIITM<=ShortItemNumber

LILOCN<=Location

LILOTN<=LotNumber

LIGLPT<=F41021-GLPT (wf)

LILOTS<=F41021-LOTS (wf)


Write Inventory Cardex (B4100050)



End





^

Data Structure

D4101120A - F41021 Write Location And Cardex

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMShort Item NumberIY

MCUBranch PlantIY

LOCNLocationIY

LOTNLot NumberIY

EV01Default From Primary LocationIN  

PIDProgram IDIY

DTAIError Message IDON

ERRCError CodeON

MMEJLot Expiration DateON

SUPPSSuppress Error MessageIN

^

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICOPTNONE

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

szBranchPlantMCUcharOPTNONE

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.

szLocationLOCNcharOPTNONE

The storage location from which goods will be moved.

szLotNumberLOTNcharOPTNONE

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

cDefaultFromPrimaryEV01charOPTNONE

'1' = Use Primary Location for default information
^

szProgramIDPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

cErrorCodeERRCcharOPTNONE

'1' = Record Exists '0' = No  Recordab 

^

cSuppressErrorMessageSUPPScharOPTNONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

jdLotExpirationDateMMEJJDEDATEOPTNONE

The date on which a lot of items expires. The system automatically enters this date if you have specified the shelf life days for the item on 
Item Master Information or Item Branch/Plant Information. The system calculates the expiration date by adding the number of shelf life days to 
the date that you receive the item. You can commit inventory based on the lot expiration date for items. You choose how the system commits 
inventory for an item on Item Master Information or Item Branch/Plant Information.

Related Functions

None

Related Tables

None