fix: Changed check constraint names and foreign key names to fit in to
authorAdrián Romero <adrian.romero@openbravo.com>
Tue, 20 Nov 2007 16:27:14 +0000
changeset 94 4e7ba7b8a4ad
parent 93 058b91261f0d
child 95 308b692fac65
fix: Changed check constraint names and foreign key names to fit in to
30 characteres.
database/model/functions/ADD_MONTHS2.xml
database/model/functions/AD_APPLICATION_IMPORT .xml
database/model/functions/AD_APPLICATION_IMPORT.xml
database/model/functions/AD_COLUMN_FORMAT.xml
database/model/functions/AD_COLUMN_IDENTIFIER.xml
database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml
database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml
database/model/functions/AD_COLUMN_IDENTIFIER_STD.xml
database/model/functions/AD_COLUMN_SYNC.xml
database/model/functions/AD_COPY_CLIENT.xml
database/model/functions/AD_DELETE_CLIENT.xml
database/model/functions/AD_DELETE_CLIENT0.xml
database/model/functions/AD_DEPENDENCIES_CREATE.xml
database/model/functions/AD_DEVELOPMENT_MIGRATION.xml
database/model/functions/AD_DISPLAY_LIST.xml
database/model/functions/AD_GET_DOCTYPE.xml
database/model/functions/AD_GET_NEXT_SEQUENCE.xml
database/model/functions/AD_IMPFORMAT_COPY.xml
database/model/functions/AD_ISMEMBERINCLUDED.xml
database/model/functions/AD_ISORGINCLUDED.xml
database/model/functions/AD_LANGUAGE_CREATE.xml
database/model/functions/AD_MAPPING_FORMAT.xml
database/model/functions/AD_MESSAGE_GET.xml
database/model/functions/AD_MESSAGE_GET2.xml
database/model/functions/AD_ORGLIST.xml
database/model/functions/AD_PARENT_MENU_ELEMENT.xml
database/model/functions/AD_PARENT_TREE.xml
database/model/functions/AD_PRINTPAPER_DEFAULT.xml
database/model/functions/AD_SEQUENCE_DOC.xml
database/model/functions/AD_SEQUENCE_DOCTYPE.xml
database/model/functions/AD_SEQUENCE_NEXT.xml
database/model/functions/AD_SEQUENCE_NEXTNO.xml
database/model/functions/AD_SHORTNAME.xml
database/model/functions/AD_SYNCHRONIZE.xml
database/model/functions/AD_TABLE_IMPORT.xml
database/model/functions/AD_TABLE_IMPORT0.xml
database/model/functions/AD_TAB_COPY.xml
database/model/functions/AD_TAB_IMPORT.xml
database/model/functions/AD_TAB_IMPORT0.xml
database/model/functions/AD_TRANSLATE_ID.xml
database/model/functions/AD_UPDATE_ACCESS.xml
database/model/functions/AD_UPDATE_PINSTANCE.xml
database/model/functions/AD_UPDATE_SEQUENCE.xml
database/model/functions/AD_UPDATE_SEQUENCE_GENERATE.xml
database/model/functions/AD_UPDATE_TABLE_IDENTIFIER.xml
database/model/functions/AD_WINDOW_COPY.xml
database/model/functions/AT_TEST_COPY.xml
database/model/functions/AT_TEST_DELETE.xml
database/model/functions/A_AMORTIZATION_PROCESS.xml
database/model/functions/A_ASSET_CREATE.xml
database/model/functions/A_ASSET_GROUP_ACCT_COPY.xml
database/model/functions/A_ASSET_POST.xml
database/model/functions/A_ASSET_POST0.xml
database/model/functions/BOM_PRICELIMIT.xml
database/model/functions/BOM_PRICELIST.xml
database/model/functions/BOM_PRICESTD.xml
database/model/functions/BOM_QTY_AVAILABLE.xml
database/model/functions/BOM_QTY_ONHAND.xml
database/model/functions/BOM_QTY_ORDERED.xml
database/model/functions/BOM_QTY_RESERVED.xml
database/model/functions/CHANGEPROJECTSTATUS.xml
database/model/functions/CHANGEPROJECTSTATUSTOORDER.xml
database/model/functions/CLEVER_TO_NUMBER.xml
database/model/functions/CLOSEPROJECT.xml
database/model/functions/COPY_PRODUCT_TEMPLATE.xml
database/model/functions/COPY_PROJECT_LINES.xml
database/model/functions/C_ACCTSCHEMA_DEFAULT_COPY.xml
database/model/functions/C_BANKSTATEMENT_POST .xml
database/model/functions/C_BANKSTATEMENT_POST.xml
database/model/functions/C_BASE_CONVERT.xml
database/model/functions/C_BPARTNER_REMITLOCATION.xml
database/model/functions/C_BP_GROUP_ACCT_COPY.xml
database/model/functions/C_BP_SOCREDITUSED_REFRESH.xml
database/model/functions/C_BUDGET_COPY.xml
database/model/functions/C_CASH_POST.xml
database/model/functions/C_COMMISSIONRUN_PROCESS.xml
database/model/functions/C_COMMISSION_COPY.xml
database/model/functions/C_COMMISSION_PROCESS.xml
database/model/functions/C_CONVERTDOCUMENTNO_TO_NUMBER.xml
database/model/functions/C_CREATE_PINVOICE_FROM_OUTS.xml
database/model/functions/C_CURRENCY_CONVERT.xml
database/model/functions/C_CURRENCY_CONVERT0.xml
database/model/functions/C_CURRENCY_RATE.xml
database/model/functions/C_CURRENCY_ROUND.xml
database/model/functions/C_DATEDAYINMONTH.xml
database/model/functions/C_DB_PERCENTAJE_PAID.xml
database/model/functions/C_DEBT_PAYMENT_CHANGE.xml
database/model/functions/C_DEBT_PAYMENT_CREATE.xml
database/model/functions/C_DEBT_PAYMENT_PAID.xml
database/model/functions/C_DEBT_PAYMENT_STATUS.xml
database/model/functions/C_DEBT_PAYMENT_STATUS0.xml
database/model/functions/C_DP_MANAGEMENT_POST.xml
database/model/functions/C_ELEMENTVALUE_COPY.xml
database/model/functions/C_GETBPLOCATIONID.xml
database/model/functions/C_GETTAX.xml
database/model/functions/C_IGNORE_ACCENT.xml
database/model/functions/C_INVOICETODATE.xml
database/model/functions/C_INVOICE_ACCTGEN.xml
database/model/functions/C_INVOICE_CANCEL.xml
database/model/functions/C_INVOICE_CREATE.xml
database/model/functions/C_INVOICE_CREATE0.xml
database/model/functions/C_INVOICE_CREATERECEIPT.xml
database/model/functions/C_INVOICE_DISCOUNT_OLD.xml
database/model/functions/C_INVOICE_PERCENTAJE_PAID.xml
database/model/functions/C_INVOICE_POST.xml
database/model/functions/C_INVOICE_POST0.xml
database/model/functions/C_LOCATION_DESCRIPTION.xml
database/model/functions/C_LOCATION_IDENTIFIER.xml
database/model/functions/C_LOCATION_NAME.xml
database/model/functions/C_ORDER_ACTUALIZE_PRICELIST.xml
database/model/functions/C_ORDER_DRILLDOWN.xml
database/model/functions/C_ORDER_FACT_RESET.xml
database/model/functions/C_ORDER_POST.xml
database/model/functions/C_ORDER_POST1.xml
database/model/functions/C_ORDER_PO_CREATE.xml
database/model/functions/C_ORDER_STATUS.xml
database/model/functions/C_PAYMENTDUEDATE.xml
database/model/functions/C_PAYMENTTERM_DISCOUNT.xml
database/model/functions/C_PAYMENTTERM_DUEDATE.xml
database/model/functions/C_PAYMENTTERM_DUEDAYS.xml
database/model/functions/C_PAYMENTTERM_NOTE.xml
database/model/functions/C_PERIODCONTROL_PROCESS.xml
database/model/functions/C_PERIOD_PROCESS.xml
database/model/functions/C_PROJECT_GENERATE.xml
database/model/functions/C_PROJECT_WON.xml
database/model/functions/C_REMITTANCE_POST.xml
database/model/functions/C_SETTLEMENT_POST.xml
database/model/functions/C_SETTLEMENT_POST0.xml
database/model/functions/C_TRIM.xml
database/model/functions/C_UOM_CONVERT.xml
database/model/functions/C_VALIDCOMBINATION_GET.xml
database/model/functions/C_VALIDCOMBINATION_INSERT.xml
database/model/functions/C_YEARPERIODS.xml
database/model/functions/DATE_NULO.xml
database/model/functions/DBA_AFTERIMPORT.xml
database/model/functions/DBA_CLEANUP.xml
database/model/functions/DBA_COLUMN_DEFAULT.xml
database/model/functions/DBA_COLUMN_SCRIPT.xml
database/model/functions/DBA_CONSTRAINTCMD.xml
database/model/functions/DBA_CONST_SEARCHCOND.xml
database/model/functions/DBA_DISPLAYTYPE.xml
database/model/functions/DBA_FIX_CHANGEINCHARSET.xml
database/model/functions/DBA_RECOMPILE.xml
database/model/functions/DBA_REPLACE_CHANGEDCHARSET.xml
database/model/functions/DBA_USER_CONST_SEARCHCOND.xml
database/model/functions/DBA_VIEW_BODY.xml
database/model/functions/DEBT_PAYMENT_BALANCING_REPLACE.xml
database/model/functions/DIGIT_CONTROL_ACCOUNT.xml
database/model/functions/DIVIDE.xml
database/model/functions/FACT_ACCT_BALANCE_UPDATE.xml
database/model/functions/FACT_ACCT_RESET.xml
database/model/functions/FRIE_NAME.xml
database/model/functions/FRIE_VALUE.xml
database/model/functions/FRIE_VALUE2.xml
database/model/functions/GENERATEPOFROMPROJECT.xml
database/model/functions/GENERATESOFROMPROJECT.xml
database/model/functions/GENERATESOFROMPROJECTORDER.xml
database/model/functions/GENERATESOFROMPROJECTPHASE.xml
database/model/functions/GENERATE_AVERAGE_COSTS.xml
database/model/functions/GENERATE_STANDAR_COSTS.xml
database/model/functions/GETPERIODNAME.xml
database/model/functions/GET_PRICELIST_VERSION.xml
database/model/functions/GET_PRODUCT_COST.xml
database/model/functions/GET_PRODUCT_PRICE.xml
database/model/functions/GET_PRODUCT_PRICE_DATE.xml
database/model/functions/GET_PURCHASE_PRICE.xml
database/model/functions/GL_JOURNALBATCH_POST.xml
database/model/functions/GL_JOURNAL_POST.xml
database/model/functions/GL_JOURNAL_POST0.xml
database/model/functions/GL_PERIOD_OPEN.xml
database/model/functions/IMPORT_PRODUCT.xml
database/model/functions/INSERTAT.xml
database/model/functions/MA_COPY_VERSION.xml
database/model/functions/MA_GLOBALUSE_DISTRIBUTE.xml
database/model/functions/MA_INDIRECT_COST_CALCULATE.xml
database/model/functions/MA_MAINTENANCE_SCHEDULE.xml
database/model/functions/MA_MAINT_ALL.xml
database/model/functions/MA_MEASURE_SHIFT_EXPLODE.xml
database/model/functions/MA_MEASURE_TIME_EXPLODE.xml
database/model/functions/MA_MEASURE_TIME_EXPLODE0.xml
database/model/functions/MA_PC_CASE_CREATE.xml
database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml
database/model/functions/MA_PRODUCTION_COST.xml
database/model/functions/MA_PRODUCTION_COST_GENERATE.xml
database/model/functions/MA_STANDARD_COST.xml
database/model/functions/MA_STANDARD_COST_SEQUENCE.xml
database/model/functions/MA_WORKEFFORT_VALIDATE.xml
database/model/functions/MA_WORKREQUIREMENT_CLOSE.xml
database/model/functions/MA_WORKREQUIREMENT_PROCESS.xml
database/model/functions/MA_WRPHASE_CLOSE.xml
database/model/functions/MRP_CHECK_PLANNINGMETHOD.xml
database/model/functions/MRP_PROCESSPLAN.xml
database/model/functions/MRP_PROCESSPLAN_PLAN.xml
database/model/functions/MRP_PROCESSPLAN_RECALCULATE.xml
database/model/functions/MRP_PROCESSPLAN_RECALCULATE0.xml
database/model/functions/MRP_PRODUCTION_RUN.xml
database/model/functions/MRP_PURCHASEORDER.xml
database/model/functions/MRP_PURCHASEPLAN.xml
database/model/functions/MRP_PURCHASE_RUN.xml
database/model/functions/MRP_REQUISITION.xml
database/model/functions/MRP_RUN_EXPLODE.xml
database/model/functions/MRP_RUN_INITIALIZE.xml
database/model/functions/MRP_RUN_INSERTLINES.xml
database/model/functions/MRP_WORKREQUIREMENT.xml
database/model/functions/M_CHECK_STOCK.xml
database/model/functions/M_DISCOUNTSCHEMA_RESEQ.xml
database/model/functions/M_FREIGHT_CALCULATE.xml
database/model/functions/M_GET_OFFER.xml
database/model/functions/M_GET_OFFERS_APPLIED.xml
database/model/functions/M_GET_OFFERS_NAME.xml
database/model/functions/M_GET_OFFERS_PRICE.xml
database/model/functions/M_GET_OFFERS_STD_PRICE.xml
database/model/functions/M_GET_OFFER_PRICE.xml
database/model/functions/M_GET_OFFER_STD_PRICE.xml
database/model/functions/M_INOUT_CANCEL.xml
database/model/functions/M_INOUT_CREATE.xml
database/model/functions/M_INOUT_CREATE0.xml
database/model/functions/M_INOUT_CREATEINVOICE.xml
database/model/functions/M_INOUT_POST.xml
database/model/functions/M_INOUT_POST0.xml
database/model/functions/M_INOUT_UPDATEQUANTITYES.xml
database/model/functions/M_INTERNAL_CONSUMPTION_POST.xml
database/model/functions/M_INVENTORY_LISTCREATE.xml
database/model/functions/M_INVENTORY_LISTUPDATE.xml
database/model/functions/M_INVENTORY_POST.xml
database/model/functions/M_MOVEMENT_POST.xml
database/model/functions/M_MOVE_LOCATOR.xml
database/model/functions/M_PRICELISTVERSIONGENERATE.xml
database/model/functions/M_PRICELIST_CREATE.xml
database/model/functions/M_PRODUCTION_RUN.xml
database/model/functions/M_PRODUCT_BOM_CHECK.xml
database/model/functions/M_PRODUCT_CATEGORY_ACCT_COPY.xml
database/model/functions/M_PRODUCT_COSTINGUPDATE.xml
database/model/functions/M_PRODUCT_DELETE.xml
database/model/functions/M_RAPPEL_INVOICE_CREATE.xml
database/model/functions/M_UPDATE_INVENTORY.xml
database/model/functions/M_UPDATE_STORAGE_PENDING.xml
database/model/functions/M_WH_ACTIVATE_PERIODS.xml
database/model/functions/M_WH_PERIOD_GENERATE.xml
database/model/functions/NOW.xml
database/model/functions/NUMBER_NULL.xml
database/model/functions/NUMBER_TO_TEXT_ES.xml
database/model/functions/R_REQUEST_DUETYPE.xml
database/model/functions/R_REQUEST_PROCESS.xml
database/model/functions/R_REQUEST_PROCESS0.xml
database/model/functions/R_REQUEST_REOPEN.xml
database/model/functions/SHOW_N_FIRST_CHARS.xml
database/model/functions/S_TIMEEXPENSE_POST.xml
database/model/functions/TEMPLATE.xml
database/model/functions/TRANSLATE_PRODUCT_ID.xml
database/model/functions/TRANSLATE_TAXCATEGORY_ID.xml
database/model/functions/T_INVENTORYVALUE_CREATE.xml
database/model/functions/T_REPLENISH_CREATE.xml
database/model/functions/USER_CONST_SEARCHCOND.xml
database/model/functions/W_REQUEST_BPARTNER.xml
database/model/functions/XX_COLUMN_IDENTIFIER.xml
database/model/sequences/AD_ERROR_SEQ.xml
database/model/sequences/AD_PINSTANCE_SEQ.xml
database/model/sequences/C_ALLOCATION_SEQ.xml
database/model/sequences/DBA_ERRORLOG_SEQ.xml
database/model/sequences/T_SPOOL_SEQ.xml
database/model/sequences/W_BASKET_SEQ.xml
database/model/tables/AD_ACCOUNTINGRPT_ELEMENT.xml
database/model/tables/AD_ALERT.xml
database/model/tables/AD_ALERTRECIPIENT.xml
database/model/tables/AD_ALERTRULE.xml
database/model/tables/AD_ALERTRULE_TRL.xml
database/model/tables/AD_ATTACHMENT.xml
database/model/tables/AD_ATTRIBUTE.xml
database/model/tables/AD_ATTRIBUTE_VALUE.xml
database/model/tables/AD_AUXILIARINPUT.xml
database/model/tables/AD_CALLOUT.xml
database/model/tables/AD_CHANGELOG.xml
database/model/tables/AD_CLIENT.xml
database/model/tables/AD_CLIENTINFO.xml
database/model/tables/AD_COLOR.xml
database/model/tables/AD_COLUMN.xml
database/model/tables/AD_COLUMN_ACCESS.xml
database/model/tables/AD_DATATYPE.xml
database/model/tables/AD_DEPENDENCIES.xml
database/model/tables/AD_DESKTOP.xml
database/model/tables/AD_DESKTOPWORKBENCH.xml
database/model/tables/AD_DESKTOP_TRL.xml
database/model/tables/AD_DEVELOPER.xml
database/model/tables/AD_DIMENSION.xml
database/model/tables/AD_ELEMENT.xml
database/model/tables/AD_ELEMENT_TRL.xml
database/model/tables/AD_ERROR.xml
database/model/tables/AD_FIELD.xml
database/model/tables/AD_FIELDGROUP.xml
database/model/tables/AD_FIELDGROUP_TRL.xml
database/model/tables/AD_FIELD_TRL.xml
database/model/tables/AD_FIND.xml
database/model/tables/AD_FORM.xml
database/model/tables/AD_FORM_ACCESS.xml
database/model/tables/AD_FORM_TRL.xml
database/model/tables/AD_ID_TRANSLATION.xml
database/model/tables/AD_IMAGE.xml
database/model/tables/AD_IMPFORMAT.xml
database/model/tables/AD_IMPFORMAT_ROW.xml
database/model/tables/AD_LANGUAGE.xml
database/model/tables/AD_MENU.xml
database/model/tables/AD_MENU_TRL.xml
database/model/tables/AD_MESSAGE.xml
database/model/tables/AD_MESSAGE_TRL.xml
database/model/tables/AD_MODEL_OBJECT.xml
database/model/tables/AD_MODEL_OBJECT_MAPPING.xml
database/model/tables/AD_MONTH.xml
database/model/tables/AD_NOTE.xml
database/model/tables/AD_ORG.xml
database/model/tables/AD_ORGINFO.xml
database/model/tables/AD_PINSTANCE.xml
database/model/tables/AD_PINSTANCE_LOG.xml
database/model/tables/AD_PINSTANCE_PARA.xml
database/model/tables/AD_PREFERENCE.xml
database/model/tables/AD_PRINTCOLOR.xml
database/model/tables/AD_PRINTFONT.xml
database/model/tables/AD_PRINTFORM.xml
database/model/tables/AD_PRINTFORMAT.xml
database/model/tables/AD_PRINTFORMATITEM.xml
database/model/tables/AD_PRINTFORMATITEM_TRL.xml
database/model/tables/AD_PRINTGRAPH.xml
database/model/tables/AD_PRINTLABEL.xml
database/model/tables/AD_PRINTLABELLINE.xml
database/model/tables/AD_PRINTLABELLINE_TRL.xml
database/model/tables/AD_PRINTPAPER.xml
database/model/tables/AD_PRINTTABLEFORMAT.xml
database/model/tables/AD_PROCESS.xml
database/model/tables/AD_PROCESS_ACCESS.xml
database/model/tables/AD_PROCESS_PARA.xml
database/model/tables/AD_PROCESS_PARA_TRL.xml
database/model/tables/AD_PROCESS_SCHEDULING.xml
database/model/tables/AD_PROCESS_TRL.xml
database/model/tables/AD_RECORD_ACCESS.xml
database/model/tables/AD_REFERENCE.xml
database/model/tables/AD_REFERENCE_TRL.xml
database/model/tables/AD_REF_LIST.xml
database/model/tables/AD_REF_LIST_TRL.xml
database/model/tables/AD_REF_SEARCH.xml
database/model/tables/AD_REF_SEARCH_COLUMN.xml
database/model/tables/AD_REF_TABLE.xml
database/model/tables/AD_REPLICATION.xml
database/model/tables/AD_REPLICATIONSTRATEGY.xml
database/model/tables/AD_REPLICATIONTABLE.xml
database/model/tables/AD_REPLICATION_LOG.xml
database/model/tables/AD_REPLICATION_RUN.xml
database/model/tables/AD_REPORTVIEW.xml
database/model/tables/AD_REPORTVIEW_COL.xml
database/model/tables/AD_ROLE.xml
database/model/tables/AD_ROLE_ORGACCESS.xml
database/model/tables/AD_SCRIPT_SQL.xml
database/model/tables/AD_SEQUENCE.xml
database/model/tables/AD_SEQUENCE_AUDIT.xml
database/model/tables/AD_SEQUENCE_NO.xml
database/model/tables/AD_SESSION.xml
database/model/tables/AD_SYSTEM.xml
database/model/tables/AD_TAB.xml
database/model/tables/AD_TABLE.xml
database/model/tables/AD_TABLE_ACCESS.xml
database/model/tables/AD_TAB_TRL.xml
database/model/tables/AD_TASK.xml
database/model/tables/AD_TASKINSTANCE.xml
database/model/tables/AD_TASK_ACCESS.xml
database/model/tables/AD_TASK_TRL.xml
database/model/tables/AD_TEXTINTERFACES.xml
database/model/tables/AD_TEXTINTERFACES_TRL.xml
database/model/tables/AD_TRACE.xml
database/model/tables/AD_TREE.xml
database/model/tables/AD_TREEBAR.xml
database/model/tables/AD_TREENODE.xml
database/model/tables/AD_TREENODEBP.xml
database/model/tables/AD_TREENODEMM.xml
database/model/tables/AD_TREENODEPR.xml
database/model/tables/AD_USER.xml
database/model/tables/AD_USERDEF_FIELD.xml
database/model/tables/AD_USERDEF_TAB.xml
database/model/tables/AD_USERDEF_WIN.xml
database/model/tables/AD_USER_ROLES.xml
database/model/tables/AD_VAL_RULE.xml
database/model/tables/AD_WF_INSTANCE.xml
database/model/tables/AD_WF_NODE.xml
database/model/tables/AD_WF_NODENEXT.xml
database/model/tables/AD_WF_NODE_TRL.xml
database/model/tables/AD_WINDOW.xml
database/model/tables/AD_WINDOW_ACCESS.xml
database/model/tables/AD_WINDOW_TRL.xml
database/model/tables/AD_WORKBENCH.xml
database/model/tables/AD_WORKBENCHWINDOW.xml
database/model/tables/AD_WORKBENCH_TRL.xml
database/model/tables/AD_WORKFLOW.xml
database/model/tables/AD_WORKFLOW_ACCESS.xml
database/model/tables/AD_WORKFLOW_TRL.xml
database/model/tables/AT_COMMAND.xml
database/model/tables/AT_COMMAND_TRL.xml
database/model/tables/AT_LINE.xml
database/model/tables/AT_ROLLOGIN.xml
database/model/tables/AT_TEST.xml
database/model/tables/AT_TESTDOCUMENT.xml
database/model/tables/AT_TESTDOCUMENTLINE.xml
database/model/tables/A_AMORTIZATION.xml
database/model/tables/A_AMORTIZATIONLINE.xml
database/model/tables/A_ASSET.xml
database/model/tables/A_ASSET_ACCT.xml
database/model/tables/A_ASSET_ADDITION.xml
database/model/tables/A_ASSET_CHANGE.xml
database/model/tables/A_ASSET_CHANGE_AMT.xml
database/model/tables/A_ASSET_DELIVERY.xml
database/model/tables/A_ASSET_GROUP.xml
database/model/tables/A_ASSET_GROUP_ACCT.xml
database/model/tables/A_ASSET_RETIREMENT.xml
database/model/tables/A_ASSET_USE.xml
database/model/tables/A_DEPRECIATION.xml
database/model/tables/C_ACCTSCHEMA.xml
database/model/tables/C_ACCTSCHEMA_DEFAULT.xml
database/model/tables/C_ACCTSCHEMA_ELEMENT.xml
database/model/tables/C_ACCTSCHEMA_GL.xml
database/model/tables/C_ACCTSCHEMA_TABLE.xml
database/model/tables/C_ACCT_RPT.xml
database/model/tables/C_ACCT_RPT_GROUP.xml
database/model/tables/C_ACCT_RPT_NODE.xml
database/model/tables/C_ACTIVITY.xml
database/model/tables/C_APPROVAL.xml
database/model/tables/C_BANK.xml
database/model/tables/C_BANKACCOUNT.xml
database/model/tables/C_BANKACCOUNTDOC.xml
database/model/tables/C_BANKACCOUNT_ACCT.xml
database/model/tables/C_BANKSTATEMENT.xml
database/model/tables/C_BANKSTATEMENTLINE.xml
database/model/tables/C_BPARTNER.xml
database/model/tables/C_BPARTNER_DISCOUNT.xml
database/model/tables/C_BPARTNER_LOCATION.xml
database/model/tables/C_BP_BANKACCOUNT.xml
database/model/tables/C_BP_CUSTOMER_ACCT.xml
database/model/tables/C_BP_EDI.xml
database/model/tables/C_BP_EMPLOYEE_ACCT.xml
database/model/tables/C_BP_GROUP.xml
database/model/tables/C_BP_GROUP_ACCT.xml
database/model/tables/C_BP_TAXCATEGORY.xml
database/model/tables/C_BP_VENDOR_ACCT.xml
database/model/tables/C_BP_WITHHOLDING.xml
database/model/tables/C_BUDGET.xml
database/model/tables/C_BUDGETLINE.xml
database/model/tables/C_CALENDAR.xml
database/model/tables/C_CAMPAIGN.xml
database/model/tables/C_CASH.xml
database/model/tables/C_CASHBOOK.xml
database/model/tables/C_CASHBOOK_ACCT.xml
database/model/tables/C_CASHLINE.xml
database/model/tables/C_CHANNEL.xml
database/model/tables/C_CHARGE.xml
database/model/tables/C_CHARGE_ACCT.xml
database/model/tables/C_CITY.xml
database/model/tables/C_COMMISSION.xml
database/model/tables/C_COMMISSIONAMT.xml
database/model/tables/C_COMMISSIONDETAIL.xml
database/model/tables/C_COMMISSIONLINE.xml
database/model/tables/C_COMMISSIONRUN.xml
database/model/tables/C_CONVERSION_RATE.xml
database/model/tables/C_COSTTYPE.xml
database/model/tables/C_COUNTRY.xml
database/model/tables/C_COUNTRY_TRL.xml
database/model/tables/C_CURRENCY.xml
database/model/tables/C_CURRENCY_TRL.xml
database/model/tables/C_CYCLE.xml
database/model/tables/C_CYCLEPHASE.xml
database/model/tables/C_CYCLESTEP.xml
database/model/tables/C_DEBT_PAYMENT.xml
database/model/tables/C_DEBT_PAYMENT_BALANCING.xml
database/model/tables/C_DEBT_PAYMENT_BAL_REPLACE.xml
database/model/tables/C_DISCOUNT.xml
database/model/tables/C_DOCTYPE.xml
database/model/tables/C_DOCTYPE_COPY.xml
database/model/tables/C_DOCTYPE_COPY_TRL.xml
database/model/tables/C_DOCTYPE_TRL.xml
database/model/tables/C_DP_MANAGEMENT.xml
database/model/tables/C_DP_MANAGEMENTLINE.xml
database/model/tables/C_DUNNING.xml
database/model/tables/C_DUNNINGLEVEL.xml
database/model/tables/C_DUNNINGLEVEL_TRL.xml
database/model/tables/C_DUNNINGRUN.xml
database/model/tables/C_DUNNINGRUNENTRY.xml
database/model/tables/C_ELEMENT.xml
database/model/tables/C_ELEMENTVALUE.xml
database/model/tables/C_ELEMENTVALUE_OPERAND.xml
database/model/tables/C_ELEMENTVALUE_TRL.xml
database/model/tables/C_EXTERNALPOS.xml
database/model/tables/C_EXTERNALPOS_CATEGORY.xml
database/model/tables/C_EXTERNALPOS_PRODUCT.xml
database/model/tables/C_FILE.xml
database/model/tables/C_GLITEM.xml
database/model/tables/C_GLITEM_ACCT.xml
database/model/tables/C_GREETING.xml
database/model/tables/C_GREETING_TRL.xml
database/model/tables/C_INCOTERMS.xml
database/model/tables/C_INTERORG_ACCT.xml
database/model/tables/C_INVOICE.xml
database/model/tables/C_INVOICELINE.xml
database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml
database/model/tables/C_INVOICELINE_OFFER.xml
database/model/tables/C_INVOICEPAYSCHEDULE.xml
database/model/tables/C_INVOICESCHEDULE.xml
database/model/tables/C_INVOICETAX.xml
database/model/tables/C_INVOICE_DISCOUNT.xml
database/model/tables/C_LOCATION.xml
database/model/tables/C_NATION.xml
database/model/tables/C_NONBUSINESSDAY.xml
database/model/tables/C_ORDER.xml
database/model/tables/C_ORDERLINE.xml
database/model/tables/C_ORDERLINE_OFFER.xml
database/model/tables/C_ORDERTAX.xml
database/model/tables/C_ORGASSIGNMENT.xml
database/model/tables/C_PAYMENTTERM.xml
database/model/tables/C_PAYMENTTERMLINE.xml
database/model/tables/C_PAYMENTTERM_TRL.xml
database/model/tables/C_PAYSCHEDULE.xml
database/model/tables/C_PERIOD.xml
database/model/tables/C_PERIODCONTROL.xml
database/model/tables/C_PHASE.xml
database/model/tables/C_PROJECT.xml
database/model/tables/C_PROJECTISSUE.xml
database/model/tables/C_PROJECTLINE.xml
database/model/tables/C_PROJECTPHASE.xml
database/model/tables/C_PROJECTPROPOSAL.xml
database/model/tables/C_PROJECTPROPOSALLINE.xml
database/model/tables/C_PROJECTPROPOSALTASK.xml
database/model/tables/C_PROJECTTASK.xml
database/model/tables/C_PROJECTTYPE.xml
database/model/tables/C_PROJECT_ACCT.xml
database/model/tables/C_PROJECT_VENDOR.xml
database/model/tables/C_PROMISSORYFORMAT.xml
database/model/tables/C_REGION.xml
database/model/tables/C_REMITTANCE.xml
database/model/tables/C_REMITTANCELINE.xml
database/model/tables/C_REMITTANCE_PARAMETER.xml
database/model/tables/C_REMITTANCE_TYPE.xml
database/model/tables/C_REVENUERECOGNITION.xml
database/model/tables/C_REVENUERECOGNITION_PLAN.xml
database/model/tables/C_REVENUERECOGNITION_RUN.xml
database/model/tables/C_SALARY_CATEGORY.xml
database/model/tables/C_SALARY_CATEGORY_COST.xml
database/model/tables/C_SALESREGION.xml
database/model/tables/C_SERVICELEVEL.xml
database/model/tables/C_SERVICELEVELLINE.xml
database/model/tables/C_SETTLEMENT.xml
database/model/tables/C_TASK.xml
database/model/tables/C_TAX.xml
database/model/tables/C_TAXCATEGORY.xml
database/model/tables/C_TAXCATEGORY_TRL.xml
database/model/tables/C_TAX_ACCT.xml
database/model/tables/C_TAX_REPORT.xml
database/model/tables/C_TAX_TRL.xml
database/model/tables/C_TAX_ZONE.xml
database/model/tables/C_UOM.xml
database/model/tables/C_UOM_CONVERSION.xml
database/model/tables/C_UOM_TRL.xml
database/model/tables/C_VALIDCOMBINATION.xml
database/model/tables/C_WITHHOLDING.xml
database/model/tables/C_WITHHOLDING_ACCT.xml
database/model/tables/C_YEAR.xml
database/model/tables/DBA_ERRORLOG.xml
database/model/tables/FACT_ACCT.xml
database/model/tables/FACT_ACCT_BALANCE.xml
database/model/tables/FACT_ACCT_CFS.xml
database/model/tables/GL_BUDGET.xml
database/model/tables/GL_CATEGORY.xml
database/model/tables/GL_JOURNAL.xml
database/model/tables/GL_JOURNALBATCH.xml
database/model/tables/GL_JOURNALLINE.xml
database/model/tables/I_BANKSTATEMENT.xml
database/model/tables/I_BPARTNER.xml
database/model/tables/I_BUDGETLINE.xml
database/model/tables/I_ELEMENTVALUE.xml
database/model/tables/I_GLJOURNAL.xml
database/model/tables/I_INVENTORY.xml
database/model/tables/I_INVOICE.xml
database/model/tables/I_ORDER.xml
database/model/tables/I_PRODUCT.xml
database/model/tables/I_REPORTLINE.xml
database/model/tables/I_TAX.xml
database/model/tables/K_CATEGORY.xml
database/model/tables/K_CATEGORYVALUE.xml
database/model/tables/K_COMMENT.xml
database/model/tables/K_ENTRY.xml
database/model/tables/K_ENTRYCATEGORY.xml
database/model/tables/K_ENTRYRELATED.xml
database/model/tables/K_SOURCE.xml
database/model/tables/K_SYNONYM.xml
database/model/tables/K_TOPIC.xml
database/model/tables/K_TYPE.xml
database/model/tables/MA_CALCSTD.xml
database/model/tables/MA_CCP.xml
database/model/tables/MA_CCP_GROUP.xml
database/model/tables/MA_CCP_SHIFT.xml
database/model/tables/MA_CONSUMEPRODUCT.xml
database/model/tables/MA_CONSUMERM.xml
database/model/tables/MA_COSTCENTER.xml
database/model/tables/MA_COSTCENTER_EMPLOYEE.xml
database/model/tables/MA_COSTCENTER_IC.xml
database/model/tables/MA_COSTCENTER_MACHINE.xml
database/model/tables/MA_COSTCENTER_VERSION.xml
database/model/tables/MA_DEFAULTPLAN.xml
database/model/tables/MA_GLOBALUSE.xml
database/model/tables/MA_INCIDENCE.xml
database/model/tables/MA_INDIRECT_COST.xml
database/model/tables/MA_INDIRECT_COST_VALUE.xml
database/model/tables/MA_MACHINE.xml
database/model/tables/MA_MACHINESTATION.xml
database/model/tables/MA_MACHINE_COST.xml
database/model/tables/MA_MACHINE_TYPE.xml
database/model/tables/MA_MAINTENANCE.xml
database/model/tables/MA_MAINT_OPERATION.xml
database/model/tables/MA_MAINT_PART.xml
database/model/tables/MA_MAINT_PERIODICITY.xml
database/model/tables/MA_MAINT_SCHEDULED.xml
database/model/tables/MA_MAINT_WORKER.xml
database/model/tables/MA_MEASURE_GROUP.xml
database/model/tables/MA_MEASURE_SHIFT.xml
database/model/tables/MA_MEASURE_TIME.xml
database/model/tables/MA_MEASURE_VALUES.xml
database/model/tables/MA_PC_CASE.xml
database/model/tables/MA_PC_TEST.xml
database/model/tables/MA_PC_VALUE.xml
database/model/tables/MA_PERIODIC_CONTROL.xml
database/model/tables/MA_PL_EMPLOYEE.xml
database/model/tables/MA_PL_IC.xml
database/model/tables/MA_PL_INVOICELINE.xml
database/model/tables/MA_PL_MACHINE.xml
database/model/tables/MA_PROCESS.xml
database/model/tables/MA_PROCESSPLAN.xml
database/model/tables/MA_PROCESSPLAN_VERSION.xml
database/model/tables/MA_PRODUCTTYPE.xml
database/model/tables/MA_SECTION.xml
database/model/tables/MA_SEQUENCE.xml
database/model/tables/MA_SEQUENCEPRODUCT.xml
database/model/tables/MA_SEQUENCEPRODUCT_COST.xml
database/model/tables/MA_SEQUENCE_EMPLOYEE.xml
database/model/tables/MA_SEQUENCE_IC.xml
database/model/tables/MA_SEQUENCE_MACHINE.xml
database/model/tables/MA_TOOLSET.xml
database/model/tables/MA_TOOLSETPROCESS.xml
database/model/tables/MA_TOOLSETUSED.xml
database/model/tables/MA_TOOLSET_TYPE.xml
database/model/tables/MA_WEEMPLOYEE.xml
database/model/tables/MA_WEINCIDENCE.xml
database/model/tables/MA_WETECHNICALSUPPORT.xml
database/model/tables/MA_WORKREQUIREMENT.xml
database/model/tables/MA_WORKSTATION.xml
database/model/tables/MA_WRPHASE.xml
database/model/tables/MA_WRPHASEPRODUCT.xml
database/model/tables/MRP_PLANNER.xml
database/model/tables/MRP_PLANNINGMETHOD.xml
database/model/tables/MRP_PLANNINGMETHODLINE.xml
database/model/tables/MRP_RUN_PRODUCTION.xml
database/model/tables/MRP_RUN_PRODUCTIONLINE.xml
database/model/tables/MRP_RUN_PURCHASE.xml
database/model/tables/MRP_RUN_PURCHASELINE.xml
database/model/tables/MRP_SALESFORECAST.xml
database/model/tables/MRP_SALESFORECASTLINE.xml
database/model/tables/M_ATTRIBUTE.xml
database/model/tables/M_ATTRIBUTEINSTANCE.xml
database/model/tables/M_ATTRIBUTESEARCH.xml
database/model/tables/M_ATTRIBUTESET.xml
database/model/tables/M_ATTRIBUTESETINSTANCE.xml
database/model/tables/M_ATTRIBUTEUSE.xml
database/model/tables/M_ATTRIBUTEVALUE.xml
database/model/tables/M_COSTING.xml
database/model/tables/M_DISCOUNTSCHEMA.xml
database/model/tables/M_DISCOUNTSCHEMABREAK.xml
database/model/tables/M_DISCOUNTSCHEMALINE.xml
database/model/tables/M_EDI.xml
database/model/tables/M_EDI_INFO.xml
database/model/tables/M_FREIGHT.xml
database/model/tables/M_FREIGHTCATEGORY.xml
database/model/tables/M_INOUT.xml
database/model/tables/M_INOUTLINE.xml
database/model/tables/M_INOUTLINE_TYPE.xml
database/model/tables/M_INTERNAL_CONSUMPTION.xml
database/model/tables/M_INTERNAL_CONSUMPTIONLINE.xml
database/model/tables/M_INVENTORY.xml
database/model/tables/M_INVENTORYLINE.xml
database/model/tables/M_LOCATOR.xml
database/model/tables/M_LOCATOR_RENTING.xml
database/model/tables/M_LOCATOR_TYPE.xml
database/model/tables/M_LOT.xml
database/model/tables/M_LOTCTL.xml
database/model/tables/M_MATCHINV.xml
database/model/tables/M_MATCHPO.xml
database/model/tables/M_MOVEMENT.xml
database/model/tables/M_MOVEMENTLINE.xml
database/model/tables/M_OFFER.xml
database/model/tables/M_OFFER_BPARTNER.xml
database/model/tables/M_OFFER_BP_GROUP.xml
database/model/tables/M_OFFER_PRICELIST.xml
database/model/tables/M_OFFER_PRODUCT.xml
database/model/tables/M_OFFER_PROD_CAT.xml
database/model/tables/M_PERPETUALINV.xml
database/model/tables/M_PRICELIST.xml
database/model/tables/M_PRICELIST_VERSION.xml
database/model/tables/M_PRODUCT.xml
database/model/tables/M_PRODUCTION.xml
database/model/tables/M_PRODUCTIONLINE.xml
database/model/tables/M_PRODUCTIONPLAN.xml
database/model/tables/M_PRODUCTPRICE.xml
database/model/tables/M_PRODUCT_ACCT.xml
database/model/tables/M_PRODUCT_BOM.xml
database/model/tables/M_PRODUCT_CATEGORY.xml
database/model/tables/M_PRODUCT_CATEGORY_ACCT.xml
database/model/tables/M_PRODUCT_COSTING.xml
database/model/tables/M_PRODUCT_CUSTOMER.xml
database/model/tables/M_PRODUCT_ORG.xml
database/model/tables/M_PRODUCT_PO.xml
database/model/tables/M_PRODUCT_TEMPLATE.xml
database/model/tables/M_PRODUCT_TRL.xml
database/model/tables/M_PRODUCT_UOM.xml
database/model/tables/M_RAPPEL.xml
database/model/tables/M_RAPPEL_BPARTNER.xml
database/model/tables/M_RAPPEL_INVOICE.xml
database/model/tables/M_RAPPEL_PRODUCT.xml
database/model/tables/M_RAPPEL_PRODUCTCATEGORY.xml
database/model/tables/M_RAPPEL_SCALE.xml
database/model/tables/M_REPLENISH.xml
database/model/tables/M_REQUISITION.xml
database/model/tables/M_REQUISITIONLINE.xml
database/model/tables/M_SERNOCTL.xml
database/model/tables/M_SHIPPER.xml
database/model/tables/M_STORAGE_DETAIL.xml
database/model/tables/M_STORAGE_PENDING.xml
database/model/tables/M_SUBSTITUTE.xml
database/model/tables/M_TRANSACTION.xml
database/model/tables/M_WAREHOUSE.xml
database/model/tables/M_WAREHOUSE_ACCT.xml
database/model/tables/M_WAREHOUSE_SHIPPER.xml
database/model/tables/M_WH_PERIOD.xml
database/model/tables/M_WH_PERIOD_INVOICED.xml
database/model/tables/M_WH_SCHEDULE.xml
database/model/tables/M_WH_SCHEDULE_PRODUCT.xml
database/model/tables/PA_ACHIEVEMENT.xml
database/model/tables/PA_COLOR.xml
database/model/tables/PA_GOAL.xml
database/model/tables/PA_MEASURE.xml
database/model/tables/PA_MEASURECALC.xml
database/model/tables/PA_REPORT.xml
database/model/tables/PA_REPORTCOLUMN.xml
database/model/tables/PA_REPORTCOLUMNSET.xml
database/model/tables/PA_REPORTLINE.xml
database/model/tables/PA_REPORTLINESET.xml
database/model/tables/PA_REPORTSOURCE.xml
database/model/tables/PLAN_TABLE.xml
database/model/tables/R_CONTACTINTEREST.xml
database/model/tables/R_INTERESTAREA.xml
database/model/tables/R_MAILTEXT.xml
database/model/tables/R_REQUEST.xml
database/model/tables/R_REQUESTACTION.xml
database/model/tables/R_REQUESTPROCESSOR.xml
database/model/tables/R_REQUESTPROCESSOR_ROUTE.xml
database/model/tables/R_REQUESTTYPE.xml
database/model/tables/R_RESOURCEPLANCOST.xml
database/model/tables/S_EXPENSETYPE.xml
database/model/tables/S_RESOURCE.xml
database/model/tables/S_RESOURCEASSIGNMENT.xml
database/model/tables/S_RESOURCETYPE.xml
database/model/tables/S_RESOURCEUNAVAILABLE.xml
database/model/tables/S_TIMEEXPENSE.xml
database/model/tables/S_TIMEEXPENSELINE.xml
database/model/tables/S_TIMETYPE.xml
database/model/tables/S_TRAINING.xml
database/model/tables/S_TRAINING_CLASS.xml
database/model/tables/TEST.xml
database/model/tables/TIME_DIMENSION.xml
database/model/tables/TIRE_STORAGE.xml
database/model/tables/T_INVENTORYVALUE.xml
database/model/tables/T_REPLENISH.xml
database/model/tables/T_REPORT.xml
database/model/tables/T_REPORTSTATEMENT.xml
database/model/tables/T_SELECTION.xml
database/model/tables/T_SELECTION2.xml
database/model/tables/T_SPOOL.xml
database/model/tables/W_ADVERTISEMENT.xml
database/model/tables/W_BASKET.xml
database/model/tables/W_BASKETLINE.xml
database/model/tables/W_CLICK.xml
database/model/tables/W_CLICKCOUNT.xml
database/model/tables/W_COUNTER.xml
database/model/tables/W_COUNTERCOUNT.xml
database/model/triggers/AD_ACCOUNTINGRPT_ELEMENT_TRG.xml
database/model/triggers/AD_ALERTRECIPIENT_TRG.xml
database/model/triggers/AD_ALERTRULE_TRG.xml
database/model/triggers/AD_CALLOUT_TRG.xml
database/model/triggers/AD_CLIENT_TRG.xml
database/model/triggers/AD_COLUMN_TRG.xml
database/model/triggers/AD_DESKTOP_TRG.xml
database/model/triggers/AD_ELEMENT_TRG.xml
database/model/triggers/AD_ELEMENT_TRL_TRG.xml
database/model/triggers/AD_FIELDGROUP_TRG.xml
database/model/triggers/AD_FIELD_TRG.xml
database/model/triggers/AD_FORM_TRG.xml
database/model/triggers/AD_FORM_TRG2.xml
database/model/triggers/AD_MENU_TRG.xml
database/model/triggers/AD_MESSAGE_TRG.xml
database/model/triggers/AD_ORG_TRG.xml
database/model/triggers/AD_PINSTANCE_TRG.xml
database/model/triggers/AD_PRINTFORMATITEM_BTRG.xml
database/model/triggers/AD_PRINTFORMATITEM_TRG.xml
database/model/triggers/AD_PROCESS_PARA_TRG.xml
database/model/triggers/AD_PROCESS_TRG.xml
database/model/triggers/AD_PROCESS_TRL_TRG.xml
database/model/triggers/AD_REFERENCE_TRG.xml
database/model/triggers/AD_REFERENCE_TRG2.xml
database/model/triggers/AD_REF_LIST_TRG.xml
database/model/triggers/AD_ROLE_ORGACCESS_TRG.xml
database/model/triggers/AD_ROLE_TRG.xml
database/model/triggers/AD_TABLE_TRG.xml
database/model/triggers/AD_TAB_TRG.xml
database/model/triggers/AD_TAB_TRG2.xml
database/model/triggers/AD_TASK_TRG.xml
database/model/triggers/AD_TASK_TRG2.xml
database/model/triggers/AD_TEXTINTERFACES_TRG.xml
database/model/triggers/AD_TREE_TRG.xml
database/model/triggers/AD_WF_NODE_TRG.xml
database/model/triggers/AD_WINDOW_TRG.xml
database/model/triggers/AD_WINDOW_TRG2.xml
database/model/triggers/AD_WINDOW_TRL_TRG.xml
database/model/triggers/AD_WORKBENCH_TRG.xml
database/model/triggers/AD_WORKFLOW_TRG.xml
database/model/triggers/AT_COMMAND_TRG.xml
database/model/triggers/A_AMORTIZATIONLINE_TRG.xml
database/model/triggers/A_AMORTIZATIONLINE_TRG2.xml
database/model/triggers/A_AMORTIZATION_TRG.xml
database/model/triggers/A_ASSET_GROUP_TRG.xml
database/model/triggers/A_ASSET_GROUP_TRG2.xml
database/model/triggers/A_ASSET_TRG.xml
database/model/triggers/A_ASSET_TRG2.xml
database/model/triggers/C_ACCTSCHEMADEL_TRG.xml
database/model/triggers/C_ACCTSCHEMA_ELEMENT_TRG.xml
database/model/triggers/C_ACCTSCHEMA_TRG.xml
database/model/triggers/C_BANKACCOUNT_TRG.xml
database/model/triggers/C_BANKSTATEMENTLINE_TRG.xml
database/model/triggers/C_BANKSTATEMENT_TRG.xml
database/model/triggers/C_BPARTNER_LOCATION_TRG.xml
database/model/triggers/C_BPARTNER_TRG.xml
database/model/triggers/C_BP_GROUP_TRG.xml
database/model/triggers/C_BSTMTLINE_CHK_RESTRICT_TRG.xml
database/model/triggers/C_BSTMT_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_CASHBOOK_TRG.xml
database/model/triggers/C_CASHLINE_CHK_RESTRICT_TRG.xml
database/model/triggers/C_CASHLINE_TRG.xml
database/model/triggers/C_CASH_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_CASH_TRG.xml
database/model/triggers/C_CHARGE_TRG.xml
database/model/triggers/C_COMMISSIONAMT_TRG.xml
database/model/triggers/C_COMMISSIONDETAIL_TRG.xml
database/model/triggers/C_CONVERSION_RATE_TRG.xml
database/model/triggers/C_CONVERSION_RATE_TRG2.xml
database/model/triggers/C_DEBT_PAYMENT_BAL_TRG.xml
database/model/triggers/C_DEBT_PAYMENT_TRG.xml
database/model/triggers/C_DOCTYPE_COPY_TRG.xml
database/model/triggers/C_DOCTYPE_TRG.xml
database/model/triggers/C_DPMLINE_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_DP_MANAGEMENTLINE_TRG.xml
database/model/triggers/C_DP_MANAGEMENT_CHK_RESTR_TRG.xml
database/model/triggers/C_DUNNINGLEVEL_TRG.xml
database/model/triggers/C_ELEMENTVALUE_TRG.xml
database/model/triggers/C_EXTERNALPOS_TRG.xml
database/model/triggers/C_GREETING_TRG.xml
database/model/triggers/C_INVLINE_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_INVOICEDISCOUNT_TRG.xml
database/model/triggers/C_INVOICELINE_TRG.xml
database/model/triggers/C_INVOICELINE_TRG2.xml
database/model/triggers/C_INVOICETAX_TRG.xml
database/model/triggers/C_INVOICE_TRG.xml
database/model/triggers/C_INVOICE_TRG2.xml
database/model/triggers/C_INVTAX_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_ORDERLINE2_TRG.xml
database/model/triggers/C_ORDERLINE_TRG.xml
database/model/triggers/C_ORDERLINE_TRG2.xml
database/model/triggers/C_ORDERTAX_TRG.xml
database/model/triggers/C_ORDER_CHK_RESTRINCTIONS_TRG.xml
database/model/triggers/C_ORDER_TRG.xml
database/model/triggers/C_ORDER_TRG2.xml
database/model/triggers/C_ORDLINE_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/C_PAYMENTTERM_TRG.xml
database/model/triggers/C_PERIOD_TRG.xml
database/model/triggers/C_PERIOD_TRG2.xml
database/model/triggers/C_PROJECTLINE_TRG.xml
database/model/triggers/C_PROJECTLINE_TRG2.xml
database/model/triggers/C_PROJECTPROPOSALTASK_TRG.xml
database/model/triggers/C_PROJECT_TRG.xml
database/model/triggers/C_PROJECT_TRG2.xml
database/model/triggers/C_PROJECT_TRG3.xml
database/model/triggers/C_REMITTANCELINE_TRG.xml
database/model/triggers/C_REMITTANCE_TRG.xml
database/model/triggers/C_REVENUERECOGNITION_PLAN_TRG.xml
database/model/triggers/C_SALESREGION_TRG.xml
database/model/triggers/C_SETTLEMENT_TRG.xml
database/model/triggers/C_TAXCATEGORY_TRG.xml
database/model/triggers/C_TAX_REPORT_TRG.xml
database/model/triggers/C_TAX_TRG.xml
database/model/triggers/C_UOM_TRG.xml
database/model/triggers/C_VALIDCOMBINATION_TRG.xml
database/model/triggers/C_WITHHOLDING_TRG.xml
database/model/triggers/GL_JL_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/GL_JOURNALLINE2_TRG.xml
database/model/triggers/GL_JOURNALLINE_TRG.xml
database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml
database/model/triggers/GL_JOURNAL_TRG.xml
database/model/triggers/M_ATTRIBUTEVALUE_TRG.xml
database/model/triggers/M_INOUTLINE_TRG.xml
database/model/triggers/M_INOUT_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/M_INOUT_TRG_PROV.xml
database/model/triggers/M_INTERNAL_CONSUMPTIONLINE_TRG.xml
database/model/triggers/M_INVENTORYLINE2_TRG.xml
database/model/triggers/M_INVENTORYLINE_TRG.xml
database/model/triggers/M_INVENTORY_TRG.xml
database/model/triggers/M_IOLINE_CHK_RESTRICTIONS_TRG.xml
database/model/triggers/M_MATCHPO_TRG.xml
database/model/triggers/M_MOVEMENTLINE_TRG.xml
database/model/triggers/M_MOVEMENT_TRG.xml
database/model/triggers/M_PRODUCTIONLINE_TRG.xml
database/model/triggers/M_PRODUCTIONPLAN_TRG.xml
database/model/triggers/M_PRODUCTION_TRG.xml
database/model/triggers/M_PRODUCT_BOM_TRG.xml
database/model/triggers/M_PRODUCT_CATEGORY_TRG.xml
database/model/triggers/M_PRODUCT_TRG.xml
database/model/triggers/M_RAPPEL_INVOICE_TRG.xml
database/model/triggers/M_TRANSACTION_TRG.xml
database/model/triggers/M_WAREHOUSE_TRG.xml
database/model/triggers/S_EXPENSETYPE_TRG.xml
database/model/triggers/S_RESOURCEASSIGNMENT_TRG.xml
database/model/triggers/S_RESOURCETYPE_TRG.xml
database/model/triggers/S_RESOURCEUNAVAILABLE_TRG.xml
database/model/triggers/S_RESOURCE_TRG.xml
database/model/triggers/S_TIMEEXPENSELINE_TRG.xml
database/model/triggers/S_TIMEEXPENSE_TRG.xml
database/model/views/AD_FIELD_V.xml
database/model/views/AD_FIELD_VT.xml
database/model/views/AD_INTEGER.xml
database/model/views/AD_REF_LIST_V.xml
database/model/views/AD_TABLE_POST_V.xml
database/model/views/AD_TAB_V.xml
database/model/views/AD_TAB_VT.xml
database/model/views/AD_USER_ROLES_V.xml
database/model/views/AD_WINDOW_VT.xml
database/model/views/A_ASSET_AMORTIZATION.xml
database/model/views/C_DEBT_PAYMENT_CANCEL.xml
database/model/views/C_DEBT_PAYMENT_GENERATE.xml
database/model/views/C_DEBT_PAYMENT_V.xml
database/model/views/C_INVOICELINE_V.xml
database/model/views/C_INVOICE_CANDIDATE_V.xml
database/model/views/C_INVOICE_HEADER_V.xml
database/model/views/C_INVOICE_HEADER_VT.xml
database/model/views/C_INVOICE_LINETAX_V.xml
database/model/views/C_INVOICE_LINETAX_VT.xml
database/model/views/C_INVOICE_V.xml
database/model/views/C_ORDER_HEADER_V.xml
database/model/views/C_ORDER_HEADER_VT.xml
database/model/views/C_ORDER_LINETAX_V.xml
database/model/views/C_ORDER_LINETAX_VT.xml
database/model/views/C_PROJECT_DETAILS_V.xml
database/model/views/C_PROJECT_DETAILS_VT.xml
database/model/views/C_PROJECT_HEADER_V.xml
database/model/views/C_PROJECT_HEADER_VT.xml
database/model/views/GL_JOURNALLINE_ACCT_V.xml
database/model/views/MA_PROCESSPLAN_TOTALIZED.xml
database/model/views/MA_SEQUENCE_EMPLOYEE_COST.xml
database/model/views/MA_SEQUENCE_INDIRECT_COST_COST.xml
database/model/views/MA_SEQUENCE_MACHINE_COST.xml
database/model/views/M_INOUT_CANDIDATE_V.xml
database/model/views/M_INOUT_HEADER_V.xml
database/model/views/M_INOUT_HEADER_VT.xml
database/model/views/M_INOUT_LINE_V.xml
database/model/views/M_INOUT_LINE_VT.xml
database/model/views/REPORT_PROJECTPROPOSAL.xml
database/model/views/RV_ASSET_CUSTOMER.xml
database/model/views/RV_ASSET_DELIVERY.xml
database/model/views/RV_BPARTNER.xml
database/model/views/RV_CASH_DETAIL.xml
database/model/views/RV_C_INVOICE.xml
database/model/views/RV_C_INVOICELINE.xml
database/model/views/RV_C_INVOICE_CUSTOMERPRODQTR.xml
database/model/views/RV_C_INVOICE_CUSTOMERVENDQTR.xml
database/model/views/RV_C_INVOICE_DAY.xml
database/model/views/RV_C_INVOICE_MONTH.xml
database/model/views/RV_C_INVOICE_PRODMONTH.xml
database/model/views/RV_C_INVOICE_PRODWEEK.xml
database/model/views/RV_C_INVOICE_VENDORMONTH.xml
database/model/views/RV_C_INVOICE_WEEK.xml
database/model/views/RV_M_TRANSACTION.xml
database/model/views/RV_M_TRANSACTION_SUM.xml
database/model/views/RV_ORDER_OPEN.xml
database/model/views/RV_PRODUCT_COSTING.xml
database/model/views/RV_PROJECTCYCLE.xml
database/model/views/R_REQUEST_V.xml
database/model/views/S_TIMEEXPENSELINE_V.xml
--- a/database/model/functions/ADD_MONTHS2.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/ADD_MONTHS2.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION ADD_MONTHS2">
-<function name="ADD_MONTHS2" type="TIMESTAMP" size="7">
-<parameter name="pDate" type="TIMESTAMP" size="7" mode="in"/>
-<parameter name="pMonths" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION ADD_MONTHS2">
+    <function name="ADD_MONTHS2" type="TIMESTAMP">
+      <parameter name="pDate" type="TIMESTAMP" mode="in"/>
+      <parameter name="pMonths" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -31,12 +31,12 @@
     return add_months(pdate, pMonths);
   else
     pDateAux := add_months(pDate, pMonths);
