Extension PackageApplies to:
• Supplier, Supplier Bank Acc, Site, and Site Bank Acc sections
• Supplier Wizard version 5.02.83 onwards
• Supplier Wizard Database Package Versions onwards
o Header Version 2.1.03 04 Apr 18
o Body Version 2.1.41 14 Jan 22
Exclusions:
• Any sections not listed above
Purpose of the Extension Package
Supplier Wizard has an extension package (M4APS_SW_EXTENSION) that you can modify to meet your requirements. You can use the extension package to perform additional validation on the uploaded data and override values on the uploaded data.
The extension package provides access to the uploaded data BEFORE it is sent to the Oracle API.
Only sections with an “Update Mode” value populated will be checked by the extension package e.g. If you are adding a Site to an existing Supplier using “Create” at Site level but leaving the “Supplier Update Mode” blank, only the Site data will be validated by the extension package.
The following diagram shows the Wizard upload process when the extension package is used:
Note: Extension Package messages will not be returned for successful uploads.
Normally, the extension package is called during Upload NOT during validation. However, you can enable “Validate using API” in the “Supplier Wizard - Setup” ribbon tab in order to validate using the Extension package and the Oracle API without uploading.
The relevant extension package functions are called for each uploaded supported section record.
Messages returned from the extension package to the Wizard will include the term ‘Extension Error:’ after the API name and before your custom error message. This helps to differentiate from the standard Supplier Wizard validation and validation returned from the Oracle Public APIs.
Example of the extension package rejecting the Bank Account (but not the Supplier) upload as per the guidelines stated above:
Enabling the Extension Package
The use of the extension package is controlled by the profile option ‘More4Apps: SW Enable Extension Pkg’. The profile is turned off by default. When set to ‘Yes’ it allows the customer to utilize the extension package. If the profile does not exist it will be created by the Wizard on first logon.
A user can determine whether the extension package is enabled for them by viewing the About form:
Installing the Extension Package
The extension package is included in the sw_install.zip file. The extension package will be installed when running the server side install.
The extension package functionality was added to Supplier Wizard version 5.02.83. To utilise 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 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.
Technical Details
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.
Extension Wizard Procedures
The extension package includes four procedures: VERSION, VENDOR_EXTENSION, VENDOR_SITE_EXTENSION and BANK_ACCT_EXTENSION.
VERSION supplies the version number of the extension package and is for More4apps internal use only and MUST NOT be modified.
The other procedures provide access to the uploaded data and are the ones you will modify to suit your requirements.
The uploaded data parameters match the structure of the relevant Oracle API record types.
Procedure: M4APS_SW_EXTENSION.VENDOR_EXTENSION
Parameters
Procedure: M4APS_SW_EXTENSION.VENDOR_SITE_EXTENSION
Parameters
Procedure: M4APS_SW_EXTENSION.BANK_ACCT_EXTENSION
Parameters
Using the Extension Package for Additional Validation
This example:
• Rejects a Supplier when the Vendor Type is “VENDOR”
• Returns a message to the Wizard
Using the Extension Package to modify a Bank Account Value
This example:
• Sets the account type to “CASH” if no value is uploaded via the Wizard.
• If an account value is provided in the Wizard and it’s not “CASH”, it will reject the record and return an error message to the Wizard.
Implicit Conversions and Language Considerations
Do not rely on implicit data type conversions and do not hard code language dependent values.
When implicit conversions occur, or language dependent values are hardcoded it can be very difficult to analyze issues because the code will often run without issues through SQL Developer but fail when run from the Wizard.
The NLS settings in which the Wizard runs are not fixed and can change depending on the session.
Date Formatting as an Example
When hard coding date values always use TO_DATE to explicitly state the date format. Currently the Wizard uses a default date format of YYYYMMDD, however this could be subject to change.
Without explicitly stating the format, you are likely to see this message returned to the Wizard “SQL Error:com.more4apps.r12.servlet.tjava.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected”.
Correct usage:
Incorrect usage:
Testing and Rollout
Compile the package into a test instance and test your code updates thoroughly before compiling it into your production instance.
|