DBA Data[Home] [Help]

APPS.MSC_CL_PRE_PROCESS dependencies on MSC_ST_REGION_SITES

Line 1375: ||' on MSC_ST_REGION_SITES '

1371: application_short_name => 'MSC',
1372: statement_type => AD_DDL.CREATE_INDEX,
1373: statement =>
1374: 'create index MSC_ST_REGION_SITE_N1_'||v_instance_code
1375: ||' on MSC_ST_REGION_SITES '
1376: ||'(sr_instance_code, country, state, city, postal_code_from, postal_code_to, vendor_name, vendor_site_code ) '
1377: ||' STORAGE (INITIAL 100K NEXT 1M PCTINCREASE 0) ',
1378: object_name =>'MSC_ST_REGION_SITE_N1_'||v_instance_code);
1379:

Line 1391: msc_analyse_tables_pk.analyse_table( 'MSC_ST_REGION_SITES', v_instance_id, -1);

1387: msc_analyse_tables_pk.analyse_table( 'MSC_ST_ITEM_SOURCING', v_instance_id, -1);
1388: msc_analyse_tables_pk.analyse_table( 'MSC_ST_REGIONS', v_instance_id, -1);
1389: msc_analyse_tables_pk.analyse_table( 'MSC_ST_ZONE_REGIONS', v_instance_id, -1);
1390: msc_analyse_tables_pk.analyse_table( 'MSC_ST_REGION_LOCATIONS', v_instance_id, -1);
1391: msc_analyse_tables_pk.analyse_table( 'MSC_ST_REGION_SITES', v_instance_id, -1);
1392:
1393: END IF;
1394:
1395: IF v_res_dmd_enabled = SYS_YES THEN

Line 17031: FROM msc_st_region_sites

17027: GROUP BY location_code;
17028:
17029: CURSOR c8(p_batch_id NUMBER) IS
17030: SELECT rowid
17031: FROM msc_st_region_sites
17032: WHERE process_flag IN (G_IN_PROCESS,G_ERROR_FLG)
17033: AND sr_instance_code = v_instance_code
17034: AND batch_id = p_batch_id;
17035:

Line 18779: 'UPDATE msc_st_region_sites msr1 '

18775:
18776: --Duplicate records check for the records whose source is XML
18777:
18778: lv_sql_stmt :=
18779: 'UPDATE msc_st_region_sites msr1 '
18780: ||' SET process_flag = '||G_ERROR_FLG||','
18781: ||' error_text = '||''''||lv_message_text||''''
18782: ||' WHERE message_id < (SELECT MAX(message_id)'
18783: ||' FROM msc_st_region_sites msr2'

Line 18783: ||' FROM msc_st_region_sites msr2'

18779: 'UPDATE msc_st_region_sites msr1 '
18780: ||' SET process_flag = '||G_ERROR_FLG||','
18781: ||' error_text = '||''''||lv_message_text||''''
18782: ||' WHERE message_id < (SELECT MAX(message_id)'
18783: ||' FROM msc_st_region_sites msr2'
18784: ||' WHERE msr2.sr_instance_code = msr1.sr_instance_code'
18785: ||' AND NVL(msr2.country, '||''''||NULL_CHAR||''''||') = '
18786: ||' NVL(msr1.country, '||''''||NULL_CHAR||''''||')'
18787: ||' AND NVL(msr2.country_code, '||''''||NULL_CHAR||''''||') = '

Line 18834: 'UPDATE msc_st_region_sites msr1'

18830: --Different SQL is used because in XML we can identify the latest records
18831: --whereas in batch load we cannot.
18832:
18833: lv_sql_stmt :=
18834: 'UPDATE msc_st_region_sites msr1'
18835: ||' SET process_flag = '||G_ERROR_FLG||','
18836: ||' error_text = '||''''||lv_message_text||''''
18837: ||' WHERE EXISTS( SELECT 1 '
18838: ||' FROM msc_st_region_sites msr2'

Line 18838: ||' FROM msc_st_region_sites msr2'

