Extension PackagePurpose of the Extension Package
This Wizard has an optional extension package (M4APS_ARW_EXTENSION) that you can modify to meet your unique requirements.
The extension package can be modified to perform additional validation or modification, currently in Create mode only, for receipt header information. Validation can be written to reject lines with an error message (the line’s will not be processed), to return a warning but continue to process, or to update a field, such as receipt number. If using the package to populate the receipt number field, the wizard will return the number to the receipt number column in the wizard.
The extension package is called during Upload, NOT during validation. The extension package is called once per uploaded receipt.
Enabling the Extension Package
The use of the extension package is controlled by the profile option ‘More4Apps: ARW Enable Extension Pkg’. The profile is turned off by default. When set to ‘Yes’ it allows the customer to utilize the extension package.
Installing the Extension Package
The extension package is included in the arw_install.zip file. The extension package will be installed when running the server-side install.
The extension package functionality was added to AR Receipt Wizard Version 3.4.02. To utilize this functionality, you must install the server-side files included with this version or later versions of the Wizard.
Caveat
Any extra code has the potential to impact the performance of the upload. In extreme cases this could result in timeouts and no data being returned to the wizard. Performance testing is advised when implementing your code in the extension package.
Support
More4apps cannot support customer code. If an upload issue occurs, More4apps will require the issue to be replicated with the extension package profile option set to “No”. If the issue occurs with the profile set to “Yes” and does not occur with the profile option set to “No” then it is your responsibility to fix the issue.
If the extension package is being used to modify the uploaded data, it is recommended that a message is written back to the Wizard indicating that the data has been modified by the extension package - this will help diagnose any upload issues.
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.
The extension package currently contains one procedures for creating receipts in create mode.
Example Code to default the Receipt Number
if p_receipt_type = 'CREATE_MISC' then
p_receipt_number := xxar_receipt_utils.get_next_receipt_number_MISC;
elsif p_receipt_type = 'CREATE_CASH' then
p_receipt_number := xxar_receipt_utils.get_next_receipt_number_CASH;
end if;
Example Code to return an Error to the Wizard
if p_receipt_type = 'CREATE_MISC' and p_amount > 5000 and p_org_id = 204 then
x_status := 'E';
x_msg := 'Manufacturing and distribution Operations do not have permission to pay a receipt of this size.';
end if;
Note – These examples can also be found within the body of the Extension Package.
Included in the arw_install.zip file are the files (arw_ext_install.sql, M4APS_ARW_EXTENSION.pkb and M4APS_ARW_EXTENSION.pks). Install the extension package using arw_ext_install.sql. Make the necessary changes to the procedure. Compile the package into a test instance and test your code updates thoroughly before compiling it into your production instance.
Messaging returned from the Extension package to the Wizard will be prefixed with ‘Extension Error:’ to differentiate from the standard AR Receipt Wizard validation and validation returned from the Oracle Public APIs.
|