1.Functional Description
This function will read and calculate the available quantity for transfer given a supply branch.
1.1Purpose
This function will return the quantity available before adjusting for lot expired quantities and the
quantity available after adjusting lot expired quantities and quantities transferred to other demand
branches.
1.2Setup Notes and Prerequisites
1.3Special Logic
2.Technical Specifications
1.Open F35UI001
2.If Failed Exit Function with errors
3.Output Error Code = '0'
4.FetchKeyed from F35UI001 using JOB, CTID, and Input Supply Branch
5.If Fetch Successful
6. Output Quantity Available Before (MATH01) = Quantity From Cache Record(MAPQOH)
7. Output Quantity Available After(MATH02) = Quantity From Cache Record.(MATRQT)
8.End If
9.If Input $LEXP = '1' And Output Quantity Available After(MATH02) > 0
10. // Adjust Qty Available for Lot Expired Quantities up to @DT[$X]
11. Wk Lot Expired Total = 0
12.
13. Call B3401290 in mode '1' using Input Supply Branch, 'LXU'.
14. While Cache Code Error = '0'
15. If Date From Cache Record(DRQJ) > Input Supply Date then
16. Call B3401290 to Close Cursor and Free Ptr
17. Break From While Loop
18. End If
19. Wk Lot Expired Total = Wk Lot Expired Total + Lot Expired Qty from Cache
20. Call B3401290 in mode '6' using Input Supply Branch, 'LXU' to fetch next
record.
21. End While
22.
23. Wk Difference = MAPQOH - MATRQT
24. If Wk Difference > Wk Lot Expired Total
25. Wk Lot Expired Qty = 0
26. Else
27. Wk Lot Expired Qty = Wk Lot Expired Total - Wk Difference
28. End If
29. Output Quantity Available After(MATH02) = Output Quantity Available After(MATH02) -
Wk Lot Expired Qty
30.End If
31.If Cache Cursor <> 0
32. Call B3401290 to close cursor, mode '9'
33.End If
34.If Output Quantity Available After(MATH02) < 0 then
35. Output Quantity Available After(MATH02) = 0
36.End IF
^
D3500040 - MRP, Calculate Available Transfer Qty from Cache
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
jdSupplyDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
cIncludeLotExpiredQtys | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szSupplyBranch | MMCU | char | NONE | NONE |
A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which
| ||||
mnQtyAvailBeforeLotExpired | MATH01 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance Low Value. | ||||
mnQtyAvailAfterLotExpired | MATH02 | MATH_NUMERIC | NONE | NONE |
- - - Good Performance High Value. | ||||
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
| ||||
cSuppressErrorMessage | SUPPS | char | NONE | NONE |
A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.
0 = allow
| ||||
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 | ||||
mnJobNumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szComputerID | CTID | char | NONE | NONE |
B3401290 Cache, Process MRP Item Quantities |
F35UI001 MPS/MRP Planning - Multiple Plant User Index |