18834: 'UPDATE msc_st_region_sites msr1'
18835: ||' SET process_flag = '||G_ERROR_FLG||','
18836: ||' error_text = '||''''||lv_message_text||''''
18837: ||' WHERE EXISTS( SELECT 1 '
18838: ||' FROM msc_st_region_sites msr2'
18839: ||' WHERE msr2.sr_instance_code = msr1.sr_instance_code'
18840: ||' AND NVL(msr2.country, '||''''||NULL_CHAR||''''||') = '
18841: ||' NVL(msr1.country, '||''''||NULL_CHAR||''''||')'
18842: ||' AND NVL(msr2.country_code, '||''''||NULL_CHAR||''''||') = '

Line 18904: ' UPDATE msc_st_region_sites '

18900: FETCH c1 INTO lv_batch_id;
18901: CLOSE c1;
18902:
18903: lv_sql_stmt :=
18904: ' UPDATE msc_st_region_sites '
18905: ||' SET batch_id = :lv_batch_id'
18906: ||' WHERE process_flag IN ('||G_IN_PROCESS||','||G_ERROR_FLG||')'
18907: ||' AND sr_instance_code = :v_instance_code'
18908: ||' AND NVL(batch_id,'||NULL_VALUE||') = '||NULL_VALUE

Line 18923: UPDATE msc_st_region_sites

18919: FETCH c8 BULK COLLECT INTO lb_rowid;
18920: CLOSE c8;
18921:
18922: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
18923: UPDATE msc_st_region_sites
18924: SET st_transaction_id = msc_st_region_sites_s.NEXTVAL,
18925: refresh_id = v_refresh_id,
18926: last_update_date = v_current_date,
18927: last_updated_by = v_current_user,

Line 18924: SET st_transaction_id = msc_st_region_sites_s.NEXTVAL,

18920: CLOSE c8;
18921:
18922: FORALL j IN lb_rowid.FIRST..lb_rowid.LAST
18923: UPDATE msc_st_region_sites
18924: SET st_transaction_id = msc_st_region_sites_s.NEXTVAL,
18925: refresh_id = v_refresh_id,
18926: last_update_date = v_current_date,
18927: last_updated_by = v_current_user,
18928: creation_date = v_current_date,

Line 18938: p_token_value1 => 'MSC_ST_REGION_SITES');

18934: p_error_code => 'MSC_PP_NO_DELETION',
18935: p_message_text => lv_message_text,
18936: p_error_text => lv_error_text,
18937: p_token1 => 'TABLE_NAME',
18938: p_token_value1 => 'MSC_ST_REGION_SITES');
18939:
18940:
18941: -- Deletion is not allowed for this table
18942: v_sql_stmt := 06;

Line 18944: 'UPDATE msc_st_region_sites '

18940:
18941: -- Deletion is not allowed for this table
18942: v_sql_stmt := 06;
18943: lv_sql_stmt :=
18944: 'UPDATE msc_st_region_sites '
18945: ||' SET process_flag = '||G_ERROR_FLG||','
18946: ||' error_text = '||''''||lv_message_text||''''
18947: ||' WHERE deleted_flag = '||SYS_YES
18948: ||' AND process_flag = '||G_IN_PROCESS

