Location Validation and Lot Creation

Purpose of Document

The audience for this note is someone with developer level knowledge.

In inventory transaction LOCN (Lot Number) can be populated on the fly. This document is to explain how it add/reverse lot information through inventory transaction. This is mainly handled by Inventory Transaction Master business function XT4111Z1.

First of all, to understand what a lot is and what factors affect lot information refer to <Document 642908.1> E1: 41: Lot and Serial Number Control.

Overview

Unlike other master file creation there is no routine for checking whether to write F4108 or not. So this is hard coded in routine based on nTransaction (or application ID) in calling X4111Z1 - Inventory Transaction.

Q1> What is routine to edit location and populate lot information?

Inventory Transaction handles input data or default data in following sequence:

  1. Edit Location
  2. Default from Primary Location
  3. Edit Lot Number
  4. Unload Quantity
  5. Assign CFGSID
  6. Validate Lot
  7. Check Lot Duplication
  8. Unload Lot Default
  9. Unload Exp Date Info
  10. Verify Effectivity Date
  11. Assign Lot Status
  12. Store Dates

Q2> What are the Action Code handled in Inventory Transaction?

There are two types of transactions:


Q3> What are transactions which creates Lot Master (F4108)?

So long as it meets below nTransaction it always update F4108:

n Application cFormat
Location
cUpdate
LotMaster
1
2
3
12
P4112 - Inventory Issues
P4114 - Inventory Adjustments
P4113 - Inventory Transfers
P4116 - Item Reclassifications
1 1
4 & 15
Both stock
& Routing
P4312 - PO Receipts
P43214 - Purchase Receipts Inquiry (PO Receipt Reversal)
P43253 - Routing Disposition
P43250 - Receipt Routing Movement and Disposition
1 1
5
13
P4205 - Shipment Confirmation
R42800 - Sales Update
0 1
6 R41413 - Cycle Count Update 0 1
7 R41610 - Tag Inventory Update 0 1
8 P4242 - Transfer Order Processing 1 1
9
10 Completion
P31111 - obsolete
P31113 - Work Order Inventory Issues
0 1
11 Issue P31112 - obsolete
P31114 - Work Order Completions
0 1
14 P4205 - Shipment Confirmation
R42800 - Sales Update
0 1
17 Transportation Compartment Based Load 0 1
19 Manufacturing Accounting Records 0 0
20 DFM - Completion 0 1
21 DFM - Issue 0 0


Q4> When inventory transaction formats location?

Then XT4111Z1 calls business function B4000310 - FormatLocationWithTemplate (F4100 Format Location With Template) because File Location and Display Location are different from each other as you have defined from Location Master (F4100).


Q5> What does format location function perform?

This function will convert the Display Format to File Format or File Format to Display Format. It also will validate the location with the F4100 and Convert it to parsed data depending on what is sent in cMode and cValidate.

Some parameters that will affect the output:

Detail routines are:

If cSegmentControl is ON (where F41001.SCTL - Location Segment Control(Y/N) - Inv = Y) then it goes to routine CheckLocationMaster (B4000360)


Q6> How is the Primary Location defaulted?

Default to Primary Bin is handled as below:

If the location and lot number were passed in as blanks AND the processing option is set to default from a primary bin then retrieve primary location.

  1. Blank (input) LOCN - Location, LOTN - Lot Number will be looked at first to see if it exist in F41021.
  2. If it does not exist then a primary location will be retrieved.

as return value nDefaultLocnUsed flag is set to 1, so system can by-pass the lot number processing and do directly to F41021 record retrieval.


Q7> How is the lot number edited and validated?

Refer to E1: 41: Lot and Serial Number Control (Doc ID 642908.1). When non blank lot number is entered firstly it gets edited then it gets validated as below:

F4102.SRCE (Layer Code - Source) to indicate lot process type, which are 3 different groups,

Note: Refer to <Document 1348247.1> - E1: 40: System Assigned Lot Number Format per Process Type (F4102.SRCE) for Lot Number assignment

Q8> When does a new lot number get added?


Q9> What is detail Lot Data verification?

