WriteFromLotForReversal

Write From Lot For Reversal

Major Business Rule

Object Name: B4100530

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose

This function writes a Lot Master record (F4108) for the FROM  side of an Inventory Transfer and 
deletes the Lot Master record for the TO side of an Inventory Transfer. 


Setup Notes and Prerequisites

The Item Number (ITM), Branch/Plant (MCU)) and Allow Duplicate Lots (ULOT) are required input 

parameters.


Technical Specification

This function retrieves the Lot Master for the TO Branch, Item and Lot Number passed in.  If the 
record exists, delete the TO Lot Master record and create a FROM Lot Master record if the Allow Duplicate 

Lots = 'N'.


Processing

 

//   Retrieve the record using the 'TO' MCU, ITM, and LOTN.  If the record exists for the ' TO' MCU,  

then delete the 'TO' MCU record from F4108 and change the 'TO' MCU with 'FROM' MCU and added the 

'FROM' MCU record with the 'TO' MCU data to F4108.

//


Retrieve F4108 with Branch/Plant, Short Item Number, Lot Number


If Allow Duplicate Lots  equals 'N',

Call 
DeleteLotMaster(X4108)
with parms as follows:
Short Item NumberShort Item Number

Branch/PlantBranch/Plant

Lot NumberLot Number



Retrieve F4108 with Branch - From, Short Item Number, Lot Number

If record not found

Call 
GetAuditInfo(B9800100) and update the F4108:
Short Item NumberShort Item Number
Branch/PlantBranch - From

Lot NumberLot Number - From





^

Data Structure

D4100530 - Write From Lot For Reversal

Parameters:
Data Item Data Structure DescriptionI/ORequired
ITMItem NumberIY

MCUBranch/PlantIY

LOTNLot NumberIN

MCUBranch - FromIN

LOTNLot Number - FromIN

ULOTDuplicate LotsIY

PIDProgramIDIN

^

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.

szLotNumberLOTNcharOPTNONE

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

szFromBranchPlantMCUcharOPTNONE

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.

szFromLotNumberLOTNcharOPTNONE

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

cAllowDuplicateLotsULOTcharOPTNONE

A code that determines whether the system can assign the same lot to multiple items. Valid values are:    1   Do not allow duplicate lots. The 
lot is restricted to one item and one branch/plant.    2   Allow duplicate lots. You can create a lot that contains multiple items and 
branch/plants.    3   Do not allow duplicate lots. The lot is restricted to one item, but can contain quantities in multiple branch/plants.

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.

mnReverseQtyTQOHMATH_NUMERICOPTNONE

The total quantity on hand in the primary unit of measure for an item at the beginning of the cycle count.

jdTransactionDateTRDJJDEDATEOPTNONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

Related Functions

B9800100 Get Audit Information

Related Tables

F4108 Lot Master