--DELETE EXISTING RECORD FROM ITM2MENU
DELETE FROM ITM2MENU WHERE WIN_NAME = 'w_palletprc';

--INSERT NEW RECORD INTO ITM2MENU TABLE
Insert into ITM2MENU (APPLICATION,LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4,LEVEL_5,WIN_NAME,DESCR,COMMENTS,MENU_PATH,ICON_PATH,CLOSE_ICON,OPEN_ICON,OBJ_TYPE,CHG_DATE,CHG_TERM,CHG_USER) values ('SFA',1,54,0,0,0,'w_palletprc','Pallet No Generation','Pallet No Generation','SFA.1.54.0.0.0','e12_logo.gif',null,null,'P','05/jun/12','Mahesh','BASE      ');

--DELETE EXISTING RECORD FROM TRANSETUP
DELETE FROM TRANSETUP WHERE TRAN_WINDOW = 'w_palletprc';

--INSERT NEW RECORD INTO TRANSETUP TABLE
Insert into TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,SALES_PERS_ACC_COL,CUST_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_COL,EMP_ACC_COL,WORKFLOW_OPT,TRAN_ID__FROM,TRAN_ID__TO,MULTITIRE_OPT,REF_SER,VIEW_MODE,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,CUSTOM_PREVIEW_OBJ,CHILDDATA_ARGOPT,IGNOREERRLIST_ONLOAD,EDIT_TMPLT,WRKFLW_INIT,FORMAL_ARGS,EDIT_OPT,AUDIT_TRAIL_OPT,EDITTAX,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,TRANSFER_MODE,RATE_COL,QTY_COL,RCP_CACHE_STATUS,PRINT_CONTROL,ITEM_SER_ACC_CODE,PROFILE_ID__RES,PERIOD_OPTION,TRAN_COMPL_MSG,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,START_FORM,ISATTACHMENT,ALLOW_ATTACH) values ('w_palletprc','2','2','A','35167200,seq10',null,null,null,null,null,'N','05/jun/12','Mahesh    ','Base           ','0',null,null,'Y','N',null,null,null,null,'pallet_no',null,null,null,null,null,'pallet_no',null,null,null,null,null,null,null,null,'0',null,null,null,'M-PALT',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'M',null,null,null,null,null,null,null);

--DELETE EXISTING RECORD FROM OBJ_FORMS
DELETE FROM OBJ_FORMS WHERE WIN_NAME = 'w_palletprc';

--INSERT NEW RECORD INTO OBJ_FORMS TABLE
Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,AUTO_ACCEPT_SCAN,SCAN_METADATA,SCAN_FLAG,SCR_FLAG,PROPERTY_INFO,EXT_COM,EXT_METADATA,EXT_SETUP,AFTER_SAVE,COLUMN_ON_SAVE,SCAN_DELIMITER,AUTO_ACCEPT_WEIGHDATA,RATE_COL,QTY_COL,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,ASSISTED_MODE) values ('w_palletprc','Process',null,null,null,null,null,null,'1',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);

--DELETE EXISTING RECORD FROM OBJ_ACTIONS
DELETE FROM OBJ_ACTIONS WHERE OBJ_NAME = 'palletprc';

--INSERT NEW RECORD INTO OBJ_ACTIONS TABLE
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,RIGHTS_CHAR,INTERACTIVE,SERVICE_CODE,DESCRIPTION,TITLE,IMAGE,ACTION_TYPE,FORM_NO,SERVICE_HANDLER,PLACEMENT,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER) values ('palletprc',1,'R','a','process','Action Button for processing the data','Process',null,'U','1',null,null,null,null,null,null);

--DELETE EXISTING RECORD FROM SYSTEM_EVENTS
DELETE FROM SYSTEM_EVENTS WHERE OBJ_NAME = 'palletprc' ;

--INSERT NEW RECORDS INTO SYSTEM_EVENTS TABLE
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('palletprc','pre_validate','1','prv_default_ejb',null,'05/jun/12','Mahesh    ','BASE','2','0','EJB','CartonNoGenIC',null);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('palletprc','process','1','prc_pallet_no_gen',null,'05/jun/12','Mahesh    ','Base','2','0','EJB','CartonNoGenPrc',null);

--DELETE EXISTING RECORD FROM SYSTEM_EVENT_SERVICES
DELETE FROM SYSTEM_EVENT_SERVICES WHERE SERVICE_CODE = 'prv_default_ejb' OR SERVICE_CODE = 'prc_pallet_no_gen';

--INSERT NEW RECORDS INTO SYSTEM_EVENT_SERVICES TABLE
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM) values ('prc_pallet_no_gen','Process','http://localhost:9090/axis/services/ValidatorService',null,'process','String','S',null,null,'05/jun/12','Mahesh    ','Mahesh');
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM) values ('prv_default_ejb',null,'http://localhost:9090/axis/services/ProcessService',null,'wfValData','String','S',null,null,'05/jun/12','Subrata   ','Subu');

--DELETE EXISTING RECORD FROM SYSTEM_SERVICE_ARGS
DELETE FROM SYSTEM_SERVICE_ARGS WHERE SERVICE_CODE = 'prv_default_ejb' OR SERVICE_CODE = 'prc_pallet_no_gen';

--INSERT NEW RECORDS INTO SYSTEM_EVENT_ARGS TABLE
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',1,'COMPONENT_TYPE','I','Component Type','C.String',null,'05/jun/12','Mahesh    ','BASE','EJB');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',2,'COMPONENT_NAME','I','Component Name','C.String',null,'05/jun/12','Mahesh    ','BASE','CartonNoGenPrc');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',3,'XML_DATA_1','I','XML data of form no 1','S',null,'05/jun/12','Mahesh    ','BASE',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',4,'XML_DATA__ALL','I','XML data of form no 1','S',null,'05/jun/12','Mahesh    ','BASE',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',5,'WINDOW_NAME','I','Object Context','S',null,'05/jun/12','Mahesh    ','BASE','w_palletprc');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_pallet_no_gen',6,'XTRA_PARAMS','I','Extra Arguments','S',null,'05/jun/12','Mahesh    ','BASE',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',1,'COMPONENT_TYPE','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',2,'COMPONENT_NAME','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',3,'XML_DATA','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',4,'XML_DATA_1','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',5,'XML_DATA_ALL','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',6,'OBJ_CONTEXT','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',7,'EDIT_FLAG','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',8,'XTRA_PARAMS','I',null,'S',null,'05/jun/12','Manohar   ','Manohar',null);

--DELETE EXISTING RECORD FROM MESSAGES
DELETE FROM MESSAGES WHERE MSG_NO = 'NOTANUMBR1' OR MSG_NO = 'PRCSUCCESS' OR MSG_NO = 'VTPNOEMPTY';

--INSERT NEW RECORDS INTO MESSAGES TABLE 
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('NOTANUMBR1','Not a Valid Number!','Please Enter a valid number','E','Y',null,null,null,null,null,null,null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('PRCSUCCESS','Process Completed','Process Completed Successfully.','P','Y',null,null,null,'05/jun/12','Mahesh    ','BASE           ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VTPNOEMPTY','Empty no of Pallet','Please Enter the no of Pallet','E','Y',null,null,null,null,null,null,null,null);
