Insert into GENMST (FLD_NAME,MOD_NAME,DESCR,ERROR_CD,BLANK_OPT,FLD_TYPE,FLD_MIN,FLD_MAX,VAL_TYPE,CHG_DATE,CHG_USER,CHG_TERM,VAL_TABLE,SQL_INPUT,FLD_WIDTH,UDF_USAGE_1,UDF_USAGE_2,UDF_USAGE_3,VAL_STAGE,OBJ_NAME,FORM_NO) values ('ITEM_CODE','W_RND_EXPR','ITEM CODE VALIDATION','VUITMADDRI','N','C','SELECT COUNT(1) FROM DUAL WHERE 1 <= (SELECT COUNT(1)  FROM  EXPR_ISS_HDR A, EXPR_ISS_DET B WHERE A.EXPR_ISS_NO=B.EXPR_ISS_NO AND  A.EXPR_NO= ?  AND A.CONFIRM=''N'' AND B.ITEM_CODE= ? )
','1','Q',to_date('23-APR-18','DD-MON-RR'),'BASE      ','BASE           ',null,':0.EXPR_NO,:0.ITEM_CODE',2,null,null,null,null,null,' ');

Insert into GENMST (FLD_NAME,MOD_NAME,DESCR,ERROR_CD,BLANK_OPT,FLD_TYPE,FLD_MIN,FLD_MAX,VAL_TYPE,CHG_DATE,CHG_USER,CHG_TERM,VAL_TABLE,SQL_INPUT,FLD_WIDTH,UDF_USAGE_1,UDF_USAGE_2,UDF_USAGE_3,VAL_STAGE,OBJ_NAME,FORM_NO) values ('BOM_CODE','W_RND_EXPR','ITEM ALREADY CONFIRM','VUAITMCON','N','C','SELECT COUNT(1) FROM DUAL WHERE 0 < (SELECT COUNT(1)  FROM  EXPR_ISS_HDR A, EXPR_ISS_DET B WHERE A.EXPR_ISS_NO=B.EXPR_ISS_NO AND  A.EXPR_NO= ?  AND A.CONFIRM=''Y'' AND B.ITEM_CODE= ? )','1','Q',to_date('23-APR-18','DD-MON-RR'),'BASE      ','BASE           ',null,':0.EXPR_NO,:0.ITEM_CODE',2,null,null,null,null,null,' ');

UPDATE POPHELP SET SQL_STR='select item_code, descr from item where (item_code like ''R%'' or item_code like ''BD%'' or item_code like ''BF%'' or item_code like ''P%'' or item_code like ''LB%'' or item_code like ''E%'' or item_code like ''2%'' or item_code like ''3%'' or item_code like ''4%'' ) and (item_code not like ''RV%'' and item_code not like ''PAV%'')  and (descr LIKE ''?%'' or ITEM_CODE like ''?%'') and active = ''Y'' and nvl(stop_business,''N'')=''N''',SQL_INPUT=':item_code,:item_code
' WHERE MOD_NAME = 'W_RND_EXPR' AND FIELD_NAME='ITEM_CODE';