Item Wizard

×
Menu
  • Custom Package

Custom Package

 
Purpose of the Custom Package
Item Wizard has an extension package (M4A_ITEMWIZARDCUSTOM) 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 or Interface tables.
 
Note:
·         It is important to copy/backup any custom code added before updating the extension package (M4A_ITEMWIZARDCUSTOM) as any custom code will be overwritten. Copy this into the new version to continue with your custom validation.
·         Custom code can be copied from the old (now defunct) M4APPS_IEW_EXTENSION package into the M4A_ITEMWIZARDCUSTOM
 
Enabling the Extension Package
 
The use of the Extension package is controlled by the profile option ‘More4Apps: IW Enable Extension Pkg’
The profile is turned off by default.  When set to ‘Yes’ it allows the customer to utilize the extension package (M4A_ITEMWIZARDCUSTOM).  If the profile does not exist it will be created by the Wizard on first login.
Refer to section:  Profile Options
 
A user can determine whether the extension package (M4A_ITEMWIZARDCUSTOM) is enabled for them to use by viewing the ‘About This Program’ form on the Wizard ribbon:
 
 
Note: ‘Extension Package Enabled  NA’ indicates the  ‘More4Apps: IW Enable Extension Package’ profile is blank (not set to Yes or No).
 
Item Wizard provides functionality to enable automatic item number generation and to add Cross Reference column values validations.  Every transaction is passed to the M4A_ITEMWIZARDCUSTOM package after all fields (excluding the item number) have been validated by the wizard. 
 
This is ideal for situations where you want to use a sequence number to automatically generate part or all of the item number (in the Master Organization).  The generated item number is automatically passed back to the Wizard for loading.
 
To add validation to the Cross Reference fields, simply utilize the 'Cross Reference callout' feature in the package. This is a great way to ensure your data is accurate and meets your specific business requirements.
 
Modifying the custom package is optional, by default it will do nothing, and the Wizard will function as per normal.
 
Modify the Custom Package
 
Modifying the custom package will require technical knowledge of PL/SQL (i.e. a developer or DBA resource); as well as functional knowledge to determine how the value should be generated.
 
Item number Generation
Item Wizard uses a custom package for generating the item part number.  This package name is M4APS_ITEMWIZARDCUSTOM, the procedure GET_ITEM_NUMBER is used to generate item part numbers.
 
 
 
To enable automatic item number generation, you will need to modify this procedure with the logic needed for your company.  You will have received the files (M4APS_ITEMWIZARDCUSTOM.pkb and M4APS_ITEMWIZARDCUSTOM.pks), within the IW_install.zip file.  Make the necessary changes to the M4APS_ITEMWIZARDCUSTOM.GET_ITEM_NUMBER procedure.  Compile the package into the test database and test thoroughly before compiling it into production.
 
The Wizard uses ID columns (rather than the user-friendly values) when doing the validation. The best way to work out what values are passed to the validation is to create an Item (with a part number) and see what is inserted into the MTL_SYSTEM_ITEMS interface table. 
 
Category information is held as record sets because you may load multiple Category sets with Category values for the same Item.  The Category record set accepts the Category Set and Category ID.
 
Catalog information is held as record sets because you may load multiple Element/Element values for the same Item.  The actual Catalog ID is held against the item in the P_Item_Details.Catalog_ID row.
 
 
If this package is not modified the Wizard will run and this package will do nothing.  In this case the item number would have to be populated in the worksheet prior to upload.
 
 
 
Use the Custom Package – to generate the Item Number
 
To use the custom package and generate the item number you have two steps:
 
     Set “More4Apps: IW Enable Item Number Generation” profile to ‘Yes’.
 
     Leave the Item field blank and let the validate process populate it (during upload). 
 
Item Wizard will call M4A_ITEMWIZARD_CUSTOM.Get_Item_Number to generate an item number.  The wizard takes the data you have entered in Excel, validates it and then passes the validated information to the custom package.  The new item number will be returned to the worksheet.
 
This package will only be called if the Item Number field is blank and you are creating an item in the master organization.
 
 
Use the Custom Package – to customize the Cross-Reference fields
     
To use the custom package to customize the cross-reference fields you have two steps:
 
     Set “More4Apps: IW Enable Extension Pkg” to ‘Yes’.
 
     Add validation in the CROSSREFERENCECALLOUT procedures. 
 
Once you upload your record, the values will be checked against the validation set in the CROSSREFERENCECALLOUT procedure. The system will then process the record based on the validation results.