-    if (to_number(to_char(pDateAux,'DD'))>to_number(to_char(pDate,'DD'))) then
+    if (to_number(to_char(pDateAux,'DD'))&gt;to_number(to_char(pDate,'DD'))) then
       return to_date(to_char(pDate,'DD')||to_char(pDateAux,'-MM-YYYY'),'DD-MM-YYYY');
     else
       return pDateAux;
     end if;
   end if;
-END ADD_MONTHS2]]></body>
-</function> 
-</database>
\ No newline at end of file
+END ADD_MONTHS2</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_APPLICATION_IMPORT .xml	Tue Nov 20 13:31:01 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,554 +0,0 @@
-<?xml version="1.0"?>
-<database name="FUNCTION AD_APPLICATION_IMPORT">
-<function name="AD_APPLICATION_IMPORT">
-<parameter name="p_tableIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_tableIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_windowIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_windowIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_referenceIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_referenceIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_valruleIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_valruleIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_elementIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_elementIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_menuIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_menuIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_sequenceIdFrom" type="NUMERIC" mode="in"/>
-<parameter name="p_sequenceIdTo" type="NUMERIC" mode="in"/>
-<parameter name="p_baseinstalation" type="CHAR" mode="in"/>
-<body><![CDATA[
-/************************************************************************* 
-* The contents of this file are subject to the Openbravo  Public  License 
-* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License 
-* Version 1.1  with a permitted attribution clause; you may not  use this 
-* file except in compliance with the License. You  may  obtain  a copy of 
-* the License at http://www.openbravo.com/legal/license.html 
-* Software distributed under the License  is  distributed  on  an "AS IS" 
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 
-* License for the specific  language  governing  rights  and  limitations 
-* under the License. 
-* The Original Code is Openbravo ERP. 
-* The Initial Developer of the Original Code is Openbravo SL 
-* All portions are Copyright (C) 2001-2006 Openbravo SL 
-* All Rights Reserved. 
-* Contributor(s):  ______________________________________. 
-************************************************************************/ 
- v_minId     NUMBER(10); 
--- v_maxId     NUMBER(10); 
- v_tableOffset   NUMBER(10); 
- v_windowOffset   NUMBER(10); 
- v_columnOffset   NUMBER(10); 
- v_tabOffset    NUMBER(10); 
- v_auxiliarinputOffset NUMBER(10); 
- v_fieldOffset   NUMBER(10); 
- v_fieldgroupOffset  NUMBER(10); 
- v_referenceOffset  NUMBER(10); 
- v_reftableOffset  NUMBER(10); --NOT needed because it lacks of an ID 
- v_reflistOffset   NUMBER(10); 
- v_valruleOffset   NUMBER(10); 
- v_elementOffset   NUMBER(10); 
- v_formOffset   NUMBER(10); 
- v_messageOffset   NUMBER(10); 
- v_menuOffset   NUMBER(10); 
- v_reportviewOffset  NUMBER(10); 
- v_processOffset   NUMBER(10); 
- v_processparaOffset  NUMBER(10); 
- v_sequenceOffset  NUMBER(10); 
- v_taskOffset   NUMBER(10); 
- v_treeOffset   NUMBER(10); 
- v_workflowOffset  NUMBER(10); 
- v_wfnodeOffset   NUMBER(10); 
- v_wfnodenextOffset  NUMBER(10); 
- v_nextNo    NUMBER(10); 
-BEGIN 
---AD_Table 
- --Next sequence number (blocking for update) 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Table' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- --Mininum and maximum values of ID in TAX_AUX 
- SELECT MIN(AD_TABLE_ID)--, MAX(AD_TABLE_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_TABLE WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- v_tableOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Table' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; */ 
- 
- 
---AD_Column 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Column' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_COLUMN_ID)--, MAX(AD_COLUMN_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_COLUMN WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- v_columnOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Column' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; */ 
- 
- 
---AD_Tab 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Tab' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_TAB_ID)--, MAX(AD_TAB_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- v_tabOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Tab' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Window 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Window' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_WINDOW_ID)--, MAX(AD_WINDOW_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_WINDOW WHERE AD_WINDOW_ID IN 
-   (SELECT AD_WINDOW_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo) 
- AND AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
- v_windowOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Window' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Field 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Field' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_FIELD_ID)--, MAX(AD_FIELD_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN 
-   (SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
- v_fieldOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Field' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_FieldGroup 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_FieldGroup' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_FIELDGROUP_ID)--, MAX(AD_FIELDGROUP_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_FIELDGROUP WHERE AD_FIELDGROUP_ID IN 
-   (SELECT AD_FIELDGROUP_ID FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN 
-      (SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo)); 
- v_fieldgroupOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_FieldGroup' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Reference 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Reference' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_REFERENCE_ID)--, MAX(AD_REFERENCE_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_REFERENCE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- v_referenceOffset:=v_nextNo - v_minId; 
- /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Reference' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Ref_List 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Ref_List' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_REF_LIST_ID)--, MAX(AD_REF_LIST_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_REF_LIST WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- v_reflistOffset:=v_nextNo - v_minId; 
- /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Ref_List' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Val_Rule 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Val_Rule' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_VAL_RULE_ID)--, MAX(AD_VAL_RULE_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_VAL_RULE WHERE AD_VAL_RULE_ID BETWEEN p_valruleIdFrom AND p_valruleIdTo; 
- v_valruleOffset:=v_nextNo - v_minId; 
- /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Val_Rule' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Element 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Element' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_ELEMENT_ID)--, MAX(AD_ELEMENT_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_ELEMENT WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
- v_elementOffset:=v_nextNo - v_minId; 
- /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Element' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Menu 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Menu' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_MENU_ID)--, MAX(AD_MENU_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_MENU WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
- v_menuOffset:=v_nextNo - v_minId; 
- /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Menu' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
---AD_Sequence 
- SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
- WHERE Name='AD_Sequence' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
- FOR UPDATE OF CurrentNextSys; 
- SELECT MIN(AD_SEQUENCE_ID)--, MAX(AD_SEQUENCE_ID) 
- INTO v_minId--, v_maxId 
- FROM TAD_AUX.AD_SEQUENCE WHERE AD_SEQUENCE_ID BETWEEN p_sequenceIdFrom AND p_sequenceIdTo; 
- v_sequenceOffset:=v_nextNo - v_minId; 
-/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
- WHERE  Name='AD_Sequence' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; 
-*/ 
- 
- 
---AD_REF_TABLE doesn't need a translation because it lacks of an ID 
---Por la misma razon, tampoco necesitan traslacion las tablas de traduccion (..._TRL) 
- 
---Comienzo de carga de datos. 
---Primero, inhabilitar constraints de integridad referencial (existen referencias circulares...) 
- --AD_Table. No inhabilitamos el trigger para que inserte valores en ad_sequence 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE DISABLE CONSTRAINT AD_WINDOW_TABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE DISABLE CONSTRAINT AD_VALRULE_TABLE'); 
- --AD_Column. No tiene trigger para insert 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT ADPROCESS_ADCOLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_ELEMENT_AD_COLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_REFERENCE_COLUMNDATATYPE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_REFERENCE_COLUMNVALUE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_TABLE_COLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_VALRULE_COLUMN'); 
- --AD_Tab. Inhabilitamos trigger para que no inserte en ad_tab_trl 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_TAB_TRG DISABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADCOLUMN_ADTABSORTORDER'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADCOLUMN_ADTABSORTYESNO'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADPROCESS_ADTAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADTAB_INCLUDED'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_COLUMN_AD_TAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_TABLE_TAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_WINDOW_TAB'); 
- --AD_Window. Constraints no necesita. Triggers si. Habra que insertar a mano en la window_access!!! 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRG DISABLE'); 
- --AD_Window_Access 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS DISABLE CONSTRAINT ADWINDOW_ADWINDOWACCESS'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS DISABLE CONSTRAINT ADROLE_ADWINDOWACCESS'); 
- --AD_Field 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELD_TRG DISABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT ADFIELDGROUP_ADFIELD'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT AD_COLUMN_FIELD'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT AD_TAB_FIELD'); 
- --AD_FieldGroup no necesita. Triggers si 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELDGROUP_TRG DISABLE'); 
- --AD_Reference no necesita. Triggers si 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REFERENCE_TRG DISABLE'); 
- --AD_Ref_List 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REF_LIST_TRG DISABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST DISABLE CONSTRAINT AD_REFERENCE_REFLIST'); 
- --AD_Ref_Table 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT ADD_TABLE_REFTABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_COLUMN_REFTABLE_DISPLAY'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_COLUMN_REFTABLE_ID'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_REFERENCE_REFTABLE'); 
- --AD_Menu 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_MENU_TRG DISABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADFORM_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADPROCESS_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADTASK_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADWINDOW_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADWORKFLOW_ADMENU'); 
- --AD_Treenode 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TREENODE DISABLE CONSTRAINT ADTREE_ADTREENODE'); 
- --AD_Element 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRG DISABLE'); 
- --AD_Val_Rule no necesita ni constraints ni triggers 
- --AD_Tab_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB_TRL DISABLE CONSTRAINT AD_TABTRL'); 
- --AD_Window_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_TRL DISABLE CONSTRAINT AD_WINDOWTRL'); 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRL_TRG DISABLE'); 
- --AD_Field_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD_TRL DISABLE CONSTRAINT AD_FIELDTRL'); 
- --AD_FieldGroup_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELDGROUP_TRL DISABLE CONSTRAINT ADFIELDGROUP_TRL'); 
- --AD_Ref_List_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST_TRL DISABLE CONSTRAINT AD_REFLISTTRL'); 
- --AD_Element_Trl 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRL_TRG DISABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_ELEMENT_TRL DISABLE CONSTRAINT ADELEMENT_ADELEMENTTRL'); 
- --AD_Menu_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU_TRL DISABLE CONSTRAINT AD_MENUTRL'); 
- 
- 
- 
- 
- --Insercion de valores, con traslacion de claves 
- --AD_Table 
- INSERT INTO AD_TABLE (AD_TABLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, 
- NAME, DESCRIPTION, HELP, TABLENAME, ISVIEW, ACCESSLEVEL, ENTITYTYPE, AD_WINDOW_ID, AD_VAL_RULE_ID, 
- LOADSEQ, ISSECURITYENABLED, ISDELETEABLE, ISHIGHVOLUME, IMPORTTABLE, ISCHANGELOG, REPLICATIONTYPE, 
- PO_WINDOW_ID, ISDEFAULTACCT) 
- SELECT AD_TABLE_ID+v_tableOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, DESCRIPTION, HELP, TABLENAME, ISVIEW, ACCESSLEVEL, ENTITYTYPE, CASE WHEN AD_WINDOW_ID>699999 
- THEN AD_WINDOW_ID+v_windowOffset ELSE AD_WINDOW_ID END, AD_VAL_RULE_ID+v_valruleOffset, 
- LOADSEQ, ISSECURITYENABLED, ISDELETEABLE, ISHIGHVOLUME, IMPORTTABLE, ISCHANGELOG, REPLICATIONTYPE, 
- CASE WHEN PO_WINDOW_ID>699999 THEN PO_WINDOW_ID+v_windowOffset ELSE PO_WINDOW_ID END, ISDEFAULTACCT 
- FROM TAD_AUX.AD_TABLE WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- 
- --AD_Column 
- INSERT INTO AD_COLUMN (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, 
- NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, 
- AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, 
- ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, 
- CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, 
- ISSYNCDATABASE, ISSESSIONATTR, ISSECONDARYKEY) 
- SELECT AD_COLUMN_ID+v_columnOffset, 0, 0, ISACTIVE, now(), now(), 0, 0, 
- NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID+v_tableOffset, 
- CASE WHEN AD_REFERENCE_ID>699999 THEN AD_REFERENCE_ID+v_referenceOffset ELSE AD_REFERENCE_ID END, 
- CASE WHEN AD_REFERENCE_VALUE_ID>699999 THEN AD_REFERENCE_VALUE_ID+v_referenceOffset ELSE AD_REFERENCE_VALUE_ID END, 
- CASE WHEN AD_VAL_RULE_ID>699999 THEN AD_VAL_RULE_ID+v_valruleOffset ELSE AD_VAL_RULE_ID END, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, 
- ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, 
- CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, CASE WHEN AD_ELEMENT_ID>699999 
- THEN AD_ELEMENT_ID+v_elementOffset ELSE AD_ELEMENT_ID END, AD_PROCESS_ID+v_processOffset, 
- ISSYNCDATABASE, ISSESSIONATTR, ISSECONDARYKEY 
- FROM TAD_AUX.AD_COLUMN WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- 
- 
- --ad_tab 
- INSERT INTO AD_TAB (AD_TAB_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
- UPDATEDBY, NAME, DESCRIPTION, HELP, AD_TABLE_ID, AD_WINDOW_ID, SEQNO, TABLEVEL, ISSINGLEROW, 
- ISINFOTAB, ISTRANSLATIONTAB, ISREADONLY, AD_COLUMN_ID, HASTREE, WHERECLAUSE, ORDERBYCLAUSE, 
- COMMITWARNING, AD_PROCESS_ID, PROCESSING, AD_IMAGE_ID, IMPORTFIELDS, AD_COLUMNSORTORDER_ID, 
- AD_COLUMNSORTYESNO_ID, ISSORTTAB, ENTITYTYPE, INCLUDED_TAB_ID, FILTERCLAUSE) 
- SELECT AD_TAB_ID+v_tabOffset, 0, 0, ISACTIVE, now(), 0, now(), 
- 0, NAME, DESCRIPTION, HELP, AD_TABLE_ID+v_tableOffset, CASE WHEN AD_WINDOW_ID>699999 
- THEN AD_WINDOW_ID+v_windowOffset ELSE AD_WINDOW_ID END, SEQNO, TABLEVEL, 
- ISSINGLEROW, ISINFOTAB, ISTRANSLATIONTAB, ISREADONLY, AD_COLUMN_ID+v_columnOffset, HASTREE, WHERECLAUSE, 
- ORDERBYCLAUSE, COMMITWARNING, AD_PROCESS_ID+v_processOffset, PROCESSING, AD_IMAGE_ID, IMPORTFIELDS, 
- AD_COLUMNSORTORDER_ID+v_columnOffset, AD_COLUMNSORTYESNO_ID+v_columnOffset, ISSORTTAB, ENTITYTYPE, 
- INCLUDED_TAB_ID+v_tabOffset, FILTERCLAUSE 
- FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
- 
- --ad_tab_trl 
- INSERT INTO AD_TAB_TRL (AD_TAB_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, COMMITWARNING, ISTRANSLATED) 
- SELECT AD_TAB_ID+v_tabOffset,AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 
- 0, NAME, DESCRIPTION, HELP, COMMITWARNING, ISTRANSLATED 
- FROM TAD_AUX.AD_TAB_TRL WHERE AD_TAB_ID IN ( 
-   SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
- 
- --ad_window 
- INSERT INTO AD_WINDOW (AD_WINDOW_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, WINDOWTYPE, ISSOTRX, ENTITYTYPE, PROCESSING, 
- AD_IMAGE_ID, AD_COLOR_ID, ISDEFAULT) 
- SELECT AD_WINDOW_ID+v_windowOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, DESCRIPTION, HELP, WINDOWTYPE, ISSOTRX, ENTITYTYPE, PROCESSING, AD_IMAGE_ID, 
- AD_COLOR_ID, ISDEFAULT 
- FROM TAD_AUX.AD_WINDOW WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
- 
- --ad_window_trl 
- INSERT INTO AD_WINDOW_TRL (AD_WINDOW_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
- SELECT AD_WINDOW_ID+v_windowOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, DESCRIPTION, HELP, ISTRANSLATED 
- FROM TAD_AUX.AD_WINDOW_TRL WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
- 
- --ad_window_access 
- INSERT INTO AD_WINDOW_ACCESS (AD_WINDOW_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, 
- ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE) 
- SELECT AD_WINDOW_ID+v_windowOffset, AD_ROLE_ID, 0, 0, 'Y', now(), 0, now(), 0, 'Y' 
- FROM TAD_AUX.AD_WINDOW_ACCESS WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
- 
- --ad_auxiliarinput no esta hecho porque no hay ninguno en produccion 
- 
- --ad_field 
- INSERT INTO AD_FIELD (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
- UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, 
- ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, 
- ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, SHOWINRELATION) 
- SELECT AD_FIELD_ID+v_fieldOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
- DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID+v_tabOffset, AD_COLUMN_ID+v_columnOffset, 
- AD_FIELDGROUP_ID+v_fieldgroupOffset, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, 
- SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, SHOWINRELATION 
- FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN ( 
-   SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
- 
- --ad_field_trl 
- INSERT INTO AD_FIELD_TRL (AD_FIELD_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
- SELECT AD_FIELD_ID+v_fieldOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
- DESCRIPTION, HELP, ISTRANSLATED 
- FROM TAD_AUX.AD_FIELD_TRL WHERE AD_FIELD_ID IN ( 
-   SELECT AD_FIELD_ID FROM TAD_AUX.AD_FIELD 
-   WHERE AD_TAB_ID IN ( 
-       SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo)); 
- 
- --ad_fieldgroup no hay en produccion 
- 
- --ad_fieldgroup_trl no hay en produccion 
- 
- --ad_element 
- INSERT INTO AD_ELEMENT (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, 
- PO_PRINTNAME, PO_DESCRIPTION, PO_HELP) 
- SELECT AD_ELEMENT_ID+v_elementOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, COLUMNNAME, 
- ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP 
- FROM TAD_AUX.AD_ELEMENT WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
- 
- --ad_element_trl 
- INSERT INTO AD_ELEMENT_TRL (AD_ELEMENT_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, 
- PO_DESCRIPTION, PO_HELP, ISTRANSLATED) 
- SELECT AD_ELEMENT_ID+v_elementOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP, ISTRANSLATED 
- FROM TAD_AUX.AD_ELEMENT_TRL WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
- 
- 
- --ad_reference 
- INSERT INTO AD_REFERENCE (AD_REFERENCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, VALIDATIONTYPE, VFORMAT, ENTITYTYPE) 
- SELECT AD_REFERENCE_ID+v_referenceOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, DESCRIPTION, 
- HELP, VALIDATIONTYPE, VFORMAT, ENTITYTYPE 
- FROM TAD_AUX.AD_REFERENCE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- 
- --ad_reference_trl 
- INSERT INTO AD_REFERENCE_TRL (AD_REFERENCE_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
- CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
- SELECT AD_REFERENCE_ID+v_referenceOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, DESCRIPTION, HELP, ISTRANSLATED 
- FROM TAD_AUX.AD_REFERENCE_TRL WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- 
- --ad_ref_table 
- INSERT INTO AD_REF_TABLE (AD_REFERENCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, AD_TABLE_ID, AD_KEY, AD_DISPLAY, ISVALUEDISPLAYED, WHERECLAUSE, ORDERBYCLAUSE, 
- ENTITYTYPE) 
- SELECT AD_REFERENCE_ID+v_referenceOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- AD_TABLE_ID+v_tableOffset, CASE WHEN AD_KEY>699999 THEN AD_KEY+v_columnOffset ELSE AD_KEY END, 
- CASE WHEN AD_DISPLAY>699999 THEN AD_DISPLAY+v_columnOffset ELSE AD_DISPLAY END, 
- ISVALUEDISPLAYED, WHERECLAUSE, ORDERBYCLAUSE, ENTITYTYPE 
- FROM TAD_AUX.AD_REF_TABLE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- 
- --ad_ref_list 
- INSERT INTO AD_REF_LIST (AD_REF_LIST_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, AD_REFERENCE_ID, VALIDFROM, VALIDTO, ENTITYTYPE) 
- SELECT AD_REF_LIST_ID+v_reflistOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, VALUE, NAME, 
- DESCRIPTION, AD_REFERENCE_ID+v_referenceOffset, VALIDFROM, VALIDTO, ENTITYTYPE 
- FROM TAD_AUX.AD_REF_LIST WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
- 
- --ad_ref_list_trl 
- INSERT INTO AD_REF_LIST_TRL (AD_REF_LIST_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
- CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, ISTRANSLATED) 
- SELECT AD_REF_LIST_ID+v_reflistOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- NAME, DESCRIPTION, ISTRANSLATED 
- FROM TAD_AUX.AD_REF_LIST_TRL WHERE AD_REF_LIST_ID IN ( 
-   SELECT AD_REF_LIST_ID FROM TAD_AUX.AD_REF_LIST 
-   WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo); 
- 
- 
- --ad_menu 
- INSERT INTO AD_MENU (AD_MENU_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
- NAME, UPDATEDBY, DESCRIPTION, ISSUMMARY, ISSOTRX, ISREADONLY, ACTION, AD_WINDOW_ID, AD_WORKFLOW_ID, 
- AD_TASK_ID, AD_PROCESS_ID, AD_FORM_ID, AD_WORKBENCH_ID, ENTITYTYPE) 
- SELECT AD_MENU_ID+v_menuOffset, 0, 0, ISACTIVE, now(), 0, now(), NAME, UPDATEDBY, DESCRIPTION, 
- ISSUMMARY, ISSOTRX, ISREADONLY, ACTION, AD_WINDOW_ID+v_windowOffset, AD_WORKFLOW_ID+v_workflowOffset, 
- AD_TASK_ID+v_taskOffset, AD_PROCESS_ID+v_processOffset, AD_FORM_ID+v_formOffset, AD_WORKBENCH_ID, 
- ENTITYTYPE 
- FROM TAD_AUX.AD_MENU WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
- 
- --ad_menu_trl 
- INSERT INTO AD_MENU_TRL (AD_MENU_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, ISTRANSLATED) 
- SELECT AD_MENU_ID+v_menuOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
- DESCRIPTION, ISTRANSLATED 
- FROM TAD_AUX.AD_MENU_TRL WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
- 
- --ad_treenode 
- INSERT INTO AD_TREENODE (AD_TREE_ID, NODE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
- CREATEDBY, UPDATED, UPDATEDBY, PARENT_ID, SEQNO) 
- SELECT AD_TREE_ID, NODE_ID+v_menuOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
- CASE WHEN PARENT_ID>699999 THEN PARENT_ID+v_menuOffset ELSE PARENT_ID END, SEQNO 
- FROM TAD_AUX.AD_TREENODE WHERE NODE_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
- 
- --ad_val_rule 
- INSERT INTO AD_VAL_RULE (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
- UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE) 
- SELECT AD_VAL_RULE_ID+v_valruleOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
- DESCRIPTION, TYPE, CODE, ENTITYTYPE 
- FROM TAD_AUX.AD_VAL_RULE WHERE AD_VAL_RULE_ID BETWEEN p_valruleIdFrom AND p_valruleIdTo; 
- 
- 
- 
---  por si falla lo del nulo!!!! 
--- (CASE WHEN INCLUDED_TAB_ID IS  NULL THEN  NULL ELSE  INCLUDED_TAB_ID+v_tabOffset END) 
- 
- 
- 
- --AD_Table. No inhabilitamos el trigger para que inserte valores en ad_sequence 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE ENABLE CONSTRAINT AD_WINDOW_TABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE ENABLE CONSTRAINT AD_VALRULE_TABLE'); 
- --AD_Column. No tiene trigger para insert 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT ADPROCESS_ADCOLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_ELEMENT_AD_COLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_REFERENCE_COLUMNDATATYPE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_REFERENCE_COLUMNVALUE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_TABLE_COLUMN'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_VALRULE_COLUMN'); 
- --AD_Tab. Inhabilitamos trigger para que no inserte en ad_tab_trl 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_TAB_TRG ENABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADCOLUMN_ADTABSORTORDER'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADCOLUMN_ADTABSORTYESNO'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADPROCESS_ADTAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADTAB_INCLUDED'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_COLUMN_AD_TAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_TABLE_TAB'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_WINDOW_TAB'); 
- --AD_Window. Constraints no necesita. Triggers si. Habra que insertar a mano en la window_access!!! 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRG ENABLE'); 
- --AD_Window_Access 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS ENABLE CONSTRAINT ADWINDOW_ADWINDOWACCESS'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS ENABLE CONSTRAINT ADROLE_ADWINDOWACCESS'); 
- --AD_Field 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELD_TRG ENABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT ADFIELDGROUP_ADFIELD'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT AD_COLUMN_FIELD'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT AD_TAB_FIELD'); 
- --AD_FieldGroup no necesita. Triggers si 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELDGROUP_TRG ENABLE'); 
- --AD_Reference no necesita. Triggers si 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REFERENCE_TRG ENABLE'); 
- --AD_Ref_List 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REF_LIST_TRG ENABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST ENABLE CONSTRAINT AD_REFERENCE_REFLIST'); 
- --AD_Ref_Table 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT ADD_TABLE_REFTABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_COLUMN_REFTABLE_DISPLAY'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_COLUMN_REFTABLE_ID'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_REFERENCE_REFTABLE'); 
- --AD_Menu 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_MENU_TRG ENABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADFORM_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADPROCESS_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADTASK_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADWINDOW_ADMENU'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADWORKFLOW_ADMENU'); 
- --AD_Treenode 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TREENODE ENABLE CONSTRAINT ADTREE_ADTREENODE'); 
- --AD_Element 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRG ENABLE'); 
- --AD_Tab_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB_TRL ENABLE CONSTRAINT AD_TABTRL'); 
- --AD_Window_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_TRL ENABLE CONSTRAINT AD_WINDOWTRL'); 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRL_TRG ENABLE'); 
- --AD_Field_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD_TRL ENABLE CONSTRAINT AD_FIELDTRL'); 
- --AD_FieldGroup_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELDGROUP_TRL ENABLE CONSTRAINT ADFIELDGROUP_TRL'); 
- --AD_Ref_List_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST_TRL ENABLE CONSTRAINT AD_REFLISTTRL'); 
- --AD_Element_Trl 
- EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRL_TRG ENABLE'); 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_ELEMENT_TRL ENABLE CONSTRAINT ADELEMENT_ADELEMENTTRL'); 
- --AD_Menu_Trl 
- EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU_TRL ENABLE CONSTRAINT AD_MENUTRL'); 
- 
- 
- --Se ejecuta el proceso AD_UPDATE_SEQUENCE 
- --AD_UPDATE_SEQUENCE(p_baseinstalation);  --mirar 
- 
- 
-END AD_Application_Import]]>
-</body>
-</function>
-</database>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/database/model/functions/AD_APPLICATION_IMPORT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -0,0 +1,554 @@
+<?xml version="1.0"?>
+  <database name="FUNCTION AD_APPLICATION_IMPORT">
+    <function name="AD_APPLICATION_IMPORT" type="NULL">
+      <parameter name="p_tableIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_tableIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_windowIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_windowIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_referenceIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_referenceIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_valruleIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_valruleIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_elementIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_elementIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_menuIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_menuIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_sequenceIdFrom" type="NUMERIC" mode="in"/>
+      <parameter name="p_sequenceIdTo" type="NUMERIC" mode="in"/>
+      <parameter name="p_baseinstalation" type="CHAR" mode="in"/>
+      <body>
+/************************************************************************* 
+* The contents of this file are subject to the Openbravo  Public  License 
+* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License 
+* Version 1.1  with a permitted attribution clause; you may not  use this 
+* file except in compliance with the License. You  may  obtain  a copy of 
+* the License at http://www.openbravo.com/legal/license.html 
+* Software distributed under the License  is  distributed  on  an "AS IS" 
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 
+* License for the specific  language  governing  rights  and  limitations 
+* under the License. 
+* The Original Code is Openbravo ERP. 
+* The Initial Developer of the Original Code is Openbravo SL 
+* All portions are Copyright (C) 2001-2006 Openbravo SL 
+* All Rights Reserved. 
+* Contributor(s):  ______________________________________. 
+************************************************************************/ 
+ v_minId     NUMBER(10); 
+-- v_maxId     NUMBER(10); 
+ v_tableOffset   NUMBER(10); 
+ v_windowOffset   NUMBER(10); 
+ v_columnOffset   NUMBER(10); 
+ v_tabOffset    NUMBER(10); 
+ v_auxiliarinputOffset NUMBER(10); 
+ v_fieldOffset   NUMBER(10); 
+ v_fieldgroupOffset  NUMBER(10); 
+ v_referenceOffset  NUMBER(10); 
+ v_reftableOffset  NUMBER(10); --NOT needed because it lacks of an ID 
+ v_reflistOffset   NUMBER(10); 
+ v_valruleOffset   NUMBER(10); 
+ v_elementOffset   NUMBER(10); 
+ v_formOffset   NUMBER(10); 
+ v_messageOffset   NUMBER(10); 
+ v_menuOffset   NUMBER(10); 
+ v_reportviewOffset  NUMBER(10); 
+ v_processOffset   NUMBER(10); 
+ v_processparaOffset  NUMBER(10); 
+ v_sequenceOffset  NUMBER(10); 
+ v_taskOffset   NUMBER(10); 
+ v_treeOffset   NUMBER(10); 
+ v_workflowOffset  NUMBER(10); 
+ v_wfnodeOffset   NUMBER(10); 
+ v_wfnodenextOffset  NUMBER(10); 
+ v_nextNo    NUMBER(10); 
+BEGIN 
+--AD_Table 
+ --Next sequence number (blocking for update) 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Table' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ --Mininum and maximum values of ID in TAX_AUX 
+ SELECT MIN(AD_TABLE_ID)--, MAX(AD_TABLE_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_TABLE WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ v_tableOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Table' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; */ 
+ 
+ 
+--AD_Column 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Column' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_COLUMN_ID)--, MAX(AD_COLUMN_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_COLUMN WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ v_columnOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Column' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; */ 
+ 
+ 
+--AD_Tab 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Tab' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_TAB_ID)--, MAX(AD_TAB_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ v_tabOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Tab' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Window 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Window' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_WINDOW_ID)--, MAX(AD_WINDOW_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_WINDOW WHERE AD_WINDOW_ID IN 
+   (SELECT AD_WINDOW_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo) 
+ AND AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
+ v_windowOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Window' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Field 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Field' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_FIELD_ID)--, MAX(AD_FIELD_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN 
+   (SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
+ v_fieldOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Field' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_FieldGroup 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_FieldGroup' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_FIELDGROUP_ID)--, MAX(AD_FIELDGROUP_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_FIELDGROUP WHERE AD_FIELDGROUP_ID IN 
+   (SELECT AD_FIELDGROUP_ID FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN 
+      (SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo)); 
+ v_fieldgroupOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_FieldGroup' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Reference 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Reference' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_REFERENCE_ID)--, MAX(AD_REFERENCE_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_REFERENCE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ v_referenceOffset:=v_nextNo - v_minId; 
+ /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Reference' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Ref_List 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Ref_List' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_REF_LIST_ID)--, MAX(AD_REF_LIST_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_REF_LIST WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ v_reflistOffset:=v_nextNo - v_minId; 
+ /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Ref_List' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Val_Rule 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Val_Rule' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_VAL_RULE_ID)--, MAX(AD_VAL_RULE_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_VAL_RULE WHERE AD_VAL_RULE_ID BETWEEN p_valruleIdFrom AND p_valruleIdTo; 
+ v_valruleOffset:=v_nextNo - v_minId; 
+ /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Val_Rule' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Element 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Element' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_ELEMENT_ID)--, MAX(AD_ELEMENT_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_ELEMENT WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
+ v_elementOffset:=v_nextNo - v_minId; 
+ /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Element' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Menu 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Menu' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_MENU_ID)--, MAX(AD_MENU_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_MENU WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
+ v_menuOffset:=v_nextNo - v_minId; 
+ /*UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Menu' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';*/ 
+--AD_Sequence 
+ SELECT CurrentNextSys INTO v_nextNo FROM AD_Sequence 
+ WHERE Name='AD_Sequence' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y' 
+ FOR UPDATE OF CurrentNextSys; 
+ SELECT MIN(AD_SEQUENCE_ID)--, MAX(AD_SEQUENCE_ID) 
+ INTO v_minId--, v_maxId 
+ FROM TAD_AUX.AD_SEQUENCE WHERE AD_SEQUENCE_ID BETWEEN p_sequenceIdFrom AND p_sequenceIdTo; 
+ v_sequenceOffset:=v_nextNo - v_minId; 
+/* UPDATE AD_SEQUENCE SET CurrentNextSys=CurrentNextSys + (v_maxId-v_minId) + INCREMENTNO 
+ WHERE  Name='AD_Sequence' AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y'; 
+*/ 
+ 
+ 
+--AD_REF_TABLE doesn't need a translation because it lacks of an ID 
+--Por la misma razon, tampoco necesitan traslacion las tablas de traduccion (..._TRL) 
+ 
+--Comienzo de carga de datos. 
+--Primero, inhabilitar constraints de integridad referencial (existen referencias circulares...) 
+ --AD_Table. No inhabilitamos el trigger para que inserte valores en ad_sequence 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE DISABLE CONSTRAINT AD_WINDOW_TABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE DISABLE CONSTRAINT AD_VALRULE_TABLE'); 
+ --AD_Column. No tiene trigger para insert 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT ADPROCESS_ADCOLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_ELEMENT_AD_COLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_REFERENCE_COLUMNDATATYPE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_REFERENCE_COLUMNVALUE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_TABLE_COLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN DISABLE CONSTRAINT AD_VALRULE_COLUMN'); 
+ --AD_Tab. Inhabilitamos trigger para que no inserte en ad_tab_trl 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_TAB_TRG DISABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADCOLUMN_ADTABSORTORDER'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADCOLUMN_ADTABSORTYESNO'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADPROCESS_ADTAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT ADTAB_INCLUDED'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_COLUMN_AD_TAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_TABLE_TAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB DISABLE CONSTRAINT AD_WINDOW_TAB'); 
+ --AD_Window. Constraints no necesita. Triggers si. Habra que insertar a mano en la window_access!!! 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRG DISABLE'); 
+ --AD_Window_Access 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS DISABLE CONSTRAINT ADWINDOW_ADWINDOWACCESS'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS DISABLE CONSTRAINT ADROLE_ADWINDOWACCESS'); 
+ --AD_Field 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELD_TRG DISABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT ADFIELDGROUP_ADFIELD'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT AD_COLUMN_FIELD'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD DISABLE CONSTRAINT AD_TAB_FIELD'); 
+ --AD_FieldGroup no necesita. Triggers si 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELDGROUP_TRG DISABLE'); 
+ --AD_Reference no necesita. Triggers si 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REFERENCE_TRG DISABLE'); 
+ --AD_Ref_List 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REF_LIST_TRG DISABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST DISABLE CONSTRAINT AD_REFERENCE_REFLIST'); 
+ --AD_Ref_Table 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT ADD_TABLE_REFTABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_COLUMN_REFTABLE_DISPLAY'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_COLUMN_REFTABLE_ID'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE DISABLE CONSTRAINT AD_REFERENCE_REFTABLE'); 
+ --AD_Menu 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_MENU_TRG DISABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADFORM_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADPROCESS_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADTASK_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADWINDOW_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU DISABLE CONSTRAINT ADWORKFLOW_ADMENU'); 
+ --AD_Treenode 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TREENODE DISABLE CONSTRAINT ADTREE_ADTREENODE'); 
+ --AD_Element 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRG DISABLE'); 
+ --AD_Val_Rule no necesita ni constraints ni triggers 
+ --AD_Tab_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB_TRL DISABLE CONSTRAINT AD_TABTRL'); 
+ --AD_Window_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_TRL DISABLE CONSTRAINT AD_WINDOWTRL'); 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRL_TRG DISABLE'); 
+ --AD_Field_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD_TRL DISABLE CONSTRAINT AD_FIELDTRL'); 
+ --AD_FieldGroup_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELDGROUP_TRL DISABLE CONSTRAINT ADFIELDGROUP_TRL'); 
+ --AD_Ref_List_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST_TRL DISABLE CONSTRAINT AD_REFLISTTRL'); 
+ --AD_Element_Trl 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRL_TRG DISABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_ELEMENT_TRL DISABLE CONSTRAINT ADELEMENT_ADELEMENTTRL'); 
+ --AD_Menu_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU_TRL DISABLE CONSTRAINT AD_MENUTRL'); 
+ 
+ 
+ 
+ 
+ --Insercion de valores, con traslacion de claves 
+ --AD_Table 
+ INSERT INTO AD_TABLE (AD_TABLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, 
+ NAME, DESCRIPTION, HELP, TABLENAME, ISVIEW, ACCESSLEVEL, ENTITYTYPE, AD_WINDOW_ID, AD_VAL_RULE_ID, 
+ LOADSEQ, ISSECURITYENABLED, ISDELETEABLE, ISHIGHVOLUME, IMPORTTABLE, ISCHANGELOG, REPLICATIONTYPE, 
+ PO_WINDOW_ID, ISDEFAULTACCT) 
+ SELECT AD_TABLE_ID+v_tableOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, DESCRIPTION, HELP, TABLENAME, ISVIEW, ACCESSLEVEL, ENTITYTYPE, CASE WHEN AD_WINDOW_ID&gt;699999 
+ THEN AD_WINDOW_ID+v_windowOffset ELSE AD_WINDOW_ID END, AD_VAL_RULE_ID+v_valruleOffset, 
+ LOADSEQ, ISSECURITYENABLED, ISDELETEABLE, ISHIGHVOLUME, IMPORTTABLE, ISCHANGELOG, REPLICATIONTYPE, 
+ CASE WHEN PO_WINDOW_ID&gt;699999 THEN PO_WINDOW_ID+v_windowOffset ELSE PO_WINDOW_ID END, ISDEFAULTACCT 
+ FROM TAD_AUX.AD_TABLE WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ 
+ --AD_Column 
+ INSERT INTO AD_COLUMN (AD_COLUMN_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, UPDATED, CREATEDBY, UPDATEDBY, 
+ NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID, AD_REFERENCE_ID, 
+ AD_REFERENCE_VALUE_ID, AD_VAL_RULE_ID, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, 
+ ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, 
+ CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, AD_ELEMENT_ID, AD_PROCESS_ID, 
+ ISSYNCDATABASE, ISSESSIONATTR, ISSECONDARYKEY) 
+ SELECT AD_COLUMN_ID+v_columnOffset, 0, 0, ISACTIVE, now(), now(), 0, 0, 
+ NAME, DESCRIPTION, HELP, VERSION, ENTITYTYPE, COLUMNNAME, AD_TABLE_ID+v_tableOffset, 
+ CASE WHEN AD_REFERENCE_ID&gt;699999 THEN AD_REFERENCE_ID+v_referenceOffset ELSE AD_REFERENCE_ID END, 
+ CASE WHEN AD_REFERENCE_VALUE_ID&gt;699999 THEN AD_REFERENCE_VALUE_ID+v_referenceOffset ELSE AD_REFERENCE_VALUE_ID END, 
+ CASE WHEN AD_VAL_RULE_ID&gt;699999 THEN AD_VAL_RULE_ID+v_valruleOffset ELSE AD_VAL_RULE_ID END, FIELDLENGTH, DEFAULTVALUE, ISKEY, ISPARENT, 
+ ISMANDATORY, ISUPDATEABLE, READONLYLOGIC, ISIDENTIFIER, SEQNO, ISTRANSLATED, ISENCRYPTED, 
+ CALLOUT, VFORMAT, VALUEMIN, VALUEMAX, ISSELECTIONCOLUMN, CASE WHEN AD_ELEMENT_ID&gt;699999 
+ THEN AD_ELEMENT_ID+v_elementOffset ELSE AD_ELEMENT_ID END, AD_PROCESS_ID+v_processOffset, 
+ ISSYNCDATABASE, ISSESSIONATTR, ISSECONDARYKEY 
+ FROM TAD_AUX.AD_COLUMN WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ 
+ 
+ --ad_tab 
+ INSERT INTO AD_TAB (AD_TAB_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
+ UPDATEDBY, NAME, DESCRIPTION, HELP, AD_TABLE_ID, AD_WINDOW_ID, SEQNO, TABLEVEL, ISSINGLEROW, 
+ ISINFOTAB, ISTRANSLATIONTAB, ISREADONLY, AD_COLUMN_ID, HASTREE, WHERECLAUSE, ORDERBYCLAUSE, 
+ COMMITWARNING, AD_PROCESS_ID, PROCESSING, AD_IMAGE_ID, IMPORTFIELDS, AD_COLUMNSORTORDER_ID, 
+ AD_COLUMNSORTYESNO_ID, ISSORTTAB, ENTITYTYPE, INCLUDED_TAB_ID, FILTERCLAUSE) 
+ SELECT AD_TAB_ID+v_tabOffset, 0, 0, ISACTIVE, now(), 0, now(), 
+ 0, NAME, DESCRIPTION, HELP, AD_TABLE_ID+v_tableOffset, CASE WHEN AD_WINDOW_ID&gt;699999 
+ THEN AD_WINDOW_ID+v_windowOffset ELSE AD_WINDOW_ID END, SEQNO, TABLEVEL, 
+ ISSINGLEROW, ISINFOTAB, ISTRANSLATIONTAB, ISREADONLY, AD_COLUMN_ID+v_columnOffset, HASTREE, WHERECLAUSE, 
+ ORDERBYCLAUSE, COMMITWARNING, AD_PROCESS_ID+v_processOffset, PROCESSING, AD_IMAGE_ID, IMPORTFIELDS, 
+ AD_COLUMNSORTORDER_ID+v_columnOffset, AD_COLUMNSORTYESNO_ID+v_columnOffset, ISSORTTAB, ENTITYTYPE, 
+ INCLUDED_TAB_ID+v_tabOffset, FILTERCLAUSE 
+ FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo; 
+ 
+ --ad_tab_trl 
+ INSERT INTO AD_TAB_TRL (AD_TAB_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, COMMITWARNING, ISTRANSLATED) 
+ SELECT AD_TAB_ID+v_tabOffset,AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 
+ 0, NAME, DESCRIPTION, HELP, COMMITWARNING, ISTRANSLATED 
+ FROM TAD_AUX.AD_TAB_TRL WHERE AD_TAB_ID IN ( 
+   SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
+ 
+ --ad_window 
+ INSERT INTO AD_WINDOW (AD_WINDOW_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, WINDOWTYPE, ISSOTRX, ENTITYTYPE, PROCESSING, 
+ AD_IMAGE_ID, AD_COLOR_ID, ISDEFAULT) 
+ SELECT AD_WINDOW_ID+v_windowOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, DESCRIPTION, HELP, WINDOWTYPE, ISSOTRX, ENTITYTYPE, PROCESSING, AD_IMAGE_ID, 
+ AD_COLOR_ID, ISDEFAULT 
+ FROM TAD_AUX.AD_WINDOW WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
+ 
+ --ad_window_trl 
+ INSERT INTO AD_WINDOW_TRL (AD_WINDOW_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
+ SELECT AD_WINDOW_ID+v_windowOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, DESCRIPTION, HELP, ISTRANSLATED 
+ FROM TAD_AUX.AD_WINDOW_TRL WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
+ 
+ --ad_window_access 
+ INSERT INTO AD_WINDOW_ACCESS (AD_WINDOW_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, 
+ ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE) 
+ SELECT AD_WINDOW_ID+v_windowOffset, AD_ROLE_ID, 0, 0, 'Y', now(), 0, now(), 0, 'Y' 
+ FROM TAD_AUX.AD_WINDOW_ACCESS WHERE AD_WINDOW_ID BETWEEN p_windowIdFrom AND p_windowIdTo; 
+ 
+ --ad_auxiliarinput no esta hecho porque no hay ninguno en produccion 
+ 
+ --ad_field 
+ INSERT INTO AD_FIELD (AD_FIELD_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
+ UPDATEDBY, NAME, DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID, AD_COLUMN_ID, AD_FIELDGROUP_ID, 
+ ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, SEQNO, SORTNO, ISSAMELINE, ISHEADING, 
+ ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, SHOWINRELATION) 
+ SELECT AD_FIELD_ID+v_fieldOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
+ DESCRIPTION, HELP, ISCENTRALLYMAINTAINED, AD_TAB_ID+v_tabOffset, AD_COLUMN_ID+v_columnOffset, 
+ AD_FIELDGROUP_ID+v_fieldgroupOffset, ISDISPLAYED, DISPLAYLOGIC, DISPLAYLENGTH, ISREADONLY, 
+ SEQNO, SORTNO, ISSAMELINE, ISHEADING, ISFIELDONLY, ISENCRYPTED, ENTITYTYPE, SHOWINRELATION 
+ FROM TAD_AUX.AD_FIELD WHERE AD_TAB_ID IN ( 
+   SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo); 
+ 
+ --ad_field_trl 
+ INSERT INTO AD_FIELD_TRL (AD_FIELD_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
+ SELECT AD_FIELD_ID+v_fieldOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
+ DESCRIPTION, HELP, ISTRANSLATED 
+ FROM TAD_AUX.AD_FIELD_TRL WHERE AD_FIELD_ID IN ( 
+   SELECT AD_FIELD_ID FROM TAD_AUX.AD_FIELD 
+   WHERE AD_TAB_ID IN ( 
+       SELECT AD_TAB_ID FROM TAD_AUX.AD_TAB WHERE AD_TABLE_ID BETWEEN p_tableIdFrom AND p_tableIdTo)); 
+ 
+ --ad_fieldgroup no hay en produccion 
+ 
+ --ad_fieldgroup_trl no hay en produccion 
+ 
+ --ad_element 
+ INSERT INTO AD_ELEMENT (AD_ELEMENT_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, COLUMNNAME, ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, 
+ PO_PRINTNAME, PO_DESCRIPTION, PO_HELP) 
+ SELECT AD_ELEMENT_ID+v_elementOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, COLUMNNAME, 
+ ENTITYTYPE, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP 
+ FROM TAD_AUX.AD_ELEMENT WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
+ 
+ --ad_element_trl 
+ INSERT INTO AD_ELEMENT_TRL (AD_ELEMENT_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, 
+ PO_DESCRIPTION, PO_HELP, ISTRANSLATED) 
+ SELECT AD_ELEMENT_ID+v_elementOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, PRINTNAME, DESCRIPTION, HELP, PO_NAME, PO_PRINTNAME, PO_DESCRIPTION, PO_HELP, ISTRANSLATED 
+ FROM TAD_AUX.AD_ELEMENT_TRL WHERE AD_ELEMENT_ID BETWEEN p_elementIdFrom AND p_elementIdTo; 
+ 
+ 
+ --ad_reference 
+ INSERT INTO AD_REFERENCE (AD_REFERENCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, VALIDATIONTYPE, VFORMAT, ENTITYTYPE) 
+ SELECT AD_REFERENCE_ID+v_referenceOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, DESCRIPTION, 
+ HELP, VALIDATIONTYPE, VFORMAT, ENTITYTYPE 
+ FROM TAD_AUX.AD_REFERENCE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ 
+ --ad_reference_trl 
+ INSERT INTO AD_REFERENCE_TRL (AD_REFERENCE_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
+ CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, HELP, ISTRANSLATED) 
+ SELECT AD_REFERENCE_ID+v_referenceOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, DESCRIPTION, HELP, ISTRANSLATED 
+ FROM TAD_AUX.AD_REFERENCE_TRL WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ 
+ --ad_ref_table 
+ INSERT INTO AD_REF_TABLE (AD_REFERENCE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, AD_TABLE_ID, AD_KEY, AD_DISPLAY, ISVALUEDISPLAYED, WHERECLAUSE, ORDERBYCLAUSE, 
+ ENTITYTYPE) 
+ SELECT AD_REFERENCE_ID+v_referenceOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ AD_TABLE_ID+v_tableOffset, CASE WHEN AD_KEY&gt;699999 THEN AD_KEY+v_columnOffset ELSE AD_KEY END, 
+ CASE WHEN AD_DISPLAY&gt;699999 THEN AD_DISPLAY+v_columnOffset ELSE AD_DISPLAY END, 
+ ISVALUEDISPLAYED, WHERECLAUSE, ORDERBYCLAUSE, ENTITYTYPE 
+ FROM TAD_AUX.AD_REF_TABLE WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ 
+ --ad_ref_list 
+ INSERT INTO AD_REF_LIST (AD_REF_LIST_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, VALUE, NAME, DESCRIPTION, AD_REFERENCE_ID, VALIDFROM, VALIDTO, ENTITYTYPE) 
+ SELECT AD_REF_LIST_ID+v_reflistOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, VALUE, NAME, 
+ DESCRIPTION, AD_REFERENCE_ID+v_referenceOffset, VALIDFROM, VALIDTO, ENTITYTYPE 
+ FROM TAD_AUX.AD_REF_LIST WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo; 
+ 
+ --ad_ref_list_trl 
+ INSERT INTO AD_REF_LIST_TRL (AD_REF_LIST_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, 
+ CREATED, CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, ISTRANSLATED) 
+ SELECT AD_REF_LIST_ID+v_reflistOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ NAME, DESCRIPTION, ISTRANSLATED 
+ FROM TAD_AUX.AD_REF_LIST_TRL WHERE AD_REF_LIST_ID IN ( 
+   SELECT AD_REF_LIST_ID FROM TAD_AUX.AD_REF_LIST 
+   WHERE AD_REFERENCE_ID BETWEEN p_referenceIdFrom AND p_referenceIdTo); 
+ 
+ 
+ --ad_menu 
+ INSERT INTO AD_MENU (AD_MENU_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, 
+ NAME, UPDATEDBY, DESCRIPTION, ISSUMMARY, ISSOTRX, ISREADONLY, ACTION, AD_WINDOW_ID, AD_WORKFLOW_ID, 
+ AD_TASK_ID, AD_PROCESS_ID, AD_FORM_ID, AD_WORKBENCH_ID, ENTITYTYPE) 
+ SELECT AD_MENU_ID+v_menuOffset, 0, 0, ISACTIVE, now(), 0, now(), NAME, UPDATEDBY, DESCRIPTION, 
+ ISSUMMARY, ISSOTRX, ISREADONLY, ACTION, AD_WINDOW_ID+v_windowOffset, AD_WORKFLOW_ID+v_workflowOffset, 
+ AD_TASK_ID+v_taskOffset, AD_PROCESS_ID+v_processOffset, AD_FORM_ID+v_formOffset, AD_WORKBENCH_ID, 
+ ENTITYTYPE 
+ FROM TAD_AUX.AD_MENU WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
+ 
+ --ad_menu_trl 
+ INSERT INTO AD_MENU_TRL (AD_MENU_ID, AD_LANGUAGE, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, NAME, DESCRIPTION, ISTRANSLATED) 
+ SELECT AD_MENU_ID+v_menuOffset, AD_LANGUAGE, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
+ DESCRIPTION, ISTRANSLATED 
+ FROM TAD_AUX.AD_MENU_TRL WHERE AD_MENU_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
+ 
+ --ad_treenode 
+ INSERT INTO AD_TREENODE (AD_TREE_ID, NODE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, 
+ CREATEDBY, UPDATED, UPDATEDBY, PARENT_ID, SEQNO) 
+ SELECT AD_TREE_ID, NODE_ID+v_menuOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, 
+ CASE WHEN PARENT_ID&gt;699999 THEN PARENT_ID+v_menuOffset ELSE PARENT_ID END, SEQNO 
+ FROM TAD_AUX.AD_TREENODE WHERE NODE_ID BETWEEN p_menuIdFrom AND p_menuIdTo; 
+ 
+ --ad_val_rule 
+ INSERT INTO AD_VAL_RULE (AD_VAL_RULE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, 
+ UPDATED, UPDATEDBY, NAME, DESCRIPTION, TYPE, CODE, ENTITYTYPE) 
+ SELECT AD_VAL_RULE_ID+v_valruleOffset, 0, 0, ISACTIVE, now(), 0, now(), 0, NAME, 
+ DESCRIPTION, TYPE, CODE, ENTITYTYPE 
+ FROM TAD_AUX.AD_VAL_RULE WHERE AD_VAL_RULE_ID BETWEEN p_valruleIdFrom AND p_valruleIdTo; 
+ 
+ 
+ 
+--  por si falla lo del nulo!!!! 
+-- (CASE WHEN INCLUDED_TAB_ID IS  NULL THEN  NULL ELSE  INCLUDED_TAB_ID+v_tabOffset END) 
+ 
+ 
+ 
+ --AD_Table. No inhabilitamos el trigger para que inserte valores en ad_sequence 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE ENABLE CONSTRAINT AD_WINDOW_TABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TABLE ENABLE CONSTRAINT AD_VALRULE_TABLE'); 
+ --AD_Column. No tiene trigger para insert 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT ADPROCESS_ADCOLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_ELEMENT_AD_COLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_REFERENCE_COLUMNDATATYPE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_REFERENCE_COLUMNVALUE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_TABLE_COLUMN'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_COLUMN ENABLE CONSTRAINT AD_VALRULE_COLUMN'); 
+ --AD_Tab. Inhabilitamos trigger para que no inserte en ad_tab_trl 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_TAB_TRG ENABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADCOLUMN_ADTABSORTORDER'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADCOLUMN_ADTABSORTYESNO'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADPROCESS_ADTAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT ADTAB_INCLUDED'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_COLUMN_AD_TAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_TABLE_TAB'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB ENABLE CONSTRAINT AD_WINDOW_TAB'); 
+ --AD_Window. Constraints no necesita. Triggers si. Habra que insertar a mano en la window_access!!! 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRG ENABLE'); 
+ --AD_Window_Access 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS ENABLE CONSTRAINT ADWINDOW_ADWINDOWACCESS'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_ACCESS ENABLE CONSTRAINT ADROLE_ADWINDOWACCESS'); 
+ --AD_Field 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELD_TRG ENABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT ADFIELDGROUP_ADFIELD'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT AD_COLUMN_FIELD'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD ENABLE CONSTRAINT AD_TAB_FIELD'); 
+ --AD_FieldGroup no necesita. Triggers si 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_FIELDGROUP_TRG ENABLE'); 
+ --AD_Reference no necesita. Triggers si 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REFERENCE_TRG ENABLE'); 
+ --AD_Ref_List 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_REF_LIST_TRG ENABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST ENABLE CONSTRAINT AD_REFERENCE_REFLIST'); 
+ --AD_Ref_Table 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT ADD_TABLE_REFTABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_COLUMN_REFTABLE_DISPLAY'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_COLUMN_REFTABLE_ID'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_TABLE ENABLE CONSTRAINT AD_REFERENCE_REFTABLE'); 
+ --AD_Menu 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_MENU_TRG ENABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADFORM_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADPROCESS_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADTASK_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADWINDOW_ADMENU'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU ENABLE CONSTRAINT ADWORKFLOW_ADMENU'); 
+ --AD_Treenode 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TREENODE ENABLE CONSTRAINT ADTREE_ADTREENODE'); 
+ --AD_Element 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRG ENABLE'); 
+ --AD_Tab_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_TAB_TRL ENABLE CONSTRAINT AD_TABTRL'); 
+ --AD_Window_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_WINDOW_TRL ENABLE CONSTRAINT AD_WINDOWTRL'); 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_WINDOW_TRL_TRG ENABLE'); 
+ --AD_Field_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELD_TRL ENABLE CONSTRAINT AD_FIELDTRL'); 
+ --AD_FieldGroup_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_FIELDGROUP_TRL ENABLE CONSTRAINT ADFIELDGROUP_TRL'); 
+ --AD_Ref_List_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_REF_LIST_TRL ENABLE CONSTRAINT AD_REFLISTTRL'); 
+ --AD_Element_Trl 
+ EXECUTE IMMEDIATE ('ALTER TRIGGER AD_ELEMENT_TRL_TRG ENABLE'); 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_ELEMENT_TRL ENABLE CONSTRAINT ADELEMENT_ADELEMENTTRL'); 
+ --AD_Menu_Trl 
+ EXECUTE IMMEDIATE ('ALTER TABLE AD_MENU_TRL ENABLE CONSTRAINT AD_MENUTRL'); 
+ 
+ 
+ --Se ejecuta el proceso AD_UPDATE_SEQUENCE 
+ --AD_UPDATE_SEQUENCE(p_baseinstalation);  --mirar 
+ 
+ 
+END AD_Application_Import
+</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_FORMAT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_FORMAT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_FORMAT">
-<function name="AD_COLUMN_FORMAT" type="VARCHAR">
-<parameter name="p_ColumnName" type="VARCHAR" mode="in"/>
-<parameter name="p_Reference_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_IsData" type="CHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COLUMN_FORMAT">
+    <function name="AD_COLUMN_FORMAT" type="VARCHAR">
+      <parameter name="p_ColumnName" type="VARCHAR" mode="in"/>
+      <parameter name="p_Reference_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_IsData" type="CHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -45,6 +45,6 @@
 EXCEPTION
   WHEN OTHERS THEN
     RETURN v_Column;