Verify Lot Potency, Lot Grade, Expiration Date through B4100300 - LotProcessing (Lots, Verify Lot Information) and VerifyLotDateRanges (Verify Lot Date Ranges).


Q10> How does quantity data get from F41021?

Item Location Quantity Unload (based on quantity accumulated) based on F41021 - Item Location:

Only when cDefaultLocationLotFromPrimary = 1 assign output location = F41021.LOCN and Lot Number = F41021.LOTN


Q11> When does CFGSID gets assigned/updated?

Note:


Q12> How does Lot Information default?

In validating lot, internally:

If Lot Expiration Date is blank and Shelf Life Days is not zero calculate the LotExpirationDate based on Shelf Life Days.

Note: PrimaryLotNumber will be blank if the DefaultFromPrimary Location flag is turned off. PrimaryLotNumber is retrieved from Item Location record if the DefaultFromPrimary is turned on.

Parameter cDefaultFromLotMaster is defined as below:

And parameter cExpirationDateEditMode is defined:

Then call B4100540 - LoadLotExpirationDateAndDefaults (F4108 Get Lot Expiration Date)

If the Lot exist already in Lot Master (F4108), the Expiration Date, Grade, Potency, Lot Description, Memo Lot 1, Memo Lot2, must be passed back. They cannot be override by the user.

To change those objects, user must use Lot Master Revision Application (P4108) to make the changes.

Except for Lot Status, this only the location change only.

A. cLotStatusCode = F4108.lots
B. jdExpirationDate = F4108.MMEJ
C. If jdOnHandDate is NULL then jdOnHandDate = jdTransactionDate
D. If jdBasedOnDate is NULL then jdBasedOnDate = jdOnHandDate
E. To get jdLotEffectivityDate

If input jdLotEffectivityDate is NULL then compuate it as below:

1st, Set special handling code:

2nd, Compute mnEffectiveDays

When special handling code flag is 'M'

If F4102.LEDD (Lot Effective Default Days) is greater than 36500
mnEffectiveDays = 36500 (which is max value)
Else
mnEffectiveDays = F4102.LEDD (represented as Manufacturing Effective Days)
End if

When special handling code flag is 'P'

If F4102.PEFD (Purchasing Effective Days) is greater than 36500
mnEffectiveDays = 36500 (which is max value)
Else
mnEffectiveDays = F4102.PEFD
End if

If it fails to get data from F4102 get it from F4101 and repeat above routine

3rd, jdLotEffectivityDate = jdOnHandDate + mnEffectiveDays

If input jdLotEffectivityDate is NOT NULL and jdLotEffectivityDate > jdOnHandDate: Error "492F - "Effective Date less than On Hand Date"

F. jdExpirationDate
If input mnShelfLifeDays > 36500 (100 years)
mnEffectiveDays = 36500
Else
mnEffectiveDays = mnShelfLifeDays
End if

Only when lot enhancement is on then below date is to be computed.

G. jdSellByDate
if F4102.SBDD > mnLimitedShelfLife (=36500 which is hard coded value for 10 years of shelf life days)
mnEffectiveDays = 36500
Else
mnEffectiveDays = F4102.SBDD
End If
H. jdBestBeforeDate
If F4102.bbdd > mnLimitedShelfLife
mnEffectiveDays = 36500
Else
mnEffectiveDays = F4102.BBDD
End If
I. jdUserLotDate1
If F4102.u1dd > mnLimitedShelfLife
EffectiveDays = 36500
Else
mnEffectiveDays = F4102.u1dd
End If
J. Below dates are computed same pattern,

If above values are not found from F4102 then same computation will be performed based on F4101. Refer to <Document 1053082.1> E1: 34: Lot Effective Dates - Manufacturing and Purchasing Days.


Q13> Check Lot Duplication


Q14> Assign Lot Status (F41021)

And check input parameter cAllowHeldLotsEdit. If this value is not 1 then disallow lot status by issuing error "0959 - Item Balance on Lot Hold"


To discuss information further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the JDE1 Distribution Community.

To look at upcoming or archived Advisor Webcasts please see Advisor Webcast Details (Doc ID 548764.1) if your topic is not currently scheduled please suggest it.