DBA Data[Home] [Help]

APPS.MSD_CL_PRE_PROCESS dependencies on MSD_ST_TIME

Line 183: ||' FROM msd_st_time mst '

179: ||' program_id , '
180: ||' program_update_date '
181: ||' FROM msc_st_trading_partners mstp'
182: ||' WHERE EXISTS ( SELECT 1'
183: ||' FROM msd_st_time mst '
184: ||' WHERE mstp.calendar_code=mst.calendar_code '
185: ||' AND mst.calendar_type='||G_MFG_CAL
186: ||' AND mstp.sr_instance_code=mst.sr_instance_code'
187: ||' UNION '

Line 4655: | DESCRIPTION : This function insert records for msd_st_time |

4651: END LOAD_MFG_FORECAST ;
4652:
4653:
4654: /*==========================================================================+
4655: | DESCRIPTION : This function insert records for msd_st_time |
4656: | for manufacturing calendar |
4657: +==========================================================================*/
4658: PROCEDURE LOAD_MFG_TIME (ERRBUF OUT NOCOPY VARCHAR,
4659: RETCODE OUT NOCOPY NUMBER,

Line 4672: from msd_st_time

4668: lv_cal_end_date DATE;
4669:
4670: Cursor C is
4671: select max(day),min(day)
4672: from msd_st_time
4673: where calendar_code=p_calendar_code
4674: and instance=p_instance_id;
4675:
4676: BEGIN

Line 4681: ' INSERT INTO MSD_ST_TIME'

4677:
4678:
4679: v_sql_stmt := 01;
4680: lv_sql_stmt :=
4681: ' INSERT INTO MSD_ST_TIME'
4682: ||' (INSTANCE , '
4683: ||' CALENDAR_TYPE, '
4684: ||' CALENDAR_CODE, '
4685: ||' SEQ_NUM, '

Line 4807: lv_batch_id msd_st_time.batch_id%TYPE;

4803: Fiscal_Month_Cur Fiscal_Month_Cursor ;
4804:
4805: lb_rowid RowidTab;
4806: lv_sql_stmt VARCHAR2(4000);
4807: lv_batch_id msd_st_time.batch_id%TYPE;
4808: lv_message_text msc_errors.error_text%TYPE;
4809: lv_error_text VARCHAR2(250);
4810: lv_from_date DATE ;
4811: lv_to_date DATE ;

Line 4838: FROM msd_st_time

4834: lv_column_names VARCHAR2(5000);
4835:
4836: CURSOR c1(p_batch_id NUMBER)IS
4837: SELECT rowid
4838: FROM msd_st_time
4839: WHERE process_flag IN (G_IN_PROCESS,G_ERROR_FLG)
4840: AND calendar_type = G_FISCAL_CAL
4841: AND sr_instance_code = p_instance_code
4842: AND batch_id = p_batch_id;

Line 4845: SELECT distinct calendar_code FROM msd_st_time

4841: AND sr_instance_code = p_instance_code
4842: AND batch_id = p_batch_id;
4843:
4844: CURSOR c2 IS
4845: SELECT distinct calendar_code FROM msd_st_time
4846: WHERE calendar_type = G_FISCAL_CAL
4847: AND instance = p_instance_id
4848: AND process_flag = G_VALID;
4849:

Line 4888: 'UPDATE msd_st_time'

4884: END IF;
4885:
4886: v_sql_stmt := 05;
4887: lv_sql_stmt :=
4888: 'UPDATE msd_st_time'
4889: ||' SET process_flag = '||G_ERROR_FLG||','
4890: ||' error_text = '||''''||lv_message_text||''''
4891: ||' WHERE calendar_type not in ('||G_COMPOSITE_CAL||','||G_FISCAL_CAL||')'
4892: ||' AND process_flag = '||G_IN_PROCESS

Line 4913: 'UPDATE msd_st_time'

4909:
4910: v_sql_stmt := 03;
4911:
4912: lv_sql_stmt :=
4913: 'UPDATE msd_st_time'
4914: ||' SET batch_id = :lv_batch_id '
4915: ||' WHERE process_flag IN ('||G_IN_PROCESS||','||G_ERROR_FLG||')'
4916: ||' AND sr_instance_code = :lv_instance_code'
4917: ||' AND calendar_type ='||G_FISCAL_CAL

Line 4937: UPDATE msd_st_time

4933: CLOSE c1;
4934:
4935: v_sql_stmt := 04;
4936: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
4937: UPDATE msd_st_time
4938: SET st_transaction_id = msd_st_time_s.NEXTVAL,
4939: last_update_date = lv_current_date,
4940: last_updated_by = lv_current_user,
4941: creation_date = lv_current_date,

Line 4938: SET st_transaction_id = msd_st_time_s.NEXTVAL,

4934:
4935: v_sql_stmt := 04;
4936: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
4937: UPDATE msd_st_time
4938: SET st_transaction_id = msd_st_time_s.NEXTVAL,
4939: last_update_date = lv_current_date,
4940: last_updated_by = lv_current_user,
4941: creation_date = lv_current_date,
4942: created_by = lv_current_user

Line 4977: 'UPDATE msd_st_time'

4973: -- Date is not provided.
4974:
4975: v_sql_stmt := 06;
4976: lv_sql_stmt :=
4977: 'UPDATE msd_st_time'
4978: ||' SET process_flag = '||G_ERROR_FLG||','
4979: ||' error_text = '||''''||lv_message_text||''''
4980: ||' WHERE calendar_type = '||G_FISCAL_CAL
4981: ||' AND ( year IS NULL'

Line 5022: 'UPDATE msd_st_time'

5018: -- All the start date should be less than end date
5019:
5020: v_sql_stmt := 07;
5021: lv_sql_stmt :=
5022: 'UPDATE msd_st_time'
5023: ||' SET process_flag = '||G_ERROR_FLG||','
5024: ||' error_text = '||''''||lv_message_text||''''
5025: ||' WHERE calendar_type = '||G_FISCAL_CAL
5026: ||' AND (year_start_date >= year_end_date'

Line 5046: pEntityName => 'MSD_ST_TIME',

5042: (ERRBUF => lv_error_text,
5043: RETCODE => lv_return,
5044: pBatchID => lv_batch_id,
5045: pInstanceCode => p_instance_code,
5046: pEntityName => 'MSD_ST_TIME',
5047: pInstanceID => p_instance_id);
5048:
5049: IF NVL(lv_return,0) <> 0 THEN
5050: RAISE ex_logging_err;

Line 5054: (p_table_name => 'MSD_ST_TIME',

5050: RAISE ex_logging_err;
5051: END IF;
5052: -- Set the process flag as Valid and populate instance_id
5053: lv_return := MSC_ST_UTIL.SET_PROCESS_FLAG
5054: (p_table_name => 'MSD_ST_TIME',
5055: p_instance_id => p_instance_id,
5056: p_instance_code => p_instance_code,
5057: p_process_flag => G_VALID,
5058: p_error_text => lv_error_text,

Line 5069: (p_table_name => 'MSD_ST_TIME',

5065:
5066: -- Inserting all the errored out records into MSC_ERRORS:
5067:
5068: lv_return := MSC_ST_UTIL.LOG_ERROR
5069: (p_table_name => 'MSD_ST_TIME',
5070: p_instance_code => p_instance_code,
5071: p_row => lv_column_names,
5072: p_severity => G_SEV_ERROR,
5073: p_error_text => lv_error_text,

Line 5093: ||' FROM msd_st_time'

5089: v_sql_stmt := 08;
5090: lv_sql_stmt :=
5091: ' SELECT min(year_start_date),'
5092: ||' max(year_end_date)'
5093: ||' FROM msd_st_time'
5094: ||' WHERE calendar_code = :calendar_code'
5095: ||' AND calendar_type ='||G_FISCAL_CAL
5096: ||' AND instance = '||p_instance_id ;
5097:

Line 5131: ' from msd_st_time' ||

5127: ' month, ' ||
5128: ' month_description, ' ||
5129: ' month_start_Date, ' ||
5130: ' month_end_date ' ||
5131: ' from msd_st_time' ||
5132: ' where calendar_code = NVL(''' ||rec1.calendar_code || ''', calendar_code)'||
5133: ' and calendar_type='||G_FISCAL_CAL||
5134: ' and instance= '||p_instance_id||
5135: ' order by month_start_date';

Line 5163: p_dest_table => 'MSD_ST_TIME',

5159: EXIT WHEN Fiscal_Month_Cur%NOTFOUND;
5160:
5161: MSD_TRANSLATE_TIME_DATA.Explode_Fiscal_Dates( errbuf => errbuf,
5162: retcode => retcode,
5163: p_dest_table => 'MSD_ST_TIME',
5164: p_instance_id => p_instance_id,
5165: p_calendar_type_id => G_FISCAL_CAL,
5166: p_calendar_code => lv_calendar_code,
5167: p_seq_num => null,

Line 5188: ' DELETE from MSD_ST_TIME '

5184: CLOSE Fiscal_Month_Cur;
5185:
5186: v_sql_stmt := 09;
5187: lv_sql_stmt:=
5188: ' DELETE from MSD_ST_TIME '
5189: ||' WHERE calendar_code = :calendar_code'
5190: ||' AND process_flag = '||G_VALID
5191: ||' AND calendar_type = '||G_FISCAL_CAL
5192: ||' AND sr_instance_code = :lv_instance_code ';

Line 5241: lv_batch_id msd_st_time.batch_id%TYPE;

5237: Composite_Week_Cur Composite_Week_Cursor ;
5238:
5239: lb_rowid RowidTab;
5240: lv_sql_stmt VARCHAR2(4000);
5241: lv_batch_id msd_st_time.batch_id%TYPE;
5242: lv_message_text msc_errors.error_text%TYPE;
5243: lv_error_text VARCHAR2(250);
5244: lv_from_date DATE ;
5245: lv_to_date DATE ;

Line 5279: FROM msd_st_time

5275: lv_column_names VARCHAR2(5000);
5276:
5277: CURSOR c1(p_batch_id NUMBER)IS
5278: SELECT rowid
5279: FROM msd_st_time
5280: WHERE process_flag IN (G_IN_PROCESS)
5281: AND calendar_type = G_COMPOSITE_CAL
5282: AND sr_instance_code = p_instance_code
5283: AND batch_id = p_batch_id;

Line 5286: SELECT distinct calendar_code FROM msd_st_time

5282: AND sr_instance_code = p_instance_code
5283: AND batch_id = p_batch_id;
5284:
5285: CURSOR c2 IS
5286: SELECT distinct calendar_code FROM msd_st_time
5287: WHERE calendar_type = G_COMPOSITE_CAL
5288: AND instance = p_instance_id
5289: AND process_flag = G_VALID;
5290:

Line 5336: 'UPDATE msd_st_time'

5332: END IF;
5333:
5334: v_sql_stmt := 01;
5335: lv_sql_stmt :=
5336: 'UPDATE msd_st_time'
5337: ||' SET process_flag = '||G_ERROR_FLG||','
5338: ||' error_text = '||''''||lv_message_text||''''
5339: ||' WHERE calendar_type not in ('||G_COMPOSITE_CAL||','||G_FISCAL_CAL||')'
5340: ||' AND process_flag = '||G_IN_PROCESS

Line 5360: 'UPDATE msd_st_time'

5356:
5357: v_sql_stmt := 03;
5358:
5359: lv_sql_stmt :=
5360: 'UPDATE msd_st_time'
5361: ||' SET batch_id = :lv_batch_id '
5362: ||' WHERE process_flag IN ('||G_IN_PROCESS||')'
5363: ||' AND sr_instance_code = :lv_instance_code'
5364: ||' AND calendar_type ='||G_COMPOSITE_CAL

Line 5384: UPDATE msd_st_time

5380: CLOSE c1;
5381:
5382: v_sql_stmt := 04;
5383: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
5384: UPDATE msd_st_time
5385: SET st_transaction_id = msd_st_time_s.NEXTVAL,
5386: last_update_date = lv_current_date,
5387: last_updated_by = lv_current_user,
5388: creation_date = lv_current_date,

Line 5385: SET st_transaction_id = msd_st_time_s.NEXTVAL,

5381:
5382: v_sql_stmt := 04;
5383: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
5384: UPDATE msd_st_time
5385: SET st_transaction_id = msd_st_time_s.NEXTVAL,
5386: last_update_date = lv_current_date,
5387: last_updated_by = lv_current_user,
5388: creation_date = lv_current_date,
5389: created_by = lv_current_user

Line 5430: 'UPDATE msd_st_time'

5426: -- Date is not provided.
5427:
5428: v_sql_stmt := 05;
5429: lv_sql_stmt :=
5430: 'UPDATE msd_st_time'
5431: ||' SET process_flag = '||G_ERROR_FLG||','
5432: ||' error_text = '||''''||lv_message_text||''''
5433: ||' WHERE calendar_type = '||G_COMPOSITE_CAL
5434: ||' AND ( year IS NULL'

Line 5483: 'UPDATE msd_st_time'

5479: -- All the start date should be less than end date
5480:
5481: v_sql_stmt := 06;
5482: lv_sql_stmt :=
5483: 'UPDATE msd_st_time'
5484: ||' SET process_flag = '||G_ERROR_FLG||','
5485: ||' error_text = '||''''||lv_message_text||''''
5486: ||' WHERE calendar_type = '||G_COMPOSITE_CAL
5487: ||' AND (year_start_date > year_end_date'

Line 5511: pEntityName => 'MSD_ST_TIME',

5507: (ERRBUF => lv_error_text,
5508: RETCODE => lv_return,
5509: pBatchID => lv_batch_id,
5510: pInstanceCode => p_instance_code,
5511: pEntityName => 'MSD_ST_TIME',
5512: pInstanceID => p_instance_id);
5513:
5514: IF NVL(lv_return,0) <> 0 THEN
5515: RAISE ex_logging_err;

Line 5522: (p_table_name => 'MSD_ST_TIME',

5518:
5519:
5520: -- Set the process flag as Valid and populate instance_id
5521: lv_return := MSC_ST_UTIL.SET_PROCESS_FLAG
5522: (p_table_name => 'MSD_ST_TIME',
5523: p_instance_id => p_instance_id,
5524: p_instance_code => p_instance_code,
5525: p_process_flag => G_VALID,
5526: p_error_text => lv_error_text,

Line 5539: (p_table_name => 'MSD_ST_TIME',

5535:
5536: -- Inserting all the errored out records into MSC_ERRORS:
5537:
5538: lv_return := MSC_ST_UTIL.LOG_ERROR
5539: (p_table_name => 'MSD_ST_TIME',
5540: p_instance_code => p_instance_code,
5541: p_row => lv_column_names,
5542: p_severity => G_SEV_ERROR,
5543: p_error_text => lv_error_text,

Line 5563: ||' FROM msd_st_time'

5559: v_sql_stmt := 08;
5560: lv_sql_stmt :=
5561: ' SELECT min(year_start_date),'
5562: ||' max(year_end_date)'
5563: ||' FROM msd_st_time'
5564: ||' WHERE calendar_code = :calendar_code'
5565: ||' AND calendar_type ='||G_COMPOSITE_CAL
5566: ||' AND instance = '||p_instance_id ;
5567:

Line 5605: ' from msd_st_time' ||

5601: ' week, '||
5602: ' week_description, '||
5603: ' week_start_date, '||
5604: ' week_end_date ' ||
5605: ' from msd_st_time' ||
5606: ' where calendar_code = NVL(''' ||rec1.calendar_code || ''', calendar_code)'||
5607: ' and calendar_type='||G_COMPOSITE_CAL ||
5608: ' and instance= '||p_instance_id||
5609: ' order by week_start_date';

Line 5641: p_dest_table => 'MSD_ST_TIME',

5637: EXIT WHEN Composite_Week_Cur%NOTFOUND;
5638:
5639: MSC_ST_UTIL.Explode_Composite_Dates( errbuf => errbuf,
5640: retcode => retcode,
5641: p_dest_table => 'MSD_ST_TIME',
5642: p_instance_id => p_instance_id,
5643: p_calendar_type_id => G_COMPOSITE_CAL,
5644: p_calendar_code => lv_calendar_code,
5645: p_seq_num => null,

Line 5669: ' DELETE from MSD_ST_TIME '

5665: CLOSE Composite_Week_Cur;
5666:
5667: v_sql_stmt := 09;
5668: lv_sql_stmt:=
5669: ' DELETE from MSD_ST_TIME '
5670: ||' WHERE calendar_code = :calendar_code'
5671: ||' AND process_flag = '||G_VALID
5672: ||' AND calendar_type = '||G_COMPOSITE_CAL
5673: ||' AND sr_instance_code = :lv_instance_code ';