-END AD_COLUMN_FORMAT]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_COLUMN_FORMAT</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_IDENTIFIER.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_IDENTIFIER.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_IDENTIFIER">
-<function name="AD_COLUMN_IDENTIFIER" type="VARCHAR">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<parameter name="p_Record_ID" type="VARCHAR" mode="in"/>
-<parameter name="p_Language" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COLUMN_IDENTIFIER">
+    <function name="AD_COLUMN_IDENTIFIER" type="VARCHAR">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <parameter name="p_Record_ID" type="VARCHAR" mode="in"/>
+      <parameter name="p_Language" type="VARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -32,11 +32,11 @@
   /*  IF (p_Language=NULL OR p_Language='' ) THEN
   v_Display:='**';
   END IF;*/
---  << END_PROCESS >>
+--  &lt;&lt; END_PROCESS &gt;&gt;
   RETURN v_Display;
 EXCEPTION
 WHEN OTHERS THEN
   RETURN '**';
-END AD_COLUMN_IDENTIFIER ]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_COLUMN_IDENTIFIER </body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_IDENTIFIER_REF_SQL">
-<function name="AD_COLUMN_IDENTIFIER_REF_SQL" type="VARCHAR">
-<parameter name="p_TableRef" type="VARCHAR" mode="in"/>
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<parameter name="p_ColumnName" type="VARCHAR" mode="in"/>
-<parameter name="p_Reference_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_Reference_Value_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COLUMN_IDENTIFIER_REF_SQL">
+    <function name="AD_COLUMN_IDENTIFIER_REF_SQL" type="VARCHAR">
+      <parameter name="p_TableRef" type="VARCHAR" mode="in"/>
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <parameter name="p_ColumnName" type="VARCHAR" mode="in"/>
+      <parameter name="p_Reference_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_Reference_Value_ID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -114,7 +114,7 @@
             AND(c.ISKEY='Y'
             OR c.ISSECONDARYKEY='Y')
             AND c.ISPARENT='Y'
