518: log_message('FullLoadFlag to be default by program');
519: end if;
520: else
521: log_message('Incorrect value for Full Load flag');
522: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_FULLLOADFLAG');
523: raise ExTerminateProgram;
524: end if;
525:
526: if v_debug then
632:
633: if dbms_sql.is_open(v_insert_cursor) THEN
634: dbms_sql.close_cursor(v_insert_cursor);
635: end if;
636: ERRBUF := FND_MESSAGE.GET;
637: RETCODE := G_ERROR;
638: log_message(ERRBUF);
639:
640: when others then
702:
703:
704: if v_exception_name is null then
705: log_message('exception definition not found');
706: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_EXCNOTFOUND');
707: raise ExTerminateProgram;
708: end If;
709:
710:
838: num1 := num1 + 1;
839: --All these this should be checked in UI itself
840: if ColumnNameList(i) is null then
841: --Columname should not be null for calculation and select attribute
842: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_COLNAMENULL');
843: raise ExTerminateProgram;
844: elsif SeqNumList(i) is null then
845: --SeqNumber should not be null for calculation and select attribute
846: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_SQNUMNULL');
842: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_COLNAMENULL');
843: raise ExTerminateProgram;
844: elsif SeqNumList(i) is null then
845: --SeqNumber should not be null for calculation and select attribute
846: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_SQNUMNULL');
847: raise ExTerminateProgram;
848:
849: end If;
850:
929: i_varchar2Counter := i_varchar2Counter + 1;
930: l_colStr := 'USER_ATTRIBUTE'||to_char(i_varchar2Counter);
931: else
932: --Datatype not correct
933: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_INCORRECT_DATA_TYPE');
934: raise ExTerminateProgram;
935:
936: end if;
937:
955: if AttributeTypeList(i) = 'FILTER' Then
956:
957: if CompValueList1(i) is null AND DateFilterFlagList(i) <> 'R' then
958: --Parameter should not be null for filter unless it's a date filter set to rolling time period
959: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_PARAM_VALUE_NULL');
960: raise ExTerminateProgram;
961: end if;
962:
963: if DataTypeList(i) in ('DATE' ,'DATETIME' )then
1036: end if;
1037:
1038: else
1039: --Datatype not correct
1040: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_INCORRECT_DATA_TYPE');
1041: raise ExTerminateProgram;
1042: end if;
1043:
1044:
1061:
1062: if ((CompValueList1(i) is null and RollingNumberList(i) NOT IN (9,10))
1063: and (OpColumnNameList(i) is null)) then
1064: --Parameter should not be null for Simple Condition
1065: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_PARAM_VALUE_NULL');
1066: raise ExTerminateProgram;
1067: end if;
1068:
1069: --bug# 2410159
1143: CompValueList1(i) := ''''|| replace(CompValueList1(i), '''', '''''') ||'''';
1144:
1145: else
1146: --Datatype not correct
1147: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_INCORRECT_DATA_TYPE');
1148: raise ExTerminateProgram;
1149:
1150: end if;
1151:
1286:
1287: -- If Group by,Include group by statemnet else include trandsaction ids
1288: -- in select statement and as well as in insert and values statement
1289: if vSelectStmt is null then
1290: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_SELECT_NULL');
1291: raise ExTerminateProgram;
1292: end if;
1293:
1294: if vGroupByFlag = 'Y' then
1486: if DataTypeList(columnCounter) in ('DATE','DATETIME') then
1487: dateCounter := dateCounter + 1;
1488: if dateCounter > 7 then
1489: --Number of date column should not be more then 7
1490: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_DATE_COL_EXCEEDED');
1491: raise ExTerminateProgram;
1492: end if;
1493: DBMSSQLStep(dateCounter, 'DATE' , 'DEFINE_ARRAY',lCounterTemp);
1494: elsif DataTypeList(columnCounter) in ( 'NUMBER','AGGREGATE') then
1494: elsif DataTypeList(columnCounter) in ( 'NUMBER','AGGREGATE') then
1495: numberCounter := numberCounter + 1;
1496: if numberCounter > 10 then
1497: --Number of Number column should not be more then 10
1498: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_NUMBER_COL_EXCEEDED');
1499: raise ExTerminateProgram;
1500: end if;
1501: DBMSSQLStep(numberCounter, 'NUMBER' , 'DEFINE_ARRAY',lCounterTemp);
1502: elsif DataTypeList(columnCounter) = 'VARCHAR2' then
1502: elsif DataTypeList(columnCounter) = 'VARCHAR2' then
1503: varchar2Counter := varchar2Counter + 1;
1504: if varchar2Counter > 20 then
1505: --Number of varchar2 column should not be more then 20
1506: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_VARCHAR2_COL_EXCEEDED');
1507: raise ExTerminateProgram;
1508: end if;
1509: DBMSSQLStep(varchar2Counter, 'VARCHAR2' , 'DEFINE_ARRAY',lCounterTemp);
1510: else
1508: end if;
1509: DBMSSQLStep(varchar2Counter, 'VARCHAR2' , 'DEFINE_ARRAY',lCounterTemp);
1510: else
1511: --Datatype not correct
1512: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_INCORRECT_DATA_TYPE');
1513: raise ExTerminateProgram;
1514:
1515: end if;
1516:
1716: --this doesn't work
1717: --DBMS_SQL.COLUMN_VALUE(v_fetch_cursor,columnCounter,getVarcharArray(varchar2Counter) );
1718: else
1719: --Datatype not correct
1720: FND_MESSAGE.SET_NAME('MSC', 'MSC_UDE_INCORRECT_DATA_TYPE');
1721: raise ExTerminateProgram;
1722: end if;
1723: lCounterTemp := lCounterTemp + 1;
1724: end if;
2040: end if;
2041:
2042: end loop; -- columnCounter loop
2043:
2044: fnd_message.set_name('MSC','MSC_UDE_NTFBOD');
2045: fnd_message.set_token('EXCEPTION',v_exception_name);
2046: fnd_message.set_token('CREATION_DATE',vLastUpdateDate);
2047:
2048: vNtfBodyText := '
'||fnd_message.get||''||
2041:
2042: end loop; -- columnCounter loop
2043:
2044: fnd_message.set_name('MSC','MSC_UDE_NTFBOD');
2045: fnd_message.set_token('EXCEPTION',v_exception_name);
2046: fnd_message.set_token('CREATION_DATE',vLastUpdateDate);
2047:
2048: vNtfBodyText := '
'||fnd_message.get||''||
2049: '