DBA Data[Home] [Help]

APPS.MSC_CL_PRE_PROCESS dependencies on MSC_ST_DEMAND_CLASSES

Line 1048: ||' on MSC_ST_DEMAND_CLASSES '

1044: application_short_name => 'MSC',
1045: statement_type => AD_DDL.CREATE_INDEX,
1046: statement =>
1047: 'create index MSC_ST_DMD_CLASS_N1_'||v_instance_code
1048: ||' on MSC_ST_DEMAND_CLASSES '
1049: ||'(sr_instance_code,demand_class,company_name) '
1050: ||' STORAGE (INITIAL 100K NEXT 1M PCTINCREASE 0) ',
1051: object_name =>'MSC_ST_DMD_CLASS_N1_'||v_instance_code);
1052:

Line 1060: msc_analyse_tables_pk.analyse_table( 'MSC_ST_DEMAND_CLASSES', v_instance_id, -1);

1056: WHEN OTHERS THEN
1057: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,'Error creating Index MSC_ST_DMD_CLASS_N1_'||v_instance_code||'. Error:'||substr(SQLERRM,1,240));
1058: END;
1059:
1060: msc_analyse_tables_pk.analyse_table( 'MSC_ST_DEMAND_CLASSES', v_instance_id, -1);
1061:
1062: END IF;
1063:
1064: IF v_tp_enabled = SYS_YES THEN

Line 5736: FROM msc_st_demand_classes

5732: ex_logging_err EXCEPTION;
5733:
5734: CURSOR c1(p_batch_id NUMBER) IS
5735: SELECT rowid
5736: FROM msc_st_demand_classes
5737: WHERE process_flag IN (G_IN_PROCESS,G_ERROR_FLG)
5738: AND sr_instance_code = v_instance_code
5739: AND batch_id = p_batch_id;
5740:

Line 5753: --Validation check for the table MSC_ST_DEMAND_CLASSES

5749: IF lv_return <> 0 THEN
5750: RAISE ex_logging_err;
5751: END IF;
5752:
5753: --Validation check for the table MSC_ST_DEMAND_CLASSES
5754:
5755: --Duplicate records check for the records whose source is other than XML
5756: --Different SQL is used because in XML we can identify the latest records
5757: --whereas in batch load we cannot.

Line 5761: 'UPDATE msc_st_demand_classes msd1 '

5757: --whereas in batch load we cannot.
5758:
5759: v_sql_stmt := 01;
5760: lv_sql_stmt :=
5761: 'UPDATE msc_st_demand_classes msd1 '
5762: ||' SET process_flag = '||G_ERROR_FLG||','
5763: ||' error_text = '||''''||lv_message_text||''''
5764: ||' WHERE EXISTS ( SELECT 1 FROM msc_st_demand_classes msd2 '
5765: ||' WHERE msd2.sr_instance_code = msd1.sr_instance_code'

Line 5764: ||' WHERE EXISTS ( SELECT 1 FROM msc_st_demand_classes msd2 '

5760: lv_sql_stmt :=
5761: 'UPDATE msc_st_demand_classes msd1 '
5762: ||' SET process_flag = '||G_ERROR_FLG||','
5763: ||' error_text = '||''''||lv_message_text||''''
5764: ||' WHERE EXISTS ( SELECT 1 FROM msc_st_demand_classes msd2 '
5765: ||' WHERE msd2.sr_instance_code = msd1.sr_instance_code'
5766: ||' AND msd2.demand_class = msd1.demand_class'
5767: ||' AND NVL(msd2.company_name, '||''''||NULL_CHAR||''''||') = '
5768: ||' NVL(msd1.company_name, '||''''||NULL_CHAR||''''||')'

Line 5788: 'UPDATE msc_st_demand_classes msd1 '

5784:
5785: --Duplicate records check for the records whose source is XML
5786: v_sql_stmt := 02;
5787: lv_sql_stmt :=
5788: 'UPDATE msc_st_demand_classes msd1 '
5789: ||' SET process_flag = '||G_ERROR_FLG||','
5790: ||' error_text = '||''''||lv_message_text||''''
5791: ||' WHERE message_id < ( SELECT max(message_id) '
5792: ||' FROM msc_st_demand_classes msd2'

Line 5792: ||' FROM msc_st_demand_classes msd2'

