1.Functional Description
This business function will write the total On Hand Qty from Location Master F41021 and, optionally,
the Lot Quantity by Expiration Date into the MRP Item Quantity Cache. The quantity information is
written to the cache with Quantity Type "BAU" (Beginning Available Unadjusted) and "LXU" (Lot Expired
Unadjusted).
1.1Purpose
This function is used to obtain data from the F41021 and F4108 table for MRP Planning Program P3482.
The function will return error codes necessary.
1.2Setup Notes and Prerequisites
The MRP Item Quantity Cache is managed by business function B3401290.
This function emulates S005B. (In P3483, this function emulates S005 when $IBCK=' ')
1.3Special Logic
None
2.Technical Specifications
The following actions have to be performed by the Business Function.
1. Open tables
Open tables F41021 and F4108
If Consolidation Method = '1' Or '2'
Open F35UI001
End If
If WriteBAUQtyToUI is '1' then
Open F34UI005
End If
If Error in Opening, Exit the Function with Error Code = '1'
2. Load the Required Data from the F41021 table
((LILOTS = " ") Or (LILOTS = Any of the 5 Input Lot Statuses))
If Input Consolidation Method = '1' then
Wk Cache Branch = Input Consolidation Branch
Else
Wk Cache Branch = Input Branch
End If
Wk Exit Flag = '0'
Fetch the record from F41021
If Fetch Failed
Break
Endif
Get F4108 record using LIITM, LIMCU and LILOTN as keys
If Input $$LEXP = '1' and IOMMEJ < Input First Date and IOMMEJ <> 0
IOMMEJ = Input First Date
Endif
Wk Qty = LIPQOH
If Input Transit flag = '1'
Wk Qty = Wk Qty + LIQTTR.
Endif.
If Input Inspect flag = '1'
Wk Qty = Wk Qty + LIQTIN.
Endif.
If Input Other1 flag = '1'
Wk Qty = Wk Qty + LIQTO1.
Endif.
If Input Other2 flag = '1'
Wk Qty = Wk Qty + LIQTO2.
Endif.
If IOMMEJ <> 0 and SVOT1Y = 'Y' and $$PUFG <> '1' and SVSTDP > 0
Wk Qty = Wk Qty * Lot Potency (IOLOTP) / Stand Potency (SVSTDP)
Endif
If Input $$LEXP = '1' and IOMMEJ <> 0 and IOMMEJ <= Input Last Date
Wk Cache Branch, IOMMEJ, and QuantityType = 'LXU'
Add Wk Qty to the Quantity from the cache record and
using Wk Cache Branch, IOMMEJ, 'LXU', and Wk Qty
Endif
Wk Total Qty = Wk Total Qty + Wk Qty
EndWhile
If Consolidation Method = '1' Or '2'
Hand = Wk Total Qty and Transaction Qty = Wk Total Qty.
If Input Safety Stock flag = '1'
Wk Total Qty = Wk Total Qty - Input SAFE
Endif
If Input Consolidation Method <> '1'
'BAU', Wk Total Qty
If WriteBAUQtyToUI = '1' then
Insert a record with 'BAU', Input First Date and Wk Total Qty into
F34UI005.
End If
'BA', Wk Total Qty
End IF
Close all Tables
Exit the function with Error Code = 0
D3400370A - MRP, Write On Hand And Lot Qty To Cache
Data Item Data Structure DescriptionI/ORequiredNotes
JOB Job Number IY Used when accessing cache
bsfn.
ITM Item Number IY SVITM
MCU Branch IY SVMCU
OT1Y Potency Control flag IY From Item Bal IBOT1Y
STDP Standard Potency Value IY From Item Bal IBSTDP
SAFE Safety Stocks IY From Item Bal IBSAFE
DRQJ First Date IY @DT[1]
DRQJ Last Date IY @DT[$PND] = $$ENDD
EV01 Potent Unit flag IY $$PUFG
EV02 Transit flag I '1' - Include Transit Qty
EV03 Inspect flag I '1' - Include Inspect Qty
EV04 Other1 flag I '1' - Include Other1 Qty
EV05 Other2 flag I '1' - Include Other2 Qty
EV06 Lot Expiration flag I $$LEXP
LOTS Lot Status Code 1 I $LSTS1
LOTS Lot Status Code 2 I $LSTS2
LOTS Lot Status Code 3 I $LSTS3
LOTS Lot Status Code 4 I $LSTS4
LOTS Lot Status Code 5 I $LSTS5
EV07 Safety Stock flag I '1' Subtract Safety Stocks
EV09 Suppress Error Message I ' ' - Display Errors '1' -
Suppress Error Messages
ERRC Error Code O '0' - Success (Default) '1' -
Errors in function
DTAI Error Message ID O Blanks - Success '3143' -
Errors
EV01 Consolidation Method I '1' or '2' or ' '
MCU Consolidation Branch I Required if Consolidation
Method is
'1'
JOBS Job Number for UI I Y
CTID Computer ID I Y
EV01 WriteBAUQtyToUI I Y Always ' ' when called from
R3483. When called from R3482,
pass in a '1'
ONLY when an item is a co product or
a by product.
^
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
| ||||
szBranch | 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
| ||||
cPotencyControlFlag | OT1Y | char | NONE | NONE |
A code that indicates whether you control the item by potency. | ||||
mnStandardPotencyValue | STDP | MATH_NUMERIC | NONE | NONE |
The percentage of active ingredients normally found in an item. | ||||
mnSafetyStocks | SAFE | MATH_NUMERIC | NONE | NONE |
The quantity of stock kept on hand to cover high-side variations in demand. | ||||
cPotentUnitFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cTransitFlag | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cInspectFlag | EV03 | char | NONE | NONE |
A radio button that specifies the level at which trace/track result is to be displayed. Select the Detail to display all transactions except IB, IX,
| ||||
cOther1Flag | EV04 | char | NONE | NONE |
PeopleSoft event point processing flag 04. | ||||
cOther2Flag | EV05 | char | NONE | NONE |
A flag that indicates whether automatic spell check is turned on. | ||||
cLotExpirationFlag | EV06 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cLotStatusCode1 | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
cLotStatusCode2 | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
cLotStatusCode3 | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
cLotStatusCode4 | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
cLotStatusCode5 | LOTS | char | NONE | NONE |
A user defined code (41/L) that indicates the status of the lot. If you leave this field blank, it indicates that the lot is approved. All other codes
| ||||
cSafetyStockFlag | EV07 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cSuppressErrorMessage | EV09 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorCode | ERRC | char | NONE | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
szErrorMessageID | DTAI | char | NONE | NONE |
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
| ||||
szJobNumber | JOB | char | NONE | NONE |
Job Number | ||||
jdFirstDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdLastDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
cConsolidationMethod | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szConsolidationBranch | 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
| ||||
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szComputerID | CTID | char | NONE | NONE |
cSupplyDemandExists | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cProjectPlanning | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cProjectSpecificItem | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnSequenceNumber | SEQN | MATH_NUMERIC | OPT | NONE |
A number used to organize the table into a logical group for online viewing and reporting. |
B3401290 Cache, Process MRP Item Quantities |
F41021 Item Location File | ||||
F410211 Project Commitment Detail Table | ||||
F4108 Lot Master |