1.Functional Description
This business function will get read the MRP Regular Item Cache (using B34001290) and Write Time
Series Records to the Time Series Table (F3413). It will also calculate the ATP/CATP data and optionally
write those records to F3413 table.
1.1Purpose
This function is used to wirte the Time Series Data for an Item after Planning the Item for the MRP
Planning program P3482. The function will return error codes necessary. This function is also shared by
R3483 for Multi-Plant MRP Processing.
1.2Setup Notes and Prerequisites
The Manufacturing Data from the Item Balance table must be obtained and all other data must be loaded
in the Regular Item Cache and Bucketless Date Cache. The JOBS and CTID must be obtained using
B3100710 and B9800180 before calling this function. Please note that this is the output after planning and
care must be taken while making changes in the code.
1.3 Special Logic
2.Technical Specifications
Allocate Space for Arrays
Open Table
Load @BD Array Elements with Date Branch
If Input WriteTSForCoby <> '1'
Else
Load Quantity Array Elements from F34UI005.
End If
Calculate Time Series Data
Write Time Series Data
The following actions have to be performed by the Business Function.
1.Open Tables
Open F34UI005 and F3413 Tables.
If unable to Open the tables
Exit with an Error Code of '1'.
Endif
2. Allocate Space for the Arrays
Allocate Memory Space for the following Arrays/Structure
@BD[$$PN] - Bucket Date Array
DSPED[$$PN] - Structure Containing the following Elements
DSBAU- Beginning Available Unadjusted
DSBA - Qty Beginning Available
DSLEX - Lot Expired Qty
DSIR - Qty In Rec Routing
DSFCSU - Forecast Qty Unadjusted
DSFCST - Forecast Qty Adjusted
DSSOU - Sales Order Qty Unadjusted
DSSO - Sales Order Qty Adjusted
DSPOU - Purch Order Qty Unadjusted
DSPO - Purch Order Qty Adjusted
DSWOU - Work Order Qty Unadjusted
DSWO - Work Order Qty Adjusted
DSRSU - Rate Schedule Qty Unadjusted
DSRS - Rate Schedule Qty Adjusted
DSFWOU - Firm WO Parts List Qty Unadjusted
DSFWO - Firm WO Parts List Qty Adjusted
DSPWO - Planned WO Parts List Qty
DSID- Inter Plant Demand
DSPLO - Planned Order Qty
DSPRC - Planned Order Qty from Process
DSEAU- Ending Available Unadjusted
DSEA- Ending Available Adjusted
DSATPU- ATP Undajusted
DSATP- ATP Adjusted
DSCATPU- Cum ATP Undajusted
DSCATP- Cum ATP Adjusted
DSSHP- Shipped Qtys Adjusted
3. Load @BD Array Elements
Wk Index ($B) = 1
While Cache Code Error = '0' And $B <= $$PN
If Bucket Flag = 'B' Or Forecast Consumption Flag <> ' ' then
@BD[$B] = Date from Date Record
$B++
End If
Call B3401270 in mode '6' to get next date record using Date Input Branch.
End While
4. Load Quantity Array Elements from Cache and UI.
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'BAU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSBAU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'BA' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSBA[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'LEX' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSLEX[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'IR' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSIR[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'FQU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFCSU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'FQ' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFSCT[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'SOU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSSOU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'SO' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSSO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'POU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSPOU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'PO' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSPO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'WOU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSWOU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'WO' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSWO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'PQU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFWOU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'PLU' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFWOU[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'FPQ' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFWO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'FPL' (2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSFWO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'PPQ'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSPWO[$B] += Quantity from Cache.
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'RSU'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSRSU [$B] += Quantity from Cache
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'RS'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSRS[$B] += Quantity from Cache
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'ID'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSID[$B] += Quantity from Cache
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'PLQ'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSPLO[$B] += Quantity from Cache
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
$B = 1
Call B3401290 in mode '1', sequential fetch, with Input Job, Input Branch, and 'SHP'(2 keys)
While Cache Error Code = '0'
While Date from Cache > @BD[$B]
$B++
End While
DSSHP[$B] += Quantity from Cache
Call B3401290 in mode '6', sequential fetch, same 2 keys.
End While
/* Load Process qtys from F34UI005 if they exist */
Read Records from F34UI005 using Input JOBS, CTID, Branch and Item. Order by Index 1.
If Read Failed then
While Date from F34UI005 > @BD[$B]
$B++
End While
DSIR[$B] += F5NQ01
End If
If Quantity Type = 'PWU' then
DSWOU[$B] += F5NQ01.
End If
If Quantity Type = 'PWO' then
DSWO[$B] += F5NQ01.
End If
If Quantity Type = 'PRU' then
DSRSU [$B] += F5NQ01.
End If
If Quantity Type = 'PRS' then
DSRS[$B] += F5NQ01.
End If
If Quantity Type = 'PPQ' then
DSPRC[$B] += F5NQ01.
End If
Read Records from F34UI005 using Input JOBS, CTID, Branch and Item. Order by Index 1.
If Read Failed then
While Date from F34UI005 > @BD[$B]
$B++
End While
DSBAU[$B] += F5NQ01
End If
If
D3400590 - MRP, Write Time Series Data
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnJobnumber | JOBS | MATH_NUMERIC | NONE | NONE |
The job number (work station ID) which executed the particular job. | ||||
szComputerId | CTID | char | NONE | NONE |
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
| ||||
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
| ||||
mnSafetyStocks | SAFE | MATH_NUMERIC | NONE | NONE |
The quantity of stock kept on hand to cover high-side variations in demand. | ||||
szReportingCode | RT | char | NONE | NONE |
A code that identifies the table that contains user defined codes. The table is also referred to as a UDC type. | ||||
cSafetyStockFlag | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
nNumBucketDates | INT01 | integer | NONE | NONE |
Number of Days in Future to Query for Responses Due. | ||||
nFirstATPPeriod | INT02 | integer | NONE | NONE |
Number of Days in the Past to Query for Quote Requests Received. | ||||
nNoofPastDuePeriods | INT03 | integer | NONE | NONE |
Event point for Integer. | ||||
jdBeginningDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
jdPlanningDate | DATE02 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
cBegAvailUnadjusted | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cBeginningAvailable | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cReceiptRouting | 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,
| ||||
cPurchOrderUnadjusted | EV04 | char | NONE | NONE |
PeopleSoft event point processing flag 04. | ||||
cPurchOrderAdjusted | EV05 | char | NONE | NONE |
A flag that indicates whether automatic spell check is turned on. | ||||
cWorkOrderUnadjusted | EV06 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cWorkOrderAdjusted | EV07 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cRateScheduleUnadjusted | EV08 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cRateScheduleAdjusted | EV09 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cLotExpiration | EV10 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cForecastUnadjusted | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cForecastAdjusted | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cSalesOrderUnadjusted | 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,
| ||||
cSalesOrderAdjusted | EV04 | char | NONE | NONE |
PeopleSoft event point processing flag 04. | ||||
cInterPlantDemand | EV05 | char | NONE | NONE |
A flag that indicates whether automatic spell check is turned on. | ||||
cPartsListUnadjusted | EV06 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cFirmPartsList | EV07 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cPlanPartsList | EV08 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cEndingAvailUnadjusted | EV09 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cEndingAvailAdjusted | EV10 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cPlannedOrders | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cATPUnadjusted | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cATPAdjusted | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cCATPUnadjusted | 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,
| ||||
cCATPAdjusted | EV04 | char | NONE | NONE |
PeopleSoft event point processing flag 04. | ||||
cSuppressErrorMessage | EV05 | char | NONE | NONE |
A flag that indicates whether automatic spell check is turned on. | ||||
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
| ||||
jdFirstBeginningDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
cForecastConsumptionFlag | EV02 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cWriteTSForCoBy | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
szDateBranch | 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
| ||||
szJobNumberAsString | JOB | char | NONE | NONE |
Job Number | ||||
cConsolidationMethod | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cShippedQtys | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
cProcessPlanningFlag | EV01 | char | OPT | NONE |
sakai!
| ||||
cFirmInterplantDemand | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cTotalIndependentDemandUnadj | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cTotalIndependentDemandAdj | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cInterplantConsumesForecast | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szProgramId | PID | char | OPT | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
cFirmInterplantDemandUnadj | 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. |
B3401270 Cache, Process MRP Bucketless Dates | ||||
B3401290 Cache, Process MRP Item Quantities | ||||
B3500060 Cache, Process Multi Plants |
F3413 MPS/MRP/DRP Summary File | ||||
F34UI005 MRP Orders/Requirements User Index-Process Item | ||||
F4102 Item Branch File |