Extension PackageThe Extension Package applies to the following:
• Bill of Materials Wizard Version 7.2.00 onwards.
• All Modes.
• Bill of Materials Wizard Database Package Versions onwards:
Header Version 2.2.00 29 Sep 2021
Body Version 1.8.00 30 Sep 2021
• Bill of Materials Wizard Extension Package Versions onwards:
Header Version 1.1.0 30 Sep 2021
Body Version 1.1.0 30 Sep 2021
Purpose of the Extension Package
Bill of Materials Wizard has an extension package (M4APS_BMW_EXTENSION) that you can modify to meet your requirements. You can use the extension package to perform additional validation on the uploaded data, override values on the uploaded data and return messages to the Wizard.
The extension package provides access to the uploaded data BEFORE it is inserted into the API.
The following diagram shows the Wizard upload process when the Extension Package is used:
![]() The extension package is called during Upload after Wizard validation. The extension package is called once per uploaded Bill of Materials (BOM).
Extension package validation errors encountered in any section of the Bill of Material will result in the entire Bill of Material being rejected. For example, just one child/grandchild error will reject the entire Bill of Material like a normal upload.
All messages from the extension package are returned to the Header Section’s message column. Messages cannot be returned to any of the child section’s message columns. However, you can include row numbers and section names in your message e.g. ‘Not required for revenue: Row(s) 12,13,14’.
Messages returned from the Extension Package to the Wizard will be prefixed with ‘Extension Error:’ to differentiate from the Standard Bill of Materials Wizard validation and validation messages returned from the Oracle Public APIs.
Example of the Extension Package rejecting the Bill of Material upload as per the guidelines stated above:
![]() Enabling the Extension Package
The use of the Extension Package is controlled by the profile option ‘More4Apps: BMW 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 login.
A user can determine whether the extension package is enabled for them by viewing the About This Program form on the Wizard ribbon:
![]() Installing the Extension Package
The extension package is included in the bmw_install.zip file. The extension package will be installed when running the server-side install.
The extension package functionality was added to Bill of Materials Wizard version 7.2.00. 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 does not 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.
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.
Technical Details
Modifying the extension package will require technical knowledge of PL/SQL (ie a Developer or DBA resource) as well as functional knowledge to determine the logic.
Extension Package Procedures
The extension package includes two procedures: VERSION and BOM.
- VERSION supplies the version number of the extension package and is more More4apps internal use only and MUST NOT be modified.
- BOM provides access to the uploaded data and is the one you will modify to suit your requirements.
The uploaded data parameters match the structure of the BOM API.
Procedure: M4APS_BMW_EXTENSION.extend_bom
Parameters
Relevant m4aps_bomwizard objects:
Using the Extension Package for Additional Validation
This example:
· Rejects a Bill of Materials if it is in a particular Organization.
· Returns a message to the Wizard explaining that no Bill of Materials belonging to that organization can be loaded. This message is printed in the Header section in the Wizard.
Using the Extension Package to set the cost_rollup to include only optional Components
This example updates the include_in_cost_rollup to ‘Yes’ for all optional components and ‘No’ for non-optional components.
Processing Substitute Component
This example:
· Finds where an obsolete item is used as a substitute component.
· Returns a message to the Wizard explaining where the obsolete item exists. This message is printed to the header section in 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.
|