5788: 'UPDATE msc_st_demand_classes msd1 '
5789: ||' SET process_flag = '||G_ERROR_FLG||','
5790: ||' error_text = '||''''||lv_message_text||''''
5791: ||' WHERE message_id < ( SELECT max(message_id) '
5792: ||' FROM msc_st_demand_classes msd2'
5793: ||' WHERE msd2.sr_instance_code = msd1.sr_instance_code'
5794: ||' AND msd2.demand_class = msd1.demand_class'
5795: ||' AND NVL(msd2.company_name, '||''''||NULL_CHAR||''''||') = '
5796: ||' NVL(msd1.company_name, '||''''||NULL_CHAR||''''||')'

Line 5832: 'UPDATE msc_st_demand_classes '

5828: FROM DUAL;
5829:
5830: v_sql_stmt := 04;
5831: lv_sql_stmt :=
5832: 'UPDATE msc_st_demand_classes '
5833: ||' SET batch_id = :lv_batch_id '
5834: ||' WHERE process_flag IN ('||G_IN_PROCESS||','||G_ERROR_FLG||')'
5835: ||' AND sr_instance_code = :v_instance_code'
5836: ||' AND NVL(batch_id,'||NULL_VALUE||') = '||NULL_VALUE

Line 5855: UPDATE msc_st_demand_classes

5851: CLOSE c1;
5852:
5853: v_sql_stmt := 05;
5854: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
5855: UPDATE msc_st_demand_classes
5856: SET st_transaction_id = msc_st_demand_classes_s.NEXTVAL,
5857: refresh_id = v_refresh_id,
5858: last_update_date = v_current_date,
5859: last_updated_by = v_current_user,

Line 5856: SET st_transaction_id = msc_st_demand_classes_s.NEXTVAL,

5852:
5853: v_sql_stmt := 05;
5854: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
5855: UPDATE msc_st_demand_classes
5856: SET st_transaction_id = msc_st_demand_classes_s.NEXTVAL,
5857: refresh_id = v_refresh_id,
5858: last_update_date = v_current_date,
5859: last_updated_by = v_current_user,
5860: creation_date = v_current_date,

Line 5871: p_token_value1 => 'MSC_ST_DEMAND_CLASSES');

5867: p_error_code => 'MSC_PP_NO_DELETION',
5868: p_message_text => lv_message_text,
5869: p_error_text => lv_error_text,
5870: p_token1 => 'TABLE_NAME',
5871: p_token_value1 => 'MSC_ST_DEMAND_CLASSES');
5872:
5873: -- Deletion is not allowed for this table
5874: v_sql_stmt := 06;
5875: lv_sql_stmt :=

Line 5876: 'UPDATE msc_st_demand_classes '

5872:
5873: -- Deletion is not allowed for this table
5874: v_sql_stmt := 06;
5875: lv_sql_stmt :=
5876: 'UPDATE msc_st_demand_classes '
5877: ||' SET process_flag = '||G_ERROR_FLG||','
5878: ||' error_text = '||''''||lv_message_text||''''
5879: ||' WHERE deleted_flag = '||SYS_YES
5880: ||' AND process_flag = '||G_IN_PROCESS

Line 5909: 'UPDATE msc_st_demand_classes'

5905: -- Error out records where demand_class or meaning is NULL
5906:
5907: v_sql_stmt := 07;
5908: lv_sql_stmt :=
5909: 'UPDATE msc_st_demand_classes'
5910: ||' SET process_flag = '||G_ERROR_FLG||','
5911: ||' error_text = '||''''||lv_message_text||''''
5912: ||' WHERE (NVL(demand_class, '||''''||NULL_CHAR||''''||') '
5913: ||' = '||''''||NULL_CHAR||''''

Line 5934: p_token_value1 => 'MSC_ST_DEMAND_CLASSES');

5930: p_error_code => 'MSC_PP_NO_UPDATION',
5931: p_message_text => lv_message_text,
5932: p_error_text => lv_error_text,
5933: p_token1 => 'TABLE_NAME',
5934: p_token_value1 => 'MSC_ST_DEMAND_CLASSES');
5935:
5936:
5937: -- Error out the record if same demand class already exists in ODS
5938: -- As we do not allow demand_class incremental update

Line 5944: 'UPDATE msc_st_demand_classes mstd'

