Adding User Defined Code Use the instructions in this section to add user defined code for processing an object. Add User Defined Code On the Data Source tab, expand the tree view to locate the object. Right-click the source object and selectDetailed Properties > Processing Options > General. Under Code Generation, click Edit User defined code. From the Type drop-down field, select one of these: Main Execution Select this option to overwrite the DWD main execution code. Before Main execution Select this option to add code before the main execution. After Main execution Select this option to add code after the main execution. After Table Definition This option only is displayed when DWD generates the main execution code. Appending User Defined Code After Table Definition After End of Query Statement This option only is displayed when DWD generates the main execution code. Appending User Defined Code After End of Query Statement Specify the code to be added. Click Save. Compile the object.