Deleting Inactive Extensions
This document discusses the process used to remove inactive extension definition attributes and data from the SAP Sourcing/CLM system.
Extensions are very useful configurations in the application. They are easy to create and can add very useful additions to the standard Business Documents and Master Data Objects. However there is a limit to the number of columns that can be added to a table and the size of a particular row in certain databases. In addition, there are occasions where large numbers of these fields are made inactive and not used and should not be migrated to the Production system. To address this need, we have developed built-in functionality that will allow the deletion of all the Extension definition attribute data and table metadata and physically remove the columns from the SAP Sourcing/CLM dynamic table that contains them. This functionality was made available in SAP Sourcing version 7.0 SP3 and version 9.0.
Inactive extensions create needless performance overhead and consume valuable database row resources which can be better utilized for storage of active extensions.
The Inactive Extension Removal Tool is intended to address these issues by allowing SAP Sourcing/CLM system administrators to permanently remove inactive extensions from the system. Use of this tool will eliminate the performance overhead of managing inactive extensions along with the active extensions and will free up database row storage enabling the creation of new extensions.
To begin the discussion, let’s look at an example of a set of extension on the master agreement. There are 5 extension attributes. String, Integer, Object Reference, Big Text and Small Text. What we have decided is that the first 4 are of no value and should be removed.
1. 1. Warning: this procedure affects the database schema, and it is not undoable, it is recommended that a database backup is performed prior to executing the steps described within this procedure. Review the entire procedure and review the information in Appendix A before proceeding.
Overview of the procedure
a) Backup the database
b) Inactivate the target extensions
c) Shutdown the application server
d) Prepare the remove_inactive_extensions.xml script
e) Execute the remove_inactive_extensions.xml script
f) Verify the results
2. 2. Backup SAP Sourcing/CLM database.
3. 3. First make the extensions ext_1, ext_2, ext_3 and Ext_4 Inactive within the Extension Definition tool.
1. 4. Verify the desired effect in the document.
1. 5. Although inactive in the UI, Inactive extensions are still in the Schema. And any data associated with them remains as well.
6. Shutdown the application.
2. 7. Prepare and execute the remove_inactive_extensions.xml script from within the DBIMPORT tool.
a. Locate the fciinstall.jar within <FCIHOMEDIR>\lib directory
b. Open the jar with WinRAR or other suitable tool and extract the file to the local system.
The file is located in scripts\product\
c. Open the remove_inactive_extensions.xml file with your favorite editor. Notice there are 2 places in the file that need modification. The first is the classpath for the code is not correct. This should be corrected in later releases, but for now replace “com.frictionless” with “com.sap.odp” The second place to modify is class value. Replace “Class_ID or NAME, e.g. rfx.RFXDOC or 900” with the proper class id or class name for your object. If this is not known to you it can be determined by looking it up in the Reference Guide that is supplied within SAP Sourcing/CLM. In our case, Master Agreement is class id 1004. Make the modifications and save the file.
Note: Whether you choose to use the integer or string class identifier, the identifier must be enclosed with double-quotes exactly as shown. Whitespace is significant and there
should be no trailing or leading spaces. Failure to properly specify the class identifier willresult in a runtime error similar to the following which will be displayed in the Status window of the DbImport tool:
….Execution failed: The parameter ‘class=invalid.ClassId’ does not reference a valid class.
Note: In a single tenant system it is OK to use the System User and select the system context to execute the script.
Note: In a multi-tenant system you must select the proper context and use the Enterprise User for that context.
1. 8. Start the DBIMPORT tool, and using the file dropdown in the picker, navigate to the modified remove_inactive_extensions.xml file. Click the run button.
1. 9. Execution can be monitored on the status tab of the DBIMPORT tool. A successful execution will produce a green checkmark in the bottom right hand corner of the UI and there will be no errors on the Errors tab. If there are errors they will be shown there and within the log generated by DBIMPORT. See Appendix A for details.
10. After successful execution of the script, start the application and review the results as shown in Figures 12, 13 and 14. The Extension Schema, The Extension Definition and the Target UI(s) all should be reviewed for the desired result.
1. 11. After confirming the desired result, the application is ready for use.
In the case of an error removing an entire extension collection, each member of the collection would need to be made inactive.
In the case of an error removing an extension, in addition to the Status window further details will be provided in the <FCI-HOME>\logs\install_xxx.log file. Although rare, errors are usually the result of transient database errors which are handled by the tool. In the event an error occurs, the extensions and system will be left in a consistent state, in most cases the only impact will be the failure to remove the extension member whose removal attempt resulted in an error. In most cases, the proper response to these errors is to simply re-run the tool which will usually result in the removal of the extension during the second attempt. Persistent errors should be reported to Sourcing support. Be sure to include the install_xxx.log which will be important in diagnosing the cause of the error.
Destructive Nature of the Tool
System administrators should note that extensions removed by this tool are permanently and totally deleted. This deletion includes both the inactive extension definition as well as any data associated with the inactive extension. Once removed, neither the extension nor any associated data can be recovered except by a full restore of the Sourcing schema from a backup taken prior to execution of the removal tool. The basic premise of the tool is that inactive extension definitions and any associated data are no longer required. If this premise is incorrect, then this tool should not be used.