-            AND UPPER(c.COLUMNNAME) <> 'AD_LANGUAGE';
+            AND UPPER(c.COLUMNNAME) &lt;&gt; 'AD_LANGUAGE';
           v_SQL:='(SELECT COALESCE(TO_CHAR(MAX(' || p_TableRef || 'T.' || v_NewColumnName || ')), TO_CHAR(' || p_TableRef || '.' || p_ColumnName || ')) FROM ' || v_NewTableName || ' ' || p_TableRef || 'T WHERE '|| p_TableRef||'T.' || v_FieldValue || '='|| p_TableRef||'.'|| v_FieldValue || ' AND ' || p_TableRef || 'T.AD_LANGUAGE=L.AD_LANGUAGE) ';
         END IF;
       END IF;
@@ -172,11 +172,11 @@
       END IF; --END_PROCESS
     END;
   END IF;
-  --<<END_PROCESS>>
+  --&lt;&lt;END_PROCESS&gt;&gt;
   RETURN v_SQL;
   /*EXCEPTION
   WHEN OTHERS THEN
   RETURN '**'; */
-END AD_COLUMN_IDENTIFIER_REF_SQL]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_COLUMN_IDENTIFIER_REF_SQL</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_IDENTIFIER_SQL">
-<function name="AD_COLUMN_IDENTIFIER_SQL" type="VARCHAR">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COLUMN_IDENTIFIER_SQL">
+    <function name="AD_COLUMN_IDENTIFIER_SQL" type="VARCHAR">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -68,11 +68,11 @@
     ELSE
       v_SQL:='**No key found';
     END IF;
