F4108GetNextNumber

F4108 Get Next Number

Minor Business Rule

Object Name: B4100070

Parent DLL: COPBASE

Location: Client/Server

Language: C

Functional Description

Purpose
If in add mode and the lot number is blank this function will assign the number from X0010 and 
validate that the number does not already exist.  If in change mode, it will validate that the number does 

exist


Setup Notes and Prerequisites


Special Logic


Technical Specifications


Parameters:

LotNumberLOTN(input/output)
ShortItemNumberITM(input)

BranchPlantMCU(input)


Edits:


1.) Retrieve System Constants (F4009)
If the Bob Mode is Add:

If Lot Number is equal to blanks

In Do loop:

Get next number from X0010 ( LIKE WE DID IN GetNextDocumentNumber)

If the system constant in the F4009 is set to allow duplicate lots

Fetch with 3 keys (LOTN,ITM,MCU) to the F4108 to see

  if the lot exists yet

Else

Fetch with 1 key (LOTN) to the F4108 to see if the lot exits

yet

If the lot is found assign another number form X0010 and fetch again

until a unique number is found

Else

If the system constant in the F4009 is set to allow duplicate lots

Fetch with 3 keys (LOTN,ITM,MCU) to the F4108 to see

   if the lot exists yet

Else

Fetch with 1 key (LOTN) to the F4108 to see if the lot exits

yet

If the record exist give error "0002" and highlight the Lot Number

If the record does not exist do nothing and return


  If the Bob Mode is Change

If the system constant in the F4009 is set to allow duplicate lots

Fetch with 3 keys (LOTN,ITM,MCU) to the F4108 to see

   if the lot exists yet

Else

Fetch with 1 key (LOTN) to the F4108 to see if the lot exits

yet

If the record does not exist give error "0002" and highlight the Lot Number

If the record does exist do nothing and return



Retrievals:




Returns:

1.) Lot Number

^

Data Structure

D4100070 - F4108 Get Next Number

Parameters:
Data Item Data Structure DescriptionI/ORequired

LOTNszLotNumberI/ON

SRCEcLotProcessTypeIN

ITMmnShortItemNumberIN

MCUszBranchPlantIN

ERRCcErrorCodeON

EV01cSuppressErrorMsg IN

DTAIszErrorMessageIDON


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szLotNumberLOTNcharNONENONE

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

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.

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.

cErrorCodeERRCcharNONENONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cSuppressErrorMsgEV01charNONENONE

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

szErrorMessageIDDTAIcharNONENONE

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.

cModeEV01charREQNONE

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

Related Functions

X41DUP Verify Duplicate Lot
X41LOT Assign Lot Number

Related Tables

F4009 Distribution/Manufacturing Constants
F4108 Lot Master