1.Functional Description
1.1Purpose
This business function will forward or backward schedule the input date using the Work Day Calendar
Table F0007.
1.2Setup Notes and Prerequisites
None.
'b7'b7'b7'b7
1.3Special Logic
None.
2.Technical Specifications
2.4Processing
If the Schedule Type is blanks, set it to 'B'.
a. From the input date, get the Month ,Year and Day. Load the Month and Year into CZMT and CZYR
respectively.
b. Try to read the Work Day Calendar table (F0007) using using CZMMCU (value as input Branch), CZYR
and CZMTas the key. If not found, Load "*ALL" into CZMMCU and try to read the table.
c. If both attempts fail, set the Error code to '1' and exit.
d. If record is found , Load the day fields (CZTD01 to CZTD31) into an array.
e. If Backward Schedule,
Do While No of Days > 0
If Day is >= 1 and <= 31
Day = Day - 1.
If array element [Day] is = "W"
No of Days = No of Days - 1.
Endif.
Else
Day = 31.
Month = Month - 1.
If Month is < 0
Month = 12.
Year = Year - 1.
Endif.
Read Work Day Calender as in step b/c.
Endif.
Endif.
f. If Forward Schedule,
Do While No of Days > 0
If Day is >= 1 and <= 31
Day = Day + 1.
If array element [Day] is = "W"
No of Days = No of Days - 1.
Endif.
Else
Day = 1.
Month = Month + 1.
If Month is > 12
Month = 1.
Year = Year + 1.
Endif.
Read Work Day Calender as in step b/c.
Endif.
Endif.
g. Convert Month, Year and Day to Output Date and return.
If the Work Day Calendar is not found in the Calendar table, the function will return '1' in the
Error Code field otherwise it will return a '1'. The Output date will be the scheduled date.
D3100300 - Forward Backward schedule dates
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
szBranchPlant | 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
| ||||
jdInputDate | DRQJ | JDEDATE | NONE | NONE |
The date that an item is scheduled to arrive or that an action is scheduled for completion. | ||||
jdOutputDate | STRT | JDEDATE | NONE | NONE |
The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine
| ||||
mnNumberOfDays | LTLV | MATH_NUMERIC | NONE | NONE |
A value that represents the leadtime for an item at its assigned level in the production process, as defined on Plant Manufacturing Data.
| ||||
cScheduleType | WS | char | NONE | NONE |
A user defined code to designate intra-pay period work schedules. This code can be used for reporting and to select employees to be
| ||||
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
| ||||
szWorkDayCalendarType | WDCT | char | OPT | NONE |
A user defined code (42/WD) that specifies how the calendar is used. For example, the calendar might be specific to an industry such as
| ||||
szWorkDayCalendarKey | WDCK | char | OPT | NONE |
A code used to classify values within a calendar type. For example, if the calendar type is ROUTE, you can enter a code that specifies a
|
None |
None |