Project Transaction Wizard includes an extension package (M4APS_TW_EXTENSION) that you can modify to meet your unique validation requirements.
It is automatically installed by the Wizard if it does not already exist in your instance and will contain no additional code.
The Wizard will always callout to this package, however modifying the extension package is optional.
You can choose to have the extension package return an error when uploading, see the example code below.
Modify the Extension Package
Modifying the extension package will require technical knowledge of PL/SQL (i.e. a developer or DBA resource) as well as functional knowledge to determine the logic.
Included in the tw_install.zip file are the files M4APS_TW_EXTENSION.pkb and M4APS_TW_EXTENSION.pks. Make the necessary changes to theM4APS_TW_EXTENSION.VALIDATE_CALLOUTprocedure. Compile the package into a test instance and test your code updates thoroughly before compiling it into your production instance.
Examples for Extension Package
/* Example 1 – if a transaction source “should be reversed” is selected, the transaction will be a reversing transaction/
IF p_validate_only THEN
return;
END IF;
SELECT
*
INTO l_trans_rec
FROM
pa_transaction_interface
WHERE
txn_interface_id = p_txn_interface_id;
IF l_trans_rec.transaction_source = 'Should be reversed' AND nvl(l_trans_rec.accrual_flag,'N') = 'N' THEN
bupdate := true;
saccrual := 'Y';
ELSIF l_trans_rec.transaction_source = 'Should NOT be reversed' AND nvl(l_trans_rec.accrual_flag,'N') = 'Y' THEN
bupdate := true;
saccrual := 'N';
END IF;
IF bupdate THEN
UPDATE pa_transaction_interface
SET
accrual_flag = saccrual
WHERE
txn_interface_id = p_txn_interface_id;
END IF;
Note: There is no profile option to call the extension package for Project Transaction Wizard. The Wizard will ignore the extension package if it does not contain any validation rules.