5940:
5941: -- bug# 3807591
5942: /* v_sql_stmt := 08;
5943: lv_sql_stmt :=
5944: 'UPDATE msc_st_demand_classes mstd'
5945: ||' SET mstd.process_flag = '||G_ERROR_FLG||','
5946: ||' mstd.error_text = '||''''||lv_message_text||''''
5947: ||' WHERE mstd.batch_id = :lv_batch_id'
5948: ||' AND mstd.sr_instance_code = :v_instance_code'

Line 5984: (p_table_name => 'MSC_ST_DEMAND_CLASSES',

5980: lv_where_str := ' AND NVL(deleted_flag,'||NULL_VALUE||') '
5981: ||' NOT IN(1,2)';
5982:
5983: lv_return := MSC_ST_UTIL.LOG_ERROR
5984: (p_table_name => 'MSC_ST_DEMAND_CLASSES',
5985: p_instance_code => v_instance_code,
5986: p_row => lv_column_names,
5987: p_severity => G_SEV_WARNING,
5988: p_message_text => lv_message_text,

Line 6021: (p_table_name => 'MSC_ST_DEMAND_CLASSES',

6017: lv_where_str := ' AND NVL(enabled_flag,'||NULL_VALUE||') '
6018: ||' NOT IN(1,2)';
6019:
6020: lv_return := MSC_ST_UTIL.LOG_ERROR
6021: (p_table_name => 'MSC_ST_DEMAND_CLASSES',
6022: p_instance_code => v_instance_code,
6023: p_row => lv_column_names,
6024: p_severity => G_SEV_WARNING,
6025: p_message_text => lv_message_text,

Line 6056: 'UPDATE msc_st_demand_classes'

6052:
6053: v_sql_stmt := 08;
6054:
6055: lv_sql_stmt :=
6056: 'UPDATE msc_st_demand_classes'
6057: ||' SET process_flag = '||G_ERROR_FLG||','
6058: ||' error_text = '||''''||lv_message_text||''''
6059: ||' WHERE NVL(from_date,SYSDATE-365000 ) '
6060: ||' > NVL(to_date, SYSDATE+365000) '

Line 6089: (p_table_name => 'MSC_ST_DEMAND_CLASSES',

6085:
6086:
6087: -- Set the process flag as Valid and populate instance_id
6088: lv_return := MSC_ST_UTIL.SET_PROCESS_FLAG
6089: (p_table_name => 'MSC_ST_DEMAND_CLASSES',
6090: p_instance_id => v_instance_id,
6091: p_instance_code => v_instance_code,
6092: p_process_flag => G_VALID,
6093: p_error_text => lv_error_text,

Line 6105: (p_table_name => 'MSC_ST_DEMAND_CLASSES',

6101: -- At the end calling the LOG_ERROR for logging all
6102: -- errored out records.
6103:
6104: lv_return := MSC_ST_UTIL.LOG_ERROR
6105: (p_table_name => 'MSC_ST_DEMAND_CLASSES',
6106: p_instance_code => v_instance_code,
6107: p_row => lv_column_names,
6108: p_severity => G_SEV_ERROR,
6109: p_message_text => NULL,

Line 6146: ||' FROM MSC_ST_DEMAND_CLASSES mstd'

6142: ||' mstd.last_update_date,'
6143: ||' mstd.last_updated_by,'
6144: ||' mstd.creation_date,'
6145: ||' mstd.created_by '
6146: ||' FROM MSC_ST_DEMAND_CLASSES mstd'
6147: ||' WHERE mstd.batch_id = :lv_batch_id'
6148: ||' AND mstd.sr_instance_code = :v_instance_code'
6149: ||' AND mstd.process_flag = '||G_VALID ;
6150:

Line 37724: SET st_transaction_id = msc_st_demand_classes_s.NEXTVAL,

37720:
37721: v_sql_stmt := 05;
37722: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
37723: UPDATE msc_st_reservations
37724: SET st_transaction_id = msc_st_demand_classes_s.NEXTVAL,
37725: refresh_id = v_refresh_id,
37726: last_update_date = v_current_date,
37727: last_updated_by = v_current_user,
37728: creation_date = v_current_date,

Line 55945: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_DEMAND_CLASSES');

55941: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_GROUP_COMPANIES');
55942: END IF;
55943:
55944: IF v_dmd_class_enabled = SYS_YES THEN
55945: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_DEMAND_CLASSES');
55946: IF lv_count > 0 Then
55947: prec.demand_class_flag:= SYS_YES;
55948: End IF;
55949: END IF;