---    << END_PROCESS >>
+--    &lt;&lt; END_PROCESS &gt;&gt;
     RETURN v_SQL;
 EXCEPTION
   WHEN OTHERS THEN
     RETURN '**';
-END AD_COLUMN_IDENTIFIER_SQL]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_COLUMN_IDENTIFIER_SQL</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_IDENTIFIER_STD.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_IDENTIFIER_STD.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_IDENTIFIER_STD">
-<function name="AD_COLUMN_IDENTIFIER_STD" type="VARCHAR">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<parameter name="p_Record_ID" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COLUMN_IDENTIFIER_STD">
+    <function name="AD_COLUMN_IDENTIFIER_STD" type="VARCHAR">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <parameter name="p_Record_ID" type="VARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -33,6 +33,6 @@
 EXCEPTION
 WHEN OTHERS THEN
   RETURN '**';
-END AD_COLUMN_IDENTIFIER_STD]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_COLUMN_IDENTIFIER_STD</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_COLUMN_SYNC.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COLUMN_SYNC.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COLUMN_SYNC">
-<function name="AD_COLUMN_SYNC">
-        <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-        <body><![CDATA[                                
+  <database name="FUNCTION AD_COLUMN_SYNC">
+    <function name="AD_COLUMN_SYNC" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>                                
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -12,7 +12,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -140,7 +140,7 @@
      v_Message:='DisplayType Not Supported';
    END IF;
    -- Default (literal)
-   IF(v_DefaultValue IS NOT NULL AND LENGTH(v_DefaultValue)<>0) THEN
+   IF(v_DefaultValue IS NOT NULL AND LENGTH(v_DefaultValue)&lt;&gt;0) THEN
      IF(v_AD_Reference_ID IN(10, 14, 17, 20, 28)) THEN
        v_Cmd:=v_Cmd || ' DEFAULT (''' || v_DefaultValue || ''')';
      ELSE
@@ -195,7 +195,7 @@
      v_Message:='DisplayType Not Supported';
    END IF;
    -- Default (literal)
-   IF(v_DefaultValue IS NOT NULL AND LENGTH(v_DefaultValue)<>0) THEN
+   IF(v_DefaultValue IS NOT NULL AND LENGTH(v_DefaultValue)&lt;&gt;0) THEN
      IF(v_AD_Reference_ID IN(10, 14, 17, 20, 28)) THEN
        v_Cmd:=v_Cmd || ' DEFAULT (''' || v_DefaultValue || ''')';
      ELSE
@@ -245,7 +245,7 @@
  END;
  END IF;
  END IF; --FINISH_PROCESS
- --<<FINISH_PROCESS>>
+ --&lt;&lt;FINISH_PROCESS&gt;&gt;
  --  Update AD_PInstance
  DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
  AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', v_Result, v_Message) ;
@@ -258,6 +258,6 @@
   ROLLBACK;
   AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   RETURN;
-END AD_Column_Sync]]></body>
+END AD_Column_Sync</body>
     </function>
-</database>
\ No newline at end of file
+  </database>
--- a/database/model/functions/AD_COPY_CLIENT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_COPY_CLIENT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_COPY_CLIENT">
-<function name="AD_COPY_CLIENT">
-<parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_COPY_CLIENT">
+    <function name="AD_COPY_CLIENT" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -214,7 +214,7 @@
       FOR Cur_Columns IN
         (SELECT UPPER(COLUMNNAME) AS NAME
       FROM AD_Column
-      WHERE AD_Table_ID=Cur_RoleTables.AD_Table_ID AND UPPER(ColumnName)<>'AD_CLIENT_ID' AND(UPPER(ColumnName)<>'' OR '' IS NULL)
+      WHERE AD_Table_ID=Cur_RoleTables.AD_Table_ID AND UPPER(ColumnName)&lt;&gt;'AD_CLIENT_ID' AND(UPPER(ColumnName)&lt;&gt;'' OR '' IS NULL)
       ORDER BY UPPER(COLUMNNAME))
       LOOP
         v_strTemp:=v_strTemp ||','|| Cur_Columns.NAME;
@@ -240,7 +240,7 @@
     ORDER BY TableName)
     LOOP
       EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '||Cur_Tables.NAME||' WHERE AD_Client_ID = '||p_AD_Client_ID INTO v_count;
-      IF(v_count>0) THEN
+      IF(v_count&gt;0) THEN
         SELECT MAX(UPPER(ColumnName))
         INTO v_ID_Column
         FROM AD_Column
@@ -263,7 +263,7 @@
         FOR Cur_Columns IN
           (SELECT UPPER(COLUMNNAME) AS NAME
         FROM AD_Column
-        WHERE AD_Table_ID=Cur_Tables.AD_Table_ID AND UPPER(ColumnName)<>'AD_CLIENT_ID' AND(UPPER(ColumnName)<>v_ID_Column OR v_ID_Column IS NULL)
+        WHERE AD_Table_ID=Cur_Tables.AD_Table_ID AND UPPER(ColumnName)&lt;&gt;'AD_CLIENT_ID' AND(UPPER(ColumnName)&lt;&gt;v_ID_Column OR v_ID_Column IS NULL)
         ORDER BY UPPER(COLUMNNAME))
         LOOP
           v_strTemp:=v_strTemp ||','|| Cur_Columns.NAME;
@@ -288,10 +288,10 @@
     FOR Cur_TranslateData IN
       (SELECT AD_DEPENDENCIES.TABLENAME, AD_DEPENDENCIES.COLUMNNAME, AD_DEPENDENCIES.DEPENDS_ON_TABLENAME, AD_DEPENDENCIES.DEPENDS_ON_COLUMNNAME, AD_ID_TRANSLATION."OFFSET"
     FROM AD_DEPENDENCIES, AD_ID_TRANSLATION
-    WHERE AD_DEPENDENCIES.DEPENDS_ON_TABLENAME=AD_ID_TRANSLATION.AD_TABLE AND AD_DEPENDENCIES.DEPENDS_ON_TABLENAME<>AD_DEPENDENCIES.TABLENAME AND AD_DEPENDENCIES.DEPENDS_ON_COLUMNNAME=AD_ID_TRANSLATION.AD_COLUMN
+    WHERE AD_DEPENDENCIES.DEPENDS_ON_TABLENAME=AD_ID_TRANSLATION.AD_TABLE AND AD_DEPENDENCIES.DEPENDS_ON_TABLENAME&lt;&gt;AD_DEPENDENCIES.TABLENAME AND AD_DEPENDENCIES.DEPENDS_ON_COLUMNNAME=AD_ID_TRANSLATION.AD_COLUMN
     ORDER BY AD_DEPENDENCIES.TABLENAME, AD_DEPENDENCIES.COLUMNNAME)
     LOOP
-      IF(Cur_TranslateData.TABLENAME<>v_tableActual OR v_count>20) THEN
+      IF(Cur_TranslateData.TABLENAME&lt;&gt;v_tableActual OR v_count&gt;20) THEN
         v_count:=0;
         v_tableActual:=Cur_TranslateData.TABLENAME;
         IF(v_strSql IS NOT NULL) THEN
@@ -319,7 +319,7 @@
     WHERE AD_DEPENDENCIES.DEPENDS_ON_TABLENAME=AD_ID_TRANSLATION.AD_TABLE AND AD_DEPENDENCIES.DEPENDS_ON_TABLENAME=AD_DEPENDENCIES.TABLENAME AND AD_DEPENDENCIES.DEPENDS_ON_COLUMNNAME=AD_ID_TRANSLATION.AD_COLUMN
     ORDER BY AD_DEPENDENCIES.TABLENAME, AD_DEPENDENCIES.COLUMNNAME)
     LOOP
-      IF(Cur_TranslateDataSelfDep.TABLENAME<>v_tableActual OR v_count>20) THEN
+      IF(Cur_TranslateDataSelfDep.TABLENAME&lt;&gt;v_tableActual OR v_count&gt;20) THEN
         v_count:=0;
         v_tableActual:=Cur_TranslateDataSelfDep.TABLENAME;
         IF(v_strSql IS NOT NULL) THEN
@@ -532,9 +532,9 @@
     WHEN OTHERS THEN
       v_Result:=0;
       if (coalesce(length(v_Message),0)!=0) then
-        v_Message:=substr(v_Message||'<br><br>',1,2000);
+        v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;',1,2000);
       end if;
-      v_Message := substr(v_Message||'@SQLScriptError@ '||Cur_Script.SeqNo||'. @Executing@'||Cur_Script.strSQL||'<br>'||SQLERRM,1,2000);
+      v_Message := substr(v_Message||'@SQLScriptError@ '||Cur_Script.SeqNo||'. @Executing@'||Cur_Script.strSQL||'&lt;br&gt;'||SQLERRM,1,2000);
     END;
   END LOOP;
 
@@ -543,28 +543,28 @@
    into v_count
     from user_constraints
    where status!='ENABLED';
-  if v_count>0 then
+  if v_count&gt;0 then
     if v_Result!=0 then
       v_Result:=2;
     end if;
-    v_Message:=substr(v_Message||'<br><br>@ProcessLeft@ '||v_count||' @DisabledConstraints@',1,2000);
+    v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;@ProcessLeft@ '||v_count||' @DisabledConstraints@',1,2000);
   end if;
 
   select count(*)
   into v_count
     from user_triggers
     where status!='ENABLED';
-  if v_count>0 then
+  if v_count&gt;0 then
     if v_Result!=0 then
       v_Result:=2;
     end if;
-    v_Message:=substr(v_Message||'<br><br>@ProcessLeft@ '||v_count||' @DisabledTriggers@',1,2000);
+    v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;@ProcessLeft@ '||v_count||' @DisabledTriggers@',1,2000);
   end if;
 
-  --<<END_PROCESS>>
+  --&lt;&lt;END_PROCESS&gt;&gt;
   IF(p_PInstance_ID IS NOT NULL) THEN
     --  Update AD_PInstance
-    if (coalesce(length(v_Message),0)>=1997) then
+    if (coalesce(length(v_Message),0)&gt;=1997) then
       v_Message:=substr(v_Message,1,1997)||'...';
     end if;
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
@@ -583,7 +583,7 @@
   IF(p_PInstance_ID IS NOT NULL) THEN
     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   END IF;
-END AD_Copy_Client]]>
+END AD_Copy_Client
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_DELETE_CLIENT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_DELETE_CLIENT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_DELETE_CLIENT">
-<function name="AD_DELETE_CLIENT">
-        <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-        <parameter name="p_AD_Client_ID" type="NUMERIC" mode="in"/>
-        <body><![CDATA[                                
+  <database name="FUNCTION AD_DELETE_CLIENT">
+    <function name="AD_DELETE_CLIENT" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_AD_Client_ID" type="NUMERIC" mode="in"/>
+      <body>                                
 /************************************************************************* 
 * The contents of this file are subject to the Openbravo  Public  License 
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License 
@@ -113,7 +113,7 @@
     FOR Cur_Tables IN 
       (SELECT AD_Table_ID, UPPER(TableName) AS NAME 
     FROM AD_Table 
-    WHERE IsView='N'  AND UPPER(TableName)<>'AD_CLIENT'  AND EXISTS 
+    WHERE IsView='N'  AND UPPER(TableName)&lt;&gt;'AD_CLIENT'  AND EXISTS 
       (SELECT 1 
       FROM AD_Column 
       WHERE AD_Table_ID=AD_Table.AD_Table_ID  AND UPPER(ColumnName)='AD_CLIENT_ID' 
@@ -167,9 +167,9 @@
     WHEN OTHERS THEN 
       v_Result:=0;
       if (coalesce(length(v_Message),0)!=0) then
-        v_Message:=substr(v_Message||'<br><br>',1,2000);
+        v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;',1,2000);
       end if;
-      v_Message := substr(v_Message||'@SQLScriptError@ '||Cur_Script.SeqNo||'. @Executing@'||Cur_Script.strSQL||'<br>'||SQLERRM,1,2000);
+      v_Message := substr(v_Message||'@SQLScriptError@ '||Cur_Script.SeqNo||'. @Executing@'||Cur_Script.strSQL||'&lt;br&gt;'||SQLERRM,1,2000);
     END;
   END LOOP;
 
@@ -177,24 +177,24 @@
    into v_count
     from user_constraints
    where status!='ENABLED';
-  if v_count>0 then
+  if v_count&gt;0 then
     v_Result:=0;
-    v_Message:=substr(v_Message||'<br><br>@ProcessLeft@ '||v_count||' @DisabledConstraints@',1,2000);
+    v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;@ProcessLeft@ '||v_count||' @DisabledConstraints@',1,2000);
   end if;
 
   select count(*)
   into v_count
     from user_triggers
     where status!='ENABLED';
-  if v_count>0 then
+  if v_count&gt;0 then
     v_Result:=0;
-    v_Message:=substr(v_Message||'<br><br>@ProcessLeft@ '||v_count||' @DisabledTriggers@',1,2000);
+    v_Message:=substr(v_Message||'&lt;br&gt;&lt;br&gt;@ProcessLeft@ '||v_count||' @DisabledTriggers@',1,2000);
   end if;
 
-   --<<END_PROCESS>>
+   --&lt;&lt;END_PROCESS&gt;&gt;
   IF(p_PInstance_ID IS NOT NULL) THEN
     --  Update AD_PInstance
-    if (coalesce(length(v_Message),0)>=1997) then
+    if (coalesce(length(v_Message),0)&gt;=1997) then
         v_Message:=substr(v_Message,1,1997)||'...';
       end if;
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
@@ -215,6 +215,6 @@
     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   END IF;
 --  RETURN;
-END AD_Delete_Client]]></body>
+END AD_Delete_Client</body>
     </function>
-</database>
\ No newline at end of file
+  </database>
--- a/database/model/functions/AD_DELETE_CLIENT0.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_DELETE_CLIENT0.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_DELETE_CLIENT0">
-<function name="AD_DELETE_CLIENT0">
-        <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-        <body><![CDATA[                                
+  <database name="FUNCTION AD_DELETE_CLIENT0">
+    <function name="AD_DELETE_CLIENT0" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>                                
 /************************************************************************* 
  * The contents of this file are subject to the Openbravo  Public  License 
  * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License 
@@ -26,6 +26,6 @@
  ************************************************************************/ 
 BEGIN 
  AD_Delete_Client (p_PInstance_ID, NULL); 
-END AD_Delete_Client0]]></body>
+END AD_Delete_Client0</body>
     </function>
-</database>
\ No newline at end of file
+  </database>
--- a/database/model/functions/AD_DEPENDENCIES_CREATE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_DEPENDENCIES_CREATE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_DEPENDENCIES_CREATE">
-<function name="AD_DEPENDENCIES_CREATE">
-<body><![CDATA[
+  <database name="FUNCTION AD_DEPENDENCIES_CREATE">
+    <function name="AD_DEPENDENCIES_CREATE" type="NULL">
+      <body>
 /*************************************************************************
  * The contents of this file are subject to the Openbravo  Public  License
  * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -144,7 +144,7 @@
   -- Update sequence values
   v_ResultStr:='Updating sequences';
 
-END AD_Dependencies_Create]]>
+END AD_Dependencies_Create
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_DEVELOPMENT_MIGRATION.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_DEVELOPMENT_MIGRATION.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_DEVELOPMENT_MIGRATION">
-<function name="AD_DEVELOPMENT_MIGRATION">
-<parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_DEVELOPMENT_MIGRATION">
+    <function name="AD_DEVELOPMENT_MIGRATION" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -130,7 +130,7 @@
     ORDER BY TableName)
     LOOP
       EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM '||Cur_Tables.NAME||' WHERE '||Cur_Tables.COL_ID||' BETWEEN '||v_min||' AND ' ||v_max INTO v_count;
-      IF(v_count>0) THEN
+      IF(v_count&gt;0) THEN
         EXECUTE IMMEDIATE 'SELECT MIN('||Cur_Tables.COL_ID||') FROM '||Cur_Tables.NAME||' WHERE '||Cur_Tables.COL_ID||' BETWEEN '||v_min||' AND ' ||v_max INTO v_minID;
         SELECT CurrentNextSys
         INTO v_nextID
@@ -159,7 +159,7 @@
     ORDER BY AD_DEPENDENCIES.TABLENAME, AD_DEPENDENCIES.COLUMNNAME)
     LOOP
       EXECUTE IMMEDIATE 'SELECT count(*) FROM ' || Cur_TranslateData.TABLENAME || ' WHERE ' || Cur_TranslateData.COLUMNNAME || ' BETWEEN ' || v_min || ' AND ' || v_max INTO v_count;
-      IF(v_count>0) THEN
+      IF(v_count&gt;0) THEN
         v_strSql:='UPDATE ' || Cur_TranslateData.TABLENAME || ' SET ' || Cur_TranslateData.COLUMNNAME || ' = ' || Cur_TranslateData.COLUMNNAME || ' + ' || Cur_TranslateData."OFFSET";
         v_strSql:=v_strSql || 'WHERE ' || Cur_TranslateData.COLUMNNAME || ' BETWEEN ' ||v_min||' AND ' ||v_max;
         v_seqNo:=v_seqNo + 1;
@@ -171,7 +171,7 @@
     INTO v_count
     FROM AD_Treenode
     WHERE Node_ID BETWEEN v_min AND v_max;
-    IF(v_count>0) THEN
+    IF(v_count&gt;0) THEN
       SELECT max("OFFSET")
       INTO v_Offset
       FROM AD_ID_TRANSLATION
@@ -185,7 +185,7 @@
     INTO v_count
     FROM AD_Treenode
     WHERE Parent_ID BETWEEN v_min AND v_max;
-    IF(v_count>0) THEN
+    IF(v_count&gt;0) THEN
       SELECT max("OFFSET")
       INTO v_Offset
       FROM AD_ID_TRANSLATION
@@ -235,7 +235,7 @@
       DBMS_OUTPUT.PUT_LINE(Cur_Script.SEQNO || ' - ' || v_ResultStr) ;
     END;
   END LOOP;
-  --<<END_PROCESS>>
+  --&lt;&lt;END_PROCESS&gt;&gt;
   IF(p_PInstance_ID IS NOT NULL) THEN
     --  Update AD_PInstance
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
@@ -254,7 +254,7 @@
   IF(p_PInstance_ID IS NOT NULL) THEN
     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   END IF;
-END AD_Development_Migration]]>
+END AD_Development_Migration
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_DISPLAY_LIST.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_DISPLAY_LIST.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_DISPLAY_LIST">
-<function name="AD_DISPLAY_LIST" type="NVARCHAR">
-<parameter name="p_ReferenceValue_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_Value" type="NVARCHAR" mode="in"/>
-<parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_DISPLAY_LIST">
+    <function name="AD_DISPLAY_LIST" type="NVARCHAR">
+      <parameter name="p_ReferenceValue_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_Value" type="NVARCHAR" mode="in"/>
+      <parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -44,6 +44,6 @@
 EXCEPTION
 WHEN OTHERS THEN
   RETURN 'Not found!!!';
-END AD_Display_List]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_Display_List</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_GET_DOCTYPE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_GET_DOCTYPE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_GET_DOCTYPE">
-<function name="AD_GET_DOCTYPE" type="NUMERIC">
-<parameter name="p_ClientId" type="NUMERIC" mode="in"/>
-<parameter name="p_OrgId" type="NUMERIC" mode="in"/>
-<parameter name="p_DocBaseType" type="CHAR" mode="in"/>
-<parameter name="p_DocSubTypeSO" type="CHAR" mode="in" default="NULL"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_GET_DOCTYPE">
+    <function name="AD_GET_DOCTYPE" type="NUMERIC">
+      <parameter name="p_ClientId" type="NUMERIC" mode="in"/>
+      <parameter name="p_OrgId" type="NUMERIC" mode="in"/>
+      <parameter name="p_DocBaseType" type="CHAR" mode="in"/>
+      <parameter name="p_DocSubTypeSO" type="CHAR" mode="in" default="NULL"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -33,7 +33,7 @@
         AND(p_DocSubTypeSO IS NULL
         OR DOCSUBTYPESO=p_DocSubTypeSO)
         AND AD_Client_Id=p_ClientId
-        AND AD_ISORGINCLUDED(p_OrgId, AD_Org_ID, p_ClientId) <> -1
+        AND AD_ISORGINCLUDED(p_OrgId, AD_Org_ID, p_ClientId) &lt;&gt; -1
       ORDER BY AD_ISORGINCLUDED(p_OrgId, AD_Org_ID, p_ClientId),
         IsDefault,
         C_DocType_ID
@@ -43,6 +43,6 @@
       EXIT;
     END LOOP;
     RETURN v_DocTypeId;
-END Ad_Get_DocType ]]></body>
-</function> 
-</database>
\ No newline at end of file
+END Ad_Get_DocType </body>
+    </function>
+  </database>
--- a/database/model/functions/AD_GET_NEXT_SEQUENCE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_GET_NEXT_SEQUENCE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_GET_NEXT_SEQUENCE">
-<function name="AD_GET_NEXT_SEQUENCE" type="NUMERIC">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<parameter name="p_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_GET_NEXT_SEQUENCE">
+    <function name="AD_GET_NEXT_SEQUENCE" type="NUMERIC">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <parameter name="p_ID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -30,7 +30,7 @@
   FROM AD_SEQUENCE
   WHERE NAME=p_TableName AND IsActive='Y' AND IsTableID='Y' AND IsAutoSequence='Y';
   v_ResultStr:='Write';
-  IF(v_NextNoSys <> -1 AND p_ID < 1000000) THEN -- System No
+  IF(v_NextNoSys &lt;&gt; -1 AND p_ID &lt; 1000000) THEN -- System No
     UPDATE AD_SEQUENCE
       SET CurrentNextSys=CurrentNextSys + IncrementNo,
       Updated=now()
@@ -48,6 +48,6 @@
   RAISE_APPLICATION_ERROR(-20516, 'Table Sequence not found ') ;
   --   || v_ResultStr || ': ' || p_TableName);
   RETURN 0;
-END Ad_Get_Next_Sequence]]></body>
-</function> 
-</database>
\ No newline at end of file
+END Ad_Get_Next_Sequence</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_IMPFORMAT_COPY.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_IMPFORMAT_COPY.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_IMPFORMAT_COPY">
-<function name="AD_IMPFORMAT_COPY">
-<parameter name="PInstance_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_IMPFORMAT_COPY">
+    <function name="AD_IMPFORMAT_COPY" type="NULL">
+      <parameter name="PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -12,7 +12,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -90,7 +90,7 @@
       v_NoOfFields:=v_NoOfFields + 1;
     END LOOP;
     v_Message:='@Copied@=' || v_NoOfFields;
-    --<<FINISH_PROCESS>>
+    --&lt;&lt;FINISH_PROCESS&gt;&gt;
     --  Update AD_PInstance
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
     AD_UPDATE_PINSTANCE(PInstance_ID, NULL, 'N', 1, v_Message) ;
@@ -102,7 +102,7 @@
   DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
   AD_UPDATE_PINSTANCE(PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   RETURN;
-END AD_ImpFormat_Copy]]>
+END AD_ImpFormat_Copy
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_ISMEMBERINCLUDED.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_ISMEMBERINCLUDED.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_ISMEMBERINCLUDED">
-<function name="AD_ISMEMBERINCLUDED" type="NUMERIC">
-<parameter name="p_nodeID" type="NUMERIC" mode="in"/>
-<parameter name="p_parentID" type="NUMERIC" mode="in"/>
-<parameter name="p_treeID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_ISMEMBERINCLUDED">
+    <function name="AD_ISMEMBERINCLUDED" type="NUMERIC">
+      <parameter name="p_nodeID" type="NUMERIC" mode="in"/>
+      <parameter name="p_parentID" type="NUMERIC" mode="in"/>
+      <parameter name="p_treeID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -45,6 +45,6 @@
     END IF;
   END LOOP;
   RETURN(-1) ;
-END AD_IsMemberIncluded]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_IsMemberIncluded</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_ISORGINCLUDED.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_ISORGINCLUDED.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_ISORGINCLUDED">
-<function name="AD_ISORGINCLUDED" type="NUMERIC">
-<parameter name="p_orgID" type="NUMERIC" mode="in"/>
-<parameter name="p_parentOrgID" type="NUMERIC" mode="in"/>
-<parameter name="p_clientID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_ISORGINCLUDED">
+    <function name="AD_ISORGINCLUDED" type="NUMERIC">
+      <parameter name="p_orgID" type="NUMERIC" mode="in"/>
+      <parameter name="p_parentOrgID" type="NUMERIC" mode="in"/>
+      <parameter name="p_clientID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -50,6 +50,6 @@
     END IF;
   END LOOP;
   RETURN(-1) ;
-END AD_IsOrgIncluded ]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_IsOrgIncluded </body>
+    </function>
+  </database>
--- a/database/model/functions/AD_LANGUAGE_CREATE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_LANGUAGE_CREATE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_LANGUAGE_CREATE">
-<function name="AD_LANGUAGE_CREATE">
-        <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-        <body><![CDATA[                                
+  <database name="FUNCTION AD_LANGUAGE_CREATE">
+    <function name="AD_LANGUAGE_CREATE" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>                                
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -12,7 +12,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -535,7 +535,7 @@
     -- Summary info
     v_Message:='@Created@ = ' || v_Created;
     -- Commented by cromero 19102006 COMMIT;
-    --<<FINISH_PROCESS>>
+    --&lt;&lt;FINISH_PROCESS&gt;&gt;
     --  Update AD_PInstance
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', v_Result, v_Message) ;
@@ -548,6 +548,6 @@
   ROLLBACK;
   AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
 -- Commented by cromero 19102006 RETURN;
-END AD_Language_Create]]></body>
+END AD_Language_Create</body>
     </function>
-</database>
\ No newline at end of file
+  </database>
--- a/database/model/functions/AD_MAPPING_FORMAT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_MAPPING_FORMAT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_MAPPING_FORMAT">
-<function name="AD_MAPPING_FORMAT" type="VARCHAR">
-<parameter name="p_str" type="VARCHAR" />
-<body><![CDATA[
+  <database name="FUNCTION AD_MAPPING_FORMAT">
+    <function name="AD_MAPPING_FORMAT" type="VARCHAR">
+      <parameter name="p_str" type="VARCHAR"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -41,11 +41,11 @@
   v_str:=replace(v_str, '/', '') ;
   v_str:=replace(v_str, '#', '') ;
   v_str:=replace(v_str, ' ', '') ;
-  v_str:=replace(v_str, '&', '') ;
+  v_str:=replace(v_str, '&amp;', '') ;
   v_str:=replace(v_str, ',', '') ;
   v_str:=replace(v_str, '(', '') ;
   v_str:=replace(v_str, ')', '') ;
   RETURN(v_str) ;
-END AD_MAPPING_FORMAT]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_MAPPING_FORMAT</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_MESSAGE_GET.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_MESSAGE_GET.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_MESSAGE_GET">
-<function name="AD_MESSAGE_GET" type="NVARCHAR">
-<parameter name="p_Value" type="NVARCHAR" mode="in"/>
-<parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_MESSAGE_GET">
+    <function name="AD_MESSAGE_GET" type="NVARCHAR">
+      <parameter name="p_Value" type="NVARCHAR" mode="in"/>
+      <parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
+      <body>
 /******************************************************************************
 * The contents of this file are subject to the   Compiere License  Version 1.1
 * ("License"); You may not use this file except in compliance with the License
@@ -11,7 +11,7 @@
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
-* The Original Code is                  Compiere  ERP &  Business Solution
+* The Original Code is                  Compiere  ERP &amp;  Business Solution
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
@@ -25,19 +25,19 @@
   INTO v_RetValue
   FROM AD_Message
   WHERE Value = p_Value;
-  /*POSTGRESQL>
+  /*POSTGRESQL&gt;
   IF (NOT FOUND) THEN
-  RETURN <' || p_Value || '>';
+  RETURN &lt;' || p_Value || '&gt;';
   END IF;
-  <POSTGRESQL*/
-  /*ORACLE>*/
+  &lt;POSTGRESQL*/
+  /*ORACLE&gt;*/
 EXCEPTION
 WHEN OTHERS THEN
-  RETURN N'<' || p_Value || N'>';
-  /*<ORACLE*/
+  RETURN N'&lt;' || p_Value || N'&gt;';
+  /*&lt;ORACLE*/
 END;
 --
 RETURN v_RetValue;
-END AD_Message_Get]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_Message_Get</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_MESSAGE_GET2.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_MESSAGE_GET2.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_MESSAGE_GET2">
-<function name="AD_MESSAGE_GET2" type="NVARCHAR">
-<parameter name="p_Value" type="NVARCHAR" mode="in"/>
-<parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_MESSAGE_GET2">
+    <function name="AD_MESSAGE_GET2" type="NVARCHAR">
+      <parameter name="p_Value" type="NVARCHAR" mode="in"/>
+      <parameter name="p_AD_Language" type="VARCHAR" mode="in"/>
+      <body>
 /******************************************************************************
 * The contents of this file are subject to the   Compiere License  Version 1.1
 * ("License"); You may not use this file except in compliance with the License
@@ -11,7 +11,7 @@
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
-* The Original Code is                  Compiere  ERP &  Business Solution
+* The Original Code is                  Compiere  ERP &amp;  Business Solution
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
@@ -35,12 +35,12 @@
        AND AD_MESSAGE.VALUE = p_Value;
   END IF;
 
-  /*POSTGRESQL>
+  /*POSTGRESQL&gt;
   IF (NOT FOUND) THEN
-  RETURN <' || p_Value || '>';
+  RETURN &lt;' || p_Value || '&gt;';
   END IF;
-  <POSTGRESQL*/
-  /*ORACLE>*/
+  &lt;POSTGRESQL*/
+  /*ORACLE&gt;*/
 
 EXCEPTION
   WHEN OTHERS THEN
@@ -48,6 +48,6 @@
 END;
 --
 RETURN v_RetValue;
-END AD_MESSAGE_GET2]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_MESSAGE_GET2</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_ORGLIST.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_ORGLIST.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_ORGLIST">
-<function name="AD_ORGLIST" type="VARCHAR">
-<parameter name="p_roleID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_ORGLIST">
+    <function name="AD_ORGLIST" type="VARCHAR">
+      <parameter name="p_roleID" type="NUMERIC" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -37,6 +37,6 @@
       v_orgList:=v_orgList||','||Cur_Roles.AD_Org_ID;
     END LOOP;
     RETURN SUBSTR(v_orgList, 2, 4000) ;
-END AD_OrgList]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_OrgList</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_PARENT_MENU_ELEMENT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_PARENT_MENU_ELEMENT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_PARENT_MENU_ELEMENT">
-<function name="AD_PARENT_MENU_ELEMENT" type="VARCHAR">
-<parameter name="p_NodeID" type="NUMERIC" mode="in"/>
-<parameter name="p_clientID" type="NUMERIC" mode="in"/>
-<parameter name="p_Language" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_PARENT_MENU_ELEMENT">
+    <function name="AD_PARENT_MENU_ELEMENT" type="VARCHAR">
+      <parameter name="p_NodeID" type="NUMERIC" mode="in"/>
+      <parameter name="p_clientID" type="NUMERIC" mode="in"/>
+      <parameter name="p_Language" type="VARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -59,6 +59,6 @@
       AND NODE_ID = AD_MENU.AD_MENU_ID;
   END LOOP;
   RETURN(v_Name) ;
-END AD_PARENT_MENU_ELEMENT]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_PARENT_MENU_ELEMENT</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_PARENT_TREE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_PARENT_TREE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_PARENT_TREE">
-<function name="AD_PARENT_TREE" type="VARCHAR">
-<parameter name="p_tree_id" type="NUMERIC" mode="in"/>
-<parameter name="p_node_id" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_PARENT_TREE">
+    <function name="AD_PARENT_TREE" type="VARCHAR">
+      <parameter name="p_tree_id" type="NUMERIC" mode="in"/>
+      <parameter name="p_node_id" type="NUMERIC" mode="in"/>
+      <body>
    p VARCHAR2(32767);
   vp NUMBER(10);
 BEGIN
@@ -21,7 +21,6 @@
     END IF;
     RETURN '|'||vp||'|';
   EXCEPTION WHEN OTHERS THEN RETURN ' ';
-END AD_PARENT_TREE]]></body>
-
-</function> 
-</database>
\ No newline at end of file
+END AD_PARENT_TREE</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_PRINTPAPER_DEFAULT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_PRINTPAPER_DEFAULT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_PRINTPAPER_DEFAULT">
-<function name="AD_PRINTPAPER_DEFAULT">
-<parameter name="p_AD_PInstance_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_PRINTPAPER_DEFAULT">
+    <function name="AD_PRINTPAPER_DEFAULT" type="NULL">
+      <parameter name="p_AD_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -12,7 +12,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -74,7 +74,7 @@
       ;
     rowcount:=SQL%ROWCOUNT;
     v_Message:='@Copied@=' || rowcount;
-    --<<FINISH_PROCESS>>
+    --&lt;&lt;FINISH_PROCESS&gt;&gt;
     --  Update AD_PInstance
     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
     AD_UPDATE_PINSTANCE(p_AD_PInstance_ID, NULL, 'N', 1, v_Message) ;
@@ -86,7 +86,7 @@
   DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
   AD_UPDATE_PINSTANCE(p_AD_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   RETURN;
-END AD_PrintPaper_Default]]>
+END AD_PrintPaper_Default
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_SEQUENCE_DOC.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SEQUENCE_DOC.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SEQUENCE_DOC">
-<function name="AD_SEQUENCE_DOC">
-<parameter name="p_SequenceName" type="VARCHAR" mode="in"/>
-<parameter name="p_AD_Client_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_Update_Next" type="CHAR" mode="in"/>
-<parameter name="p_DocumentNo" type="VARCHAR" mode="out"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SEQUENCE_DOC">
+    <function name="AD_SEQUENCE_DOC" type="NULL">
+      <parameter name="p_SequenceName" type="VARCHAR" mode="in"/>
+      <parameter name="p_AD_Client_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_Update_Next" type="CHAR" mode="in"/>
+      <parameter name="p_DocumentNo" type="VARCHAR" mode="out"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -15,7 +15,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -29,7 +29,7 @@
   * Title: Get the next DocumentNo of TableName
   * Description:
   *  store in parameter p_DocumentNo
-  *  if ID < 1000000, use System Doc Sequence
+  *  if ID &lt; 1000000, use System Doc Sequence
   ************************************************************************/
   v_NextNo NUMBER;
   v_NextNoSys NUMBER;
@@ -40,7 +40,7 @@
   INTO v_NextNo, v_NextNoSys, v_Prefix, v_Suffix
   FROM AD_Sequence
   WHERE Name=p_SequenceName  AND IsActive='Y'  AND IsTableID='N'  AND IsAutoSequence='Y'  AND AD_Client_ID=p_AD_Client_ID  FOR UPDATE OF CurrentNext, CurrentNextSys;
-  IF(v_NextNoSys<>-1 AND p_AD_Client_ID<1000000) THEN -- System No
+  IF(v_NextNoSys&lt;&gt;-1 AND p_AD_Client_ID&lt;1000000) THEN -- System No
     IF p_Update_Next='Y' THEN
       UPDATE AD_Sequence
         SET CurrentNextSys=CurrentNextSys + IncrementNo, Updated=now()
@@ -58,7 +58,7 @@
 EXCEPTION
 WHEN NO_DATA_FOUND THEN
   RAISE_APPLICATION_ERROR(-20000, '@DocumentSequenceNotFound@' || p_SequenceName) ;
-END AD_Sequence_Doc]]>
+END AD_Sequence_Doc
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_SEQUENCE_DOCTYPE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SEQUENCE_DOCTYPE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SEQUENCE_DOCTYPE">
-<function name="AD_SEQUENCE_DOCTYPE">
-<parameter name="p_DocType_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_Update_Next" type="CHAR" mode="in"/>
-<parameter name="p_DocumentNo" type="VARCHAR" mode="out"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SEQUENCE_DOCTYPE">
+    <function name="AD_SEQUENCE_DOCTYPE" type="NULL">
+      <parameter name="p_DocType_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_Update_Next" type="CHAR" mode="in"/>
+      <parameter name="p_DocumentNo" type="VARCHAR" mode="out"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -15,7 +15,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -29,7 +29,7 @@
   * Title: Get the next DocumentNo of Document Type
   * Description:
   *  store in parameter p_DocumentNo
-  *  If ID < 1000000, use System Doc Sequence
+  *  If ID &lt; 1000000, use System Doc Sequence
   *  If no Document Sequence is defined, return null !
   *   Use AD_Sequence_Doc('DocumentNo_myTable',.. to get it directly
   ************************************************************************/
@@ -61,7 +61,7 @@
 FROM C_DocType d, AD_Sequence s
 WHERE d.C_DocType_ID=p_DocType_ID -- parameter
   AND d.DocNoSequence_ID=s.AD_Sequence_ID  AND s.IsActive='Y'  AND s.IsTableID='N'  AND s.IsAutoSequence='Y'  FOR UPDATE OF CurrentNext, CurrentNextSys;
-IF(v_NextNoSys<>-1 AND p_ID<1000000) THEN -- System No
+IF(v_NextNoSys&lt;&gt;-1 AND p_ID&lt;1000000) THEN -- System No
   IF p_Update_Next='Y' THEN
     UPDATE AD_Sequence
       SET CurrentNextSys=CurrentNextSys + IncrementNo
@@ -80,7 +80,7 @@
 EXCEPTION
 WHEN NO_DATA_FOUND THEN
   RAISE_APPLICATION_ERROR(-20000, '@DocumentTypeSequenceNotFound@') ;
-END AD_Sequence_DocType]]>
+END AD_Sequence_DocType
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_SEQUENCE_NEXT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SEQUENCE_NEXT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SEQUENCE_NEXT">
-<function name="AD_SEQUENCE_NEXT">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<parameter name="p_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_NextNo" type="NUMERIC" mode="out"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SEQUENCE_NEXT">
+    <function name="AD_SEQUENCE_NEXT" type="NULL">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <parameter name="p_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_NextNo" type="NUMERIC" mode="out"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -14,7 +14,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -28,7 +28,7 @@
   * Title: Get the next sequence number of TableName
   * Description:
   *  store in parameter p_NextNo
-  *  if ID < 1000000, use System Doc Sequence
+  *  if ID &lt; 1000000, use System Doc Sequence
   ************************************************************************/
   v_NextNoSys NUMBER;
   v_ResultStr VARCHAR(255) ;
@@ -40,7 +40,7 @@
   WHERE Name=p_TableName  AND IsActive='Y'  AND IsTableID='Y'  AND IsAutoSequence='Y'  FOR UPDATE OF CurrentNext, CurrentNextSys;
   --DBMS_OUTPUT.PUT_LINE('CurrentNext: ' || p_NextNo || ' - CurrentNextSys: ' || v_NextNoSys) ;
   v_ResultStr:='Write';
-  IF(v_NextNoSys<>-1 AND p_ID<1000000) THEN -- System No
+  IF(v_NextNoSys&lt;&gt;-1 AND p_ID&lt;1000000) THEN -- System No
     UPDATE AD_Sequence
       SET CurrentNextSys=CurrentNextSys + IncrementNo, Updated=now()
     WHERE Name=p_TableName;
@@ -55,7 +55,7 @@
 WHEN NO_DATA_FOUND THEN
   RAISE_APPLICATION_ERROR(-20000, '@NoIDsequence@') ;
   --   || v_ResultStr || ': ' || p_TableName);
-END AD_Sequence_Next]]>
+END AD_Sequence_Next
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_SEQUENCE_NEXTNO.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SEQUENCE_NEXTNO.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SEQUENCE_NEXTNO">
-<function name="AD_SEQUENCE_NEXTNO" type="NUMERIC">
-<parameter name="p_TableName" type="VARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SEQUENCE_NEXTNO">
+    <function name="AD_SEQUENCE_NEXTNO" type="NUMERIC">
+      <parameter name="p_TableName" type="VARCHAR" mode="in"/>
+      <body>
 /******************************************************************************
 * The contents of this file are subject to the   Compiere License  Version 1.1
 * ("License"); You may not use this file except in compliance with the License
@@ -10,7 +10,7 @@
 * Software distributed under the License is distributed on an  "AS IS"  basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
-* The Original Code is                  Compiere  ERP &  Business Solution
+* The Original Code is                  Compiere  ERP &amp;  Business Solution
 * The Initial Developer of the Original Code is Jorg Janke  and ComPiere, Inc.
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
@@ -33,6 +33,6 @@
 EXCEPTION
 WHEN NO_DATA_FOUND THEN
   RAISE_APPLICATION_ERROR(-20516, 'Table Sequence not found') ;
-END AD_Sequence_NextNo ]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_Sequence_NextNo </body>
+    </function>
+  </database>
--- a/database/model/functions/AD_SHORTNAME.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SHORTNAME.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SHORTNAME">
-<function name="AD_SHORTNAME" type="NVARCHAR">
-<parameter name="p_Name" type="NVARCHAR" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SHORTNAME">
+    <function name="AD_SHORTNAME" type="NVARCHAR">
+      <parameter name="p_Name" type="NVARCHAR" mode="in"/>
+      <body>
 /*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
@@ -26,7 +26,7 @@
   v_pos NUMBER:=1;
 BEGIN
   v_RetValue:=SUBSTR(p_Name, 1, 1) ;
-  WHILE(INSTR(REPLACE(p_Name, '.', ' '), ' ', v_pos+1) > 0)
+  WHILE(INSTR(REPLACE(p_Name, '.', ' '), ' ', v_pos+1) &gt; 0)
   LOOP
     v_pos:=INSTR(REPLACE(p_Name, '.', ' '), ' ', v_pos+1) ;
     v_RetValue:=v_RetValue || SUBSTR(p_Name, v_pos+1, 1) ;
@@ -35,6 +35,6 @@
 EXCEPTION
 WHEN OTHERS THEN
   RETURN TO_CHAR(v_pos) ;
-END AD_ShortName]]></body>
-</function> 
-</database>
\ No newline at end of file
+END AD_ShortName</body>
+    </function>
+  </database>
--- a/database/model/functions/AD_SYNCHRONIZE.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_SYNCHRONIZE.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,8 +1,8 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_SYNCHRONIZE">
-<function name="AD_SYNCHRONIZE">
-<parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_SYNCHRONIZE">
+    <function name="AD_SYNCHRONIZE" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -12,7 +12,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -211,9 +211,9 @@
     WHERE EXISTS
       (SELECT *
       FROM AD_ELEMENT e
-      WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID  AND(--AD_Column.ColumnName <> e.ColumnName OR
-        AD_COLUMN.NAME<>e.NAME  OR COALESCE(TO_CHAR(AD_COLUMN.Description), ' ')<>COALESCE(TO_CHAR(e.Description), ' ')
-        OR COALESCE(TO_CHAR(AD_COLUMN.Help), ' ')<>COALESCE(TO_CHAR(e.Help), ' '))
+      WHERE AD_COLUMN.AD_Element_ID=e.AD_Element_ID  AND(--AD_Column.ColumnName &lt;&gt; e.ColumnName OR
+        AD_COLUMN.NAME&lt;&gt;e.NAME  OR COALESCE(TO_CHAR(AD_COLUMN.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Description), ' ')
+        OR COALESCE(TO_CHAR(AD_COLUMN.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -241,8 +241,8 @@
       (SELECT *
       FROM AD_ELEMENT e, AD_COLUMN c
       WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID  AND c.AD_Element_ID=e.AD_Element_ID
-      AND c.AD_Process_ID IS NULL  AND(AD_FIELD.NAME<>e.NAME OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')<>COALESCE(TO_CHAR(e.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')<>COALESCE(TO_CHAR(e.Help), ' '))
+      AND c.AD_Process_ID IS NULL  AND(AD_FIELD.NAME&lt;&gt;e.NAME OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -281,8 +281,8 @@
       WHERE AD_FIELD_TRL.AD_Field_ID=f.AD_Field_ID  AND f.AD_Column_ID=c.AD_Column_ID
       AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL
       AND AD_FIELD_TRL.AD_LANGUAGE=e.AD_LANGUAGE  AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'
-      AND(AD_FIELD_TRL.NAME<>e.NAME OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')<>COALESCE(TO_CHAR(e.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')<>COALESCE(TO_CHAR(e.Help), ' '))
+      AND(AD_FIELD_TRL.NAME&lt;&gt;e.NAME OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Help), ' '))
       );
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  rows updated: ' || v_rowcount) ;
@@ -309,8 +309,8 @@
       (SELECT *
       FROM AD_ELEMENT e, AD_COLUMN c
       WHERE AD_FIELD.AD_Column_ID=c.AD_Column_ID  AND c.AD_Element_ID=e.AD_Element_ID
-      AND c.AD_Process_ID IS NULL  AND(AD_FIELD.NAME<>e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')<>COALESCE(TO_CHAR(e.PO_Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
+      AND c.AD_Process_ID IS NULL  AND(AD_FIELD.NAME&lt;&gt;e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.PO_Description), ' ')
+      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
       )
       AND EXISTS
       (SELECT *
@@ -354,8 +354,8 @@
       WHERE AD_FIELD_TRL.AD_Field_ID=f.AD_Field_ID  AND f.AD_Column_ID=c.AD_Column_ID
       AND c.AD_Element_ID=e.AD_Element_ID AND c.AD_Process_ID IS NULL
       AND AD_FIELD_TRL.AD_LANGUAGE=e.AD_LANGUAGE  AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'
-      AND(AD_FIELD_TRL.NAME<>e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')<>COALESCE(TO_CHAR(e.PO_Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')<>COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
+      AND(AD_FIELD_TRL.NAME&lt;&gt;e.PO_Name OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.PO_Description), ' ')
+      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.PO_Help), ' ')) AND e.PO_Name IS NOT NULL
       )
       AND EXISTS
       (SELECT *
@@ -389,8 +389,8 @@
       (SELECT *
       FROM AD_PROCESS p, AD_COLUMN c
       WHERE c.AD_Process_ID=p.AD_Process_ID AND AD_FIELD.AD_Column_ID=c.AD_Column_ID
-      AND(AD_FIELD.NAME<>p.NAME OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')<>COALESCE(TO_CHAR(p.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')<>COALESCE(TO_CHAR(p.Help), ' '))
+      AND(AD_FIELD.NAME&lt;&gt;p.NAME OR COALESCE(TO_CHAR(AD_FIELD.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(p.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_FIELD.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(p.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -427,8 +427,8 @@
       (SELECT *
       FROM AD_PROCESS_TRL p, AD_COLUMN c, AD_FIELD f
       WHERE c.AD_Process_ID=p.AD_Process_ID AND f.AD_Column_ID=c.AD_Column_ID  AND f.AD_Field_ID=AD_FIELD_TRL.AD_Field_ID
-      AND p.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE  AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'  AND(AD_FIELD_TRL.NAME<>p.NAME
-      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')<>COALESCE(TO_CHAR(p.Description), ' ') OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')<>COALESCE(TO_CHAR(p.Help), ' '))
+      AND p.AD_LANGUAGE=AD_FIELD_TRL.AD_LANGUAGE  AND f.IsCentrallyMaintained='Y' AND f.IsActive='Y'  AND(AD_FIELD_TRL.NAME&lt;&gt;p.NAME
+      OR COALESCE(TO_CHAR(AD_FIELD_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(p.Description), ' ') OR COALESCE(TO_CHAR(AD_FIELD_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(p.Help), ' '))
       );
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  rows updated: ' || v_rowcount) ;
@@ -439,11 +439,11 @@
     WHERE AD_Process_Para.IsCentrallyMaintained='Y' AND AD_Process_Para.IsActive='Y'
     AND EXISTS (SELECT * FROM AD_Element e
     WHERE e.AD_Element_ID=AD_Process_Para.AD_Element_ID
-    AND e.ColumnName<>AD_Process_Para.ColumnName);*/
+    AND e.ColumnName&lt;&gt;AD_Process_Para.ColumnName);*/
     -- Paramenter Fields
     UPDATE AD_PROCESS_PARA
       SET IsCentrallyMaintained='N'
-    WHERE IsCentrallyMaintained<>'N'  AND NOT EXISTS
+    WHERE IsCentrallyMaintained&lt;&gt;'N'  AND NOT EXISTS
       (SELECT *
       FROM AD_ELEMENT e
       WHERE AD_PROCESS_PARA.AD_Element_ID=e.AD_Element_ID
@@ -471,9 +471,9 @@
     WHERE AD_PROCESS_PARA.IsCentrallyMaintained='Y' AND AD_PROCESS_PARA.IsActive='Y'  AND EXISTS
       (SELECT *
       FROM AD_ELEMENT e
-      WHERE e.AD_Element_ID=AD_PROCESS_PARA.AD_Element_ID  AND(AD_PROCESS_PARA.NAME<>e.NAME
-      OR COALESCE(TO_CHAR(AD_PROCESS_PARA.Description), ' ')<>COALESCE(TO_CHAR(e.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_PROCESS_PARA.Help), ' ')<>COALESCE(TO_CHAR(e.Help), ' '))
+      WHERE e.AD_Element_ID=AD_PROCESS_PARA.AD_Element_ID  AND(AD_PROCESS_PARA.NAME&lt;&gt;e.NAME
+      OR COALESCE(TO_CHAR(AD_PROCESS_PARA.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_PROCESS_PARA.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(e.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -511,8 +511,8 @@
       FROM AD_ELEMENT_TRL et, AD_PROCESS_PARA f
       WHERE et.AD_LANGUAGE=AD_PROCESS_PARA_TRL.AD_LANGUAGE AND f.AD_Element_ID=et.AD_Element_ID
       AND f.AD_Process_Para_ID=AD_PROCESS_PARA_TRL.AD_Process_Para_ID  AND f.IsCentrallyMaintained='Y'
-      AND f.IsActive='Y'  AND(AD_PROCESS_PARA_TRL.NAME<>et.NAME OR COALESCE(TO_CHAR(AD_PROCESS_PARA_TRL.Description), ' ')<>COALESCE(TO_CHAR(et.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_PROCESS_PARA_TRL.Help), ' ')<>COALESCE(TO_CHAR(et.Help), ' '))
+      AND f.IsActive='Y'  AND(AD_PROCESS_PARA_TRL.NAME&lt;&gt;et.NAME OR COALESCE(TO_CHAR(AD_PROCESS_PARA_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(et.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_PROCESS_PARA_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(et.Help), ' '))
       );
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  rows updated: ' || v_rowcount) ;
@@ -531,8 +531,8 @@
     WHERE AD_WF_NODE.IsCentrallyMaintained='Y'  AND EXISTS
       (SELECT *
       FROM AD_WINDOW w
-      WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID  AND(w.NAME<>AD_WF_NODE.NAME OR COALESCE(TO_CHAR(w.Description), ' ')<>COALESCE(TO_CHAR(AD_WF_NODE.Description), ' ')
-      OR COALESCE(TO_CHAR(w.Help), ' ')<>COALESCE(TO_CHAR(AD_WF_NODE.Help), ' '))
+      WHERE w.AD_Window_ID=AD_WF_NODE.AD_Window_ID  AND(w.NAME&lt;&gt;AD_WF_NODE.NAME OR COALESCE(TO_CHAR(w.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(AD_WF_NODE.Description), ' ')
+      OR COALESCE(TO_CHAR(w.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(AD_WF_NODE.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -563,8 +563,8 @@
       FROM AD_WINDOW_TRL t, AD_WF_NODE n
       WHERE AD_WF_NODE_TRL.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Window_ID=t.AD_Window_ID
       AND AD_WF_NODE_TRL.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y'
-      AND(AD_WF_NODE_TRL.NAME<>t.NAME OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Description), ' ')<>COALESCE(TO_CHAR(t.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Help), ' ')<>COALESCE(TO_CHAR(t.Help), ' '))
+      AND(AD_WF_NODE_TRL.NAME&lt;&gt;t.NAME OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(t.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(t.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -584,8 +584,8 @@
     WHERE AD_WF_NODE.IsCentrallyMaintained='Y'  AND EXISTS
       (SELECT *
       FROM AD_FORM f
-      WHERE f.AD_Form_ID=AD_WF_NODE.AD_Form_ID  AND(f.NAME<>AD_WF_NODE.NAME OR COALESCE(TO_CHAR(f.Description), ' ')<>COALESCE(TO_CHAR(AD_WF_NODE.Description), ' ')
-      OR COALESCE(TO_CHAR(f.Help), ' ')<>COALESCE(TO_CHAR(AD_WF_NODE.Help), ' '))
+      WHERE f.AD_Form_ID=AD_WF_NODE.AD_Form_ID  AND(f.NAME&lt;&gt;AD_WF_NODE.NAME OR COALESCE(TO_CHAR(f.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(AD_WF_NODE.Description), ' ')
+      OR COALESCE(TO_CHAR(f.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(AD_WF_NODE.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -616,8 +616,8 @@
       FROM AD_FORM_TRL t, AD_WF_NODE n
       WHERE AD_WF_NODE_TRL.AD_WF_Node_ID=n.AD_WF_Node_ID AND n.AD_Form_ID=t.AD_Form_ID
       AND AD_WF_NODE_TRL.AD_LANGUAGE=t.AD_LANGUAGE AND n.IsCentrallyMaintained='Y' AND n.IsActive='Y'
-      AND(AD_WF_NODE_TRL.NAME<>t.NAME OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Description), ' ')<>COALESCE(TO_CHAR(t.Description), ' ')
-      OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Help), ' ')<>COALESCE(TO_CHAR(t.Help), ' '))
+      AND(AD_WF_NODE_TRL.NAME&lt;&gt;t.NAME OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Description), ' ')&lt;&gt;COALESCE(TO_CHAR(t.Description), ' ')
+      OR COALESCE(TO_CHAR(AD_WF_NODE_TRL.Help), ' ')&lt;&gt;COALESCE(TO_CHAR(t.Help), ' '))
       )
       ;
     v_rowcount:=SQL%ROWCOUNT;
@@ -633,7 +633,7 @@
       (SELECT *
       FROM AD_ELEMENT e, AD_COLUMN c
       WHERE e.AD_Element_ID=c.AD_Element_ID  AND c.AD_Column_ID=AD_PRINTFORMATITEM.AD_Column_ID
-      AND e.NAME<>AD_PRINTFORMATITEM.NAME
+      AND e.NAME&lt;&gt;AD_PRINTFORMATITEM.NAME
       )
       AND EXISTS
       (SELECT *
@@ -654,7 +654,7 @@
       (SELECT *
       FROM AD_ELEMENT e, AD_COLUMN c, AD_PRINTFORMAT pf
       WHERE e.AD_Element_ID=c.AD_Element_ID  AND c.AD_Column_ID=AD_PRINTFORMATITEM.AD_Column_ID
-      AND LENGTH(AD_PRINTFORMATITEM.PrintName)>0  AND e.PrintName<>AD_PRINTFORMATITEM.PrintName
+      AND LENGTH(AD_PRINTFORMATITEM.PrintName)&gt;0  AND e.PrintName&lt;&gt;AD_PRINTFORMATITEM.PrintName
       AND pf.AD_PrintFormat_ID=AD_PRINTFORMATITEM.AD_PrintFormat_ID  AND pf.IsForm='N' AND IsTableBased='Y'
       )
       AND EXISTS
@@ -678,7 +678,7 @@
       FROM AD_ELEMENT_TRL e, AD_COLUMN c, AD_PRINTFORMATITEM pfi, AD_PRINTFORMAT pf
       WHERE e.AD_LANGUAGE=AD_PRINTFORMATITEM_TRL.AD_LANGUAGE  AND e.AD_Element_ID=c.AD_Element_ID
       AND c.AD_Column_ID=pfi.AD_Column_ID  AND pfi.AD_PrintFormatItem_ID=AD_PRINTFORMATITEM_TRL.AD_PrintFormatItem_ID
-      AND LENGTH(pfi.PrintName)>0  AND(e.PrintName<>AD_PRINTFORMATITEM_TRL.PrintName OR AD_PRINTFORMATITEM_TRL.PrintName IS NULL)
+      AND LENGTH(pfi.PrintName)&gt;0  AND(e.PrintName&lt;&gt;AD_PRINTFORMATITEM_TRL.PrintName OR AD_PRINTFORMATITEM_TRL.PrintName IS NULL)
       AND pf.AD_PrintFormat_ID=pfi.AD_PrintFormat_ID  AND pf.IsForm='N' AND IsTableBased='Y'
       )
       AND EXISTS
@@ -700,7 +700,7 @@
       (SELECT *
       FROM AD_PRINTFORMATITEM pfi, AD_PRINTFORMAT pf
       WHERE pfi.AD_PrintFormatItem_ID=AD_PRINTFORMATITEM_TRL.AD_PrintFormatItem_ID
-      AND LENGTH(pfi.PrintName)>0  AND pfi.PrintName<>AD_PRINTFORMATITEM_TRL.PrintName
+      AND LENGTH(pfi.PrintName)&gt;0  AND pfi.PrintName&lt;&gt;AD_PRINTFORMATITEM_TRL.PrintName
       AND pf.AD_PrintFormat_ID=pfi.AD_PrintFormat_ID  AND pf.IsForm='N' AND pf.IsTableBased='Y'
       )
       AND EXISTS
@@ -928,7 +928,7 @@
       ;
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('  trl rows updated: ' || v_rowcount) ;
-    --<<FINISH_PROCESS>>
+    --&lt;&lt;FINISH_PROCESS&gt;&gt;
     IF(p_PInstance_ID IS NOT NULL) THEN
       --  Update AD_PInstance
       DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
@@ -945,7 +945,7 @@
     Ad_Update_Pinstance(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   END IF;
   RETURN;
-END Ad_Synchronize]]>
+END Ad_Synchronize
 </body>
-</function>
-</database>
\ No newline at end of file
+    </function>
+  </database>
--- a/database/model/functions/AD_TABLE_IMPORT.xml	Tue Nov 20 13:31:01 2007 +0000
+++ b/database/model/functions/AD_TABLE_IMPORT.xml	Tue Nov 20 16:27:14 2007 +0000
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
-<database name="FUNCTION AD_TABLE_IMPORT">
-<function name="AD_TABLE_IMPORT">
-<parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
-<parameter name="p_AD_Table_ID" type="NUMERIC" mode="in"/>
-<body><![CDATA[
+  <database name="FUNCTION AD_TABLE_IMPORT">
+    <function name="AD_TABLE_IMPORT" type="NULL">
+      <parameter name="p_PInstance_ID" type="NUMERIC" mode="in"/>
+      <parameter name="p_AD_Table_ID" type="NUMERIC" mode="in"/>
+      <body>
   /*************************************************************************
   * The contents of this file are subject to the Compiere License
   * Version 2.5.0 ("License"); You may not use this file except in
@@ -13,7 +13,7 @@
   * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   * implied. See the License for the specific language governing rights
   * and limitations under the License.
-  * The Original Code is  Compiere  ERP &  Business Solution
+  * The Original Code is  Compiere  ERP &amp;  Business Solution
   * The Initial Developer of the Original Code is Jorg Janke  and ComPiere,
   Inc.
   * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke,
@@ -116,7 +116,7 @@
       v_IsUpdateable:='Y';
       v_varchar2:=Cur_Column.DATA_DEFAULT;
       v_varchar2:=SUBSTR(v_varchar2, 1, 2000) ;
-      IF(INSTR(v_varchar2, '''')<>0) THEN
+      IF(INSTR(v_varchar2, '''')&lt;&gt;0) THEN
         v_varchar2:=SUBSTR(SUBSTR(v_varchar2, 2, 1999), 1, INSTR(SUBSTR(v_varchar2, 2, 1999), '''') -1) ;
       ELSE
         v_varchar2:=TRIM(REPLACE(REPLACE(v_varchar2, 'now()', '@#Date@'), CHR(10), '')) ;
@@ -200,7 +200,7 @@
         END IF;
       END IF;
       v_columnName:=InitCap(Cur_Column.Column_Name) ;
-      IF(INSTR(v_columnName, '_')<>0 AND INSTR(v_columnName, '_')<5) THEN
+      IF(INSTR(v_columnName, '_')&lt;&gt;0 AND INSTR(v_columnName, '_')&lt;5) THEN
         v_columnName:=UPPER(SUBSTR(v_columnName, 1, INSTR(v_columnName, '_'))) ||SUBSTR(v_columnName, INSTR(v_columnName, '_') +1, 40) ;
       END IF;
       IF(v_columnName LIKE '%_Id') THEN
@@ -244,7 +244,7 @@
     END LOOP; --  All new columns
     -- Summary info
     v_Message:='@Crea