C1-WO-VALID
This algorithm is invoked when the user clicks the Validate button. It validates the records which are in the Pending status. It validates the following:
-
The account ID given in the record is valid.
Note: If the account ID is invalid, it derives the account ID using the respective account identifier type and account identifier combination. Once the account ID is derived, the corresponding record is updated in the C1_UPLOAD_REQ_DTLS table. If the system could not derive the account ID using the account identifier type and account identifier combination, the status of the record in the C1_UPLOAD_REQ_DTLS table is changed to Invalid. -
The entity type is a valid and active value of the REF_WO_ENTITY_FLG lookup field.
-
The entity type given in the record for the entity ID is correct.
-
The entity (i.e., bill, bill segment, or adjustment) exists for the respective account in the system.
-
The bill ID given in the record is in the Complete status.
-
The bill segment ID or adjustment ID given in the record is in the Frozen status.
-
The given adjustment is present on any bill of the respective account.
-
The write off request type given in the record is valid and in the Active status. Its action flag is set to Write Off .
-
The write off amount is less than zero.
-
The write off amount is not greater than the eligible write off amount and the eligible write off amount is not equal to zero.
-
The adjustment type given in the record is valid and its A/P Request Type Code flag is set to Refund.
-
One record with a bill (for example, B01) and another record with the bill segment (for example, BS01) or adjustment (for example, AD01) of the same bill (i.e., B01) are not present in the upload request.
-
The amount matches the decimal positions of the respective currency.
-
The entity is not already included in any write off request that is in the non-final status.
-
The characteristic type given in the record is valid and its characteristic entity is set to Refund/Write Off Request.
-
The adhoc characteristic values are validated as per the validations defined in the respective algorithm.
-
The predefined characteristic value is already defined for the characteristic type.
-
The foreign key reference characteristic value is valid.
-
The two or more records with the same entity type and entity ID combination do not exist in the upload request.
Note: If duplicate records exist in the upload request, it validates and changes the status of one record to Valid and the status of the remaining records to Invalid.
If any of above validations fail, the status of the record in the C1_UPLOAD_REQ_DTLS table is changed to Invalid. However, if all the above validations are successful, the status of the record in the C1_UPLOAD_REQ_DTLS table is changed to Valid. Once all the pending records in the upload request are validated, the status of the upload request is changed to Validated.
