Q35WOCloseValidation
Cantara Business Function to perform validation checks and optionally, submit checklist responses and update the status of a work order. The function processes the work order and all of its children, grandchildren, etc (to a specified depth). For each work order processed, checklist response submissions and updates to the specified status will only occur if the work order's validation tests pass.
The caller of the function must specify which validation tests are to be performed.
Available Validations
- Check that timecards exist for the work order.
- Check for any timecard records that are still running.
- Check for any unissued stock parts list records.
- Check for quality test records still requiring valid responses.
In the event of a validation failure, a returned parameter will identify the work order which failed.
Additional requirements and behavior are defined in the comments below.
For clarification of the sequence of operations performed by this function, refer to the Q35WOCloseValidation Processing Example.
Data Structure
Name | Type | Inclusion | Direction | Comments |
---|---|---|---|---|
DOCO_mnWorkOrderNumber | INTEGER | REQUIRED | IN | This is the Work Order number to be used as the start of the validations and updates. It must be a top-level work order, meaning that it is its own parent. This work order must be at a status between the SRST_szStatusFrom and SRST_szStatusThru values (inclusive) |
EV01_cFinalMode | CHARACTER | OPTIONAL | IN | Value "1" = Update mode. Value "2" is internal Update mode and should never be used when calling this function, but is used internally to define that this is processing a child / grandchild / etc. records in update mode. Any other value, including blank, is Validate-only mode. |
EV01_cBypassSubmitCLists | CHARACTER | OPTIONAL | IN | Applies to Update mode only. Value "1" bypasses submitting checklists / quality results. Any other value does submit checklists / quality results in Update mode, if the work order has any Quality Specs attached (defined in FQ35372T). This submission occurs before submitting checklist/quality results for any of the current work order's child work order records, which applies iteratively to its grandchildren work orders etc |
EV01_cBypassWOStatusUpdate | CHARACTER | OPTIONAL | IN | Applies to Update mode only. Value "1" bypasses work order status update. Any other value does perform work order status update. The updates occur after updating status of child work orders, which applies iteratively to its grandchildren work orders etc. |
EV01_cValidateTCCheck | CHARACTER | OPTIONAL | IN | This controls the behavior for validation that timecards exist for the work order, and applies iteratively to child/grandchild/etc work orders. Value "2" bypasses validation altogether. Value "1" performs the validation and a warning data item is returned in DTAI_szTCExistsErrorAlias if validation fails. Any other value performs the validation and an error data item is returned in DTAI_szTCExistsErrorAlias and DTAI_szErrorDataItem parameters, plus ERRC_cErrorCode value "1" if validation fails. |
EV01_cTCStoppedCheck | CHARACTER | OPTIONAL | IN | This controls the behavior for validation that timecards are still running for the work order, and applies itteratively to child/grandchild/etc work orders. Value "2" bypasses validation altogether. Value "1" performs the validation and a warning data item is returned in DTAI_szTCStoppedErrorAlias if validation fails. Any other value performs the validation and an error data item is returned in DTAI_szTCStoppedErrorAlias and DTAI_szErrorDataItem parameters, plus ERRC_cErrorCode value "1" if validation fails. |
EV01_cQualityTestCheck | CHARACTER | OPTIONAL | IN | This controls the behaviour for validation that required Quality Tests have responses for the work order, and applies itteratively to child/grandchild/etc work orders. Value "2" bypasses validation altogether. Value "1" performs the validation and a warning data item is returned in DTAI_szQualityTestErrorAlias if validation fails. Any other value performs the validation and an error data item is returned in DTAI_szQualityTestErrorAlias and DTAI_szErrorDataItem parameters, plus ERRC_cErrorCode value "1" if validation fails. |
EV01_cWOPartsCheck | CHARACTER | OPTIONAL | IN | This controls the behaviour for validation that all stock parts list items have been issued for the work order, and applies itteratively to child/grandchild/etc work orders. Value "2" bypasses validation altogether. Value "1" performs the validation and a warning data item is returned in DTAI_szWOPartsErrorAlias if validation fails. Any other value performs the validation and an error data item is returned in DTAI_szWOPartsErrorAlias and DTAI_szErrorDataItem parameters, plus ERRC_cErrorCode value "1" if validation fails |
INT01_mnMaximumLevels | INTEGER | OPTIONAL | BOTH | This integer determines how many levels down the iterations of child/grandchild etc are permitted to go. Maximum value is 5. E.g., value 2 will assess the work order, its children and its grandchildren, but will not go beyond this. |
INT01_mnCurrentLevel | INTEGER | OPTIONAL | IN | Should always be passed in as "0" or be left blank when calling this function. As child and grandchild records are being processed iteratively this function calls itself with the current level +1. This parameter is then used by those executions to evaluate if it is permitted to go down another level or not when measured against the INT01_mnMaximumLevels value. |
SRST_szStatusFrom | UDC | REQUIRED | IN | This determines the lower status limit for the work order and child/grandchild/etc work orders that will be validated and updated in Update mode. |
SRST_szStatusThru | UDC | REQUIRED | IN | This determines the upper status limit for the work order and child/grandchild/etc work orders that will be validated and updated in Update mode. |
SRST_szStatusUpdateTo | UDC | OPTIONAL | IN | Required for Update mode if EV01_cBypassWOStatusUpdate value is not "1". This is the status that the work order and its child/grandchild etc work orders will be updated to if validations are successful in Update mode. JDE Work Order activity rules must permit update to this status from all statuses in the From-Thru range, or errors will occur. Status updates occur at the lowest level first, for all children of a parent, then their parent work order's status is updated. This occurs iteratively from the bottom of each branch until eventually the original parent work order's status is update as the last status update. |
VERS_szP1311Version | STRING | OPTIONAL | BOTH | If not provided, then version ZJDE0001 is used. |
VERS_szR1312Version | STRING | OPTIONAL | BOTH | If not provided, then version XJDE0001 is used (note JDE does not ship with a ZJDE0001 version) |
VERS_szP17714Version | STRING | OPTIONAL | BOTH | If not provided, then version ZJDE0001 is used. |
EV01_cSuppressErrors | CHARACTER | OPTIONAL | IN | "1" prevents this function setting NER errors, but errors are still returned in the DATI_szErrorDataItem. This value is also passed to functions that are called internally, if they also support NER error suppression. |
LONGMSG_szRelatedWOList | STRING | OPTIONAL | BOTH | Each Work Order that is validated is listed here, as a comma-spaced-list, in the sequence that they are evaluated. This is also the sequence that these work orders have checklist / quality responses submitted in, but is not the sequence that the work order status updates occur in, as the status updates occur after evaluation of all of that work order's children has occurred. |
DTAI_szTCExistsErrorAlias | ERRORALIAS | OPTIONAL | OUT | If Timecard Existence is validated, and no timecard records are found, then either a warning or error data item is returned here, depending on the EV01_cValidateTCCheck value. |
DTAI_szTCStoppedErrorAlias | ERRORALIAS | OPTIONAL | OUT | If Running Timecards are validated, and any running timecard records are found, then either a warning or error data item is returned here, depending on the EV01_cTCStoppedCheck value. |
DTAI_szQualityTestErrorAlias | ERRORALIAS | OPTIONAL | OUT | If responses for Required Quality Tests are validated, and any required quality test records are found without the required responses, then either a warning or error data item is returned here, depending on the EV01_cQualityTestCheck value. |
DTAI_szWOPartsErrorAlias | ERRORALIAS | OPTIONAL | OUT | If issue of Work Order Parts List stock items is validated, and any unissued stock parts list records are found, then either a warning or error data item is returned here, depending on the EV01_cWOPartsCheck value. |
ERRC_cErrorCode | CHARACTER | OPTIONAL | OUT | Out only. Value "1" indicates that a significant error has occurred, or blank indicates that no significant errors occurred. These are the only expected values. |
DTAI_szErrorDataItem | ERRORALIAS | OPTIONAL | OUT | If a significant error occurs, then the Error Data Item is returned here. |
DOCO_mnErrorWorkOrderNumber | INTEGER | OPTIONAL | OUT | If any of the validation checks are defined to return an Error if the validation fails, then the first evaluated Work Order that triggered the error is returned here. As this function is called iteratively to assess child / grandchild / etc work orders, then this work order may be several levels deep. |
RMK_szWOStatusUpdateRemark | STRING | OPTIONAL | IN | This is the text remark that is reported on the GL journal record, such as "Meter Entry". |
EV01_cWOStatusUpdateReserveObj | CHARACTER | OPTIONAL | IN | Value "1" reserves the work order while status update is being performed. Any other value does not reserve the work order while status update is performed. |