Solved Bug ID [ 1618468 ] ORA-00933 on Import BPartner

This commit is contained in:
Carlos Ruiz 2006-12-19 01:09:03 +00:00
parent 05e9dd28ac
commit 6e8cba19df
1 changed files with 15 additions and 8 deletions

View File

@ -93,7 +93,7 @@ public class ImportBPartner extends SvrProcess
+ " CreatedBy = COALESCE (CreatedBy, 0)," + " CreatedBy = COALESCE (CreatedBy, 0),"
+ " Updated = COALESCE (Updated, SysDate)," + " Updated = COALESCE (Updated, SysDate),"
+ " UpdatedBy = COALESCE (UpdatedBy, 0)," + " UpdatedBy = COALESCE (UpdatedBy, 0),"
+ " I_ErrorMsg = NULL," + " I_ErrorMsg = ' ',"
+ " I_IsImported = 'N' " + " I_IsImported = 'N' "
+ "WHERE I_IsImported<>'Y' OR I_IsImported IS NULL"); + "WHERE I_IsImported<>'Y' OR I_IsImported IS NULL");
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
@ -242,6 +242,13 @@ public class ImportBPartner extends SvrProcess
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
log.fine("Set Interest Area=" + no); log.fine("Set Interest Area=" + no);
// Value is mandatory error
sql = new StringBuffer ("UPDATE I_BPartner "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Value is mandatory, ' "
+ "WHERE Value IS NULL "
+ " AND I_IsImported<>'Y'").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName());
log.config("Value is mandatory=" + no);
commit(); commit();
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -279,7 +286,7 @@ public class ImportBPartner extends SvrProcess
{ {
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Insert BPartner") .append("'Cannot Insert BPartner, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -313,7 +320,7 @@ public class ImportBPartner extends SvrProcess
{ {
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Update BPartner") .append("'Cannot Update BPartner, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -364,7 +371,7 @@ public class ImportBPartner extends SvrProcess
noInsert--; noInsert--;
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Insert Location") .append("'Cannot Insert Location, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -386,7 +393,7 @@ public class ImportBPartner extends SvrProcess
noInsert--; noInsert--;
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Insert BPLocation") .append("'Cannot Insert BPLocation, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -406,7 +413,7 @@ public class ImportBPartner extends SvrProcess
noInsert--; noInsert--;
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("BP of User <> BP") .append("'BP of User <> BP, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -445,7 +452,7 @@ public class ImportBPartner extends SvrProcess
noInsert--; noInsert--;
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Update BP Contact") .append("'Cannot Update BP Contact, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;
@ -482,7 +489,7 @@ public class ImportBPartner extends SvrProcess
noInsert--; noInsert--;
sql = new StringBuffer ("UPDATE I_BPartner i " sql = new StringBuffer ("UPDATE I_BPartner i "
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||") + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||")
.append("Cannot Insert BPContact") .append("'Cannot Insert BPContact, ' ")
.append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID()); .append("WHERE I_BPartner_ID=").append(impBP.getI_BPartner_ID());
DB.executeUpdate(sql.toString(), get_TrxName()); DB.executeUpdate(sql.toString(), get_TrxName());
continue; continue;