Line 18982: (p_table_name => 'MSC_ST_REGION_SITES',

18978: lv_where_str := ' AND NVL(deleted_flag,'||NULL_VALUE||') '
18979: ||' NOT IN(1,2)';
18980:
18981: lv_return := MSC_ST_UTIL.LOG_ERROR
18982: (p_table_name => 'MSC_ST_REGION_SITES',
18983: p_instance_code => v_instance_code,
18984: p_row => lv_column_names,
18985: p_severity => G_SEV_WARNING,
18986: p_message_text => lv_message_text,

Line 19001: 'UPDATE msc_st_region_sites msr'

18997:
18998: --Deriving region_id
18999:
19000: lv_sql_stmt :=
19001: 'UPDATE msc_st_region_sites msr'
19002: ||' SET region_id = (SELECT local_id'
19003: ||' FROM msc_local_id_setup mls'
19004: ||' WHERE mls.char1 = msr.sr_instance_code'
19005: ||' AND NVL(mls.char2, '||''''||NULL_CHAR||''''||') = '

Line 19049: (p_table_name => 'MSC_ST_REGION_SITES',

19045: END IF;
19046:
19047: --Derive vendor_site_id
19048: lv_return := MSC_ST_UTIL.DERIVE_PARTNER_SITE_ID
19049: (p_table_name => 'MSC_ST_REGION_SITES',
19050: p_partner_name => 'VENDOR_NAME',
19051: p_partner_site_code => 'VENDOR_SITE_CODE',
19052: p_partner_site_id => 'VENDOR_SITE_ID',
19053: p_instance_code => v_instance_code,

Line 19072: p_token_value1 => 'MSC_ST_REGION_SITES');

19068: p_error_code => 'MSC_PP_NO_UPDATION',
19069: p_message_text => lv_message_text,
19070: p_error_text => lv_error_text,
19071: p_token1 => 'TABLE_NAME',
19072: p_token_value1 => 'MSC_ST_REGION_SITES');
19073:
19074:
19075: -- Error out the record if same region_site already exists in ODS
19076: -- As we do not allow region_site incremental update

Line 19080: 'UPDATE msc_st_region_sites msrs'

19076: -- As we do not allow region_site incremental update
19077: -- It has to be purged before loaded again
19078:
19079: lv_sql_stmt :=
19080: 'UPDATE msc_st_region_sites msrs'
19081: ||' SET msrs.process_flag = '||G_ERROR_FLG||','
19082: ||' msrs.error_text = '||''''||lv_message_text||''''
19083: ||' WHERE msrs.batch_id = :lv_batch_id'
19084: ||' AND msrs.sr_instance_code = :v_instance_code'

Line 19108: pEntityName => 'MSC_ST_REGION_SITES',

19104: (ERRBUF => lv_error_text,
19105: RETCODE => lv_return,
19106: pBatchID => lv_batch_id,
19107: pInstanceCode => v_instance_code,
19108: pEntityName => 'MSC_ST_REGION_SITES',
19109: pInstanceID => v_instance_id);
19110:
19111: IF NVL(lv_return,0) <> 0 THEN
19112: RAISE ex_logging_err;

Line 19117: (p_table_name => 'MSC_ST_REGION_SITES',

19113: END IF;
19114:
19115: -- Set the process flag as Valid and populate instance_id
19116: lv_return := MSC_ST_UTIL.SET_PROCESS_FLAG
19117: (p_table_name => 'MSC_ST_REGION_SITES',
19118: p_instance_id => v_instance_id,
19119: p_instance_code => v_instance_code,
19120: p_process_flag => G_VALID,
19121: p_error_text => lv_error_text,

Line 19132: (p_table_name => 'MSC_ST_REGION_SITES',

19128:
19129: -- At the end calling the LOG_ERROR for logging all
19130: -- errored out records.
19131: lv_return := MSC_ST_UTIL.LOG_ERROR
19132: (p_table_name => 'MSC_ST_REGION_SITES',
19133: p_instance_code => v_instance_code,
19134: p_row => lv_column_names,
19135: p_severity => G_SEV_ERROR,
19136: p_message_text => NULL,

Line 19168: ||' FROM MSC_TP_SITE_ID_LID mtsil, MSC_ST_REGION_SITES msrs'

19164: ||' msrs.CREATION_DATE,'
19165: ||' msrs.LAST_UPDATED_BY,'
19166: ||' msrs.LAST_UPDATE_DATE,'
19167: ||' msrs.LAST_UPDATE_LOGIN'
19168: ||' FROM MSC_TP_SITE_ID_LID mtsil, MSC_ST_REGION_SITES msrs'
19169: ||' WHERE msrs.batch_id = :lv_batch_id'
19170: ||' AND mtsil.SR_TP_SITE_ID = msrs.VENDOR_SITE_ID'
19171: ||' AND mtsil.SR_Instance_ID = msrs.SR_INSTANCE_ID'
19172: ||' AND mtsil.Partner_Type = 1 '

Line 55814: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_REGION_SITES');

55810: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_ZONE_REGIONS');
55811: IF lv_count > 0 Then
55812: prec.sourcing_rule_flag:= SYS_YES;
55813: End IF;
55814: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_REGION_SITES');
55815: IF lv_count > 0 Then
55816: prec.sourcing_rule_flag:= SYS_YES;
55817: End IF;
55818: lv_count:= SET_IN_PROCESS (p_table_name => 'MSC_ST_REGION_LOCATIONS');