1.Functional Description
This business function will get the nearest Bucket Date for a given date based on the data in the MRP
Bucketless Date Cache. This is used in the MRP Program to get the bucket date nearest to the given
date. As of 1/2/97, it can also look for a nearest Forecast Consumption Bucket Date from the Bucketless
Date Cache.
1.1Purpose
This function is used to get the bucket date nearest to the Input date or the nearest Forecast
Consumption Bucket Date..
1.2Setup Notes and Prerequisites
The MRP Bucketless Date Cache must be have been loaded using B3400360 before calling this function.
1.3Special Logic
None
2.Technical Specifications
The following actions have to be performed by the Business Function.
1. Calculate Output Date
Output Date = Input Date
Call B3401270 with Action Code = '9' (Get Nearest) with key values Branch and Input Date, comparison
flag is 'A'. (This will fetch a date record >= Input Date).
If Cache Error Code = '0'
If (Input Find Forecast Cons Bucket = '1' And Forecast Con Flag from Cache <> ' ' ) OR(Input
Find Forecast Cons Bucket <> '1' And Bucket Flag from Cache = 'B')
Output Date = Date from Cache
Else
Output Error Code = '1'
Call B3401270 with Action Code = '1' (Get) with key values Branch and Date from
Cache,Sequential Fetch is '1'. (This will fetch a date record = Date from Cache).
While Cache Error Code = '0'
If (Input Find Forecast Cons Bucket = '1' And Forecast Con Flag from Cache <>
' ' )OR(Input Find Forecast Cons Bucket <> '1' And Bucket Flag from Cache = 'B')
Output Date = Date from Cache
Output Error Code = '0'
break
End If
End While
End If
Else
Output Error Code = '1'
End If
2. If any Errors, Exit program with Error code = '1' and Error Message = '3143'
3.Also, free any cursor pointers and close cursor used by this function.
D3400550 - MRP, Get Bucket Date from Cache
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
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
| ||||
jdInputDate | DATE01 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
cSuppressErrorMessage | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. | ||||
jdOutputDate | DATE02 | JDEDATE | NONE | NONE |
Event point for JDE Date. | ||||
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 | ||||
cFindForecastConsumptionBucket | EV01 | char | NONE | NONE |
An option that specifies the type of processing for an event. |
B3401270 Cache, Process MRP Bucketless Dates |
None |