B1700285 - Format Time Remaining
1.Functional Description
This business function will format the time remaining field for output. This function will serve as a wrapper function for time remaining of less than
1,000,000, in which case it will call B1700280, to complete the formatting.
.
1.1Purpose
The purpose of this function is to format time in an HH:MM:SS format when time remaining is greater than
1,000,000 string length is greater than 9 (8 for HH:MM:SS + Null terminator).
1.2Setup Notes and Prerequisites
N1700810 must be used to derive the Math_Numeric Work Time for Time Remaining.
1.3Special Logic
if time remaining is less than 1,000,000 call B1700280 to pad 0's where applicable
else use B1700285 (this function) to display excess hours (greater than or equal to 100).
2.Datastructure
Type Variable Name I/O
MATH_NUMERIC mnTimeRemaining_MATH01; I
char szFormattedTimeRemaining_DS20[21]; O
char cMode_EV01; Not Used
char szErrorID_DTAI[11]; Not Used
char cSuppressError_EV01; Not Used
char cErrorCode; Not Used
3.Logic
If mnTimeRemaining_MATH01 is less than 1,000,000
Call B1700280 (This will pad string with appropriate 0's for HH:MM:SS display)
Else
Get the total length of the Math_Numeric String
Subtract 4, for MM and SS
Copy the remaining string segment from the left, since this is the total hours left to string output
add ':' to string output
Copy MM to string output
add ':' to string output
Copy SS to string output
D1700285 - Format Time Remaining
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnTimeRemaining_MATH01 | MATH01 | MATH_NUMERIC | OPT | NONE |
- - - Good Performance Low Value. | ||||
szFormattedTimeRemaining_DS20 | DS20 | char | OPT | NONE |
A 20 character generic description. | ||||
cMode_EV01 | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorID_DTAI | DTAI | char | OPT | 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
| ||||
cSuppressError_EV01 | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cErrorCode | ERRC | char | OPT | NONE |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